summaryrefslogtreecommitdiff
path: root/cfrontend/CPragmas.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-11-17 14:36:18 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-11-17 14:36:18 +0000
commitc29871c2d5c7860c6c6c53e8d5c8a9fe434742d2 (patch)
tree9e002b414d3fb3a899deb43f9f6e14d02507121a /cfrontend/CPragmas.ml
parent26bb5772c75efe1e4617fb9c4f2b8522989fac6d (diff)
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.ml19
1 files changed, 10 insertions, 9 deletions
diff --git a/cfrontend/CPragmas.ml b/cfrontend/CPragmas.ml
index a31378e..3c0c9f1 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 *)