diff options
Diffstat (limited to 'cfrontend/CPragmas.ml')
-rw-r--r-- | cfrontend/CPragmas.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cfrontend/CPragmas.ml b/cfrontend/CPragmas.ml index 6fa6d5c8..4b4c0f1b 100644 --- a/cfrontend/CPragmas.ml +++ b/cfrontend/CPragmas.ml @@ -21,13 +21,19 @@ open Cparser (* #pragma section *) +let sda_supported = + match Configuration.arch, Configuration.system with + | "powerpc", "linux" -> true + | "powerpc", "diab" -> true + | _, _ -> false + let process_section_pragma classname istring ustring addrmode accmode = Sections.define_section classname ?iname: (if istring = "" then None else Some istring) ?uname: (if ustring = "" then None else Some ustring) ?writable: (if accmode = "" then None else Some(String.contains accmode 'W')) ?executable: (if accmode = "" then None else Some(String.contains accmode 'X')) - ?near: (if addrmode = "" then None else Some(addrmode = "near-data")) + ?near: (if addrmode = "" then None else Some(sda_supported && addrmode = "near-data")) () (* #pragma use_section *) |