diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-11-17 14:36:18 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-11-17 14:36:18 +0000 |
commit | c29871c2d5c7860c6c6c53e8d5c8a9fe434742d2 (patch) | |
tree | 9e002b414d3fb3a899deb43f9f6e14d02507121a /cfrontend/CPragmas.ml | |
parent | 26bb5772c75efe1e4617fb9c4f2b8522989fac6d (diff) | |
download | compcert-c29871c2d5c7860c6c6c53e8d5c8a9fe434742d2.tar.gz compcert-c29871c2d5c7860c6c6c53e8d5c8a9fe434742d2.zip |
powerpc/: new unary operation "addsymbol"
Support far-data addressing in sections.
(Currently ignored in checklink.)
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2368 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/CPragmas.ml')
-rw-r--r-- | cfrontend/CPragmas.ml | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cfrontend/CPragmas.ml b/cfrontend/CPragmas.ml index a31378e0..3c0c9f15 100644 --- a/cfrontend/CPragmas.ml +++ b/cfrontend/CPragmas.ml @@ -20,19 +20,20 @@ open Camlcoq (* #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(sda_supported && addrmode = "near-data")) + ?writable: + (if accmode = "" then None else Some(String.contains accmode 'W')) + ?executable: + (if accmode = "" then None else Some(String.contains accmode 'X')) + ?access: + (match addrmode with + | "" -> None + | "near-data" -> Some Sections.Access_near + | "far-data" -> Some Sections.Access_far + | _ -> Some Sections.Access_default) () (* #pragma use_section *) |