aboutsummaryrefslogtreecommitdiffstats
path: root/checklink
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-12-17 11:33:23 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2014-12-17 11:33:23 +0100
commitc1daedb244d1f7586c12749642b0d78ae910e60a (patch)
treec2fbe8c758f15d01cdcf3fa8bf642ab8a47dc5c3 /checklink
parent97257c59566d9506a2ff397ec35fff7b59506a8f (diff)
downloadcompcert-c1daedb244d1f7586c12749642b0d78ae910e60a.tar.gz
compcert-c1daedb244d1f7586c12749642b0d78ae910e60a.zip
Clean up support for common symbols. Uninitialized "const" symbols can be common.
Diffstat (limited to 'checklink')
-rw-r--r--checklink/Check.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/checklink/Check.ml b/checklink/Check.ml
index 87910863..db0159c4 100644
--- a/checklink/Check.ml
+++ b/checklink/Check.ml
@@ -69,8 +69,8 @@ let name_of_section_Linux: section_name -> string = function
| Section_text -> ".text"
| Section_data i -> if i then ".data" else "COMM"
| Section_small_data i -> if i then ".sdata" else ".sbss"
-| Section_const -> ".rodata"
-| Section_small_const -> ".sdata2"
+| Section_const i -> if i then ".rodata" else "COMM"
+| Section_small_const i -> if i then ".sdata2" else "COMM"
| Section_string -> ".rodata"
| Section_literal -> ".rodata.cst8"
| Section_jumptable -> ".text"
@@ -79,10 +79,10 @@ let name_of_section_Linux: section_name -> string = function
(** Adapted from CompCert *)
let name_of_section_Diab: section_name -> string = function
| Section_text -> ".text"
-| Section_data i -> if i then ".data" else ".bss"
+| Section_data i -> if i then ".data" else "COMM"
| Section_small_data i -> if i then ".sdata" else ".sbss"
-| Section_const -> ".text"
-| Section_small_const -> ".sdata2"
+| Section_const _ -> ".text"
+| Section_small_const _ -> ".sdata2"
| Section_string -> ".text"
| Section_literal -> ".text"
| Section_jumptable -> ".text"
@@ -91,7 +91,6 @@ let name_of_section_Diab: section_name -> string = function
(** Taken from CompCert *)
let name_of_section: section_name -> string =
begin match Configuration.system with
- | "macosx" -> fatal "Unsupported CompCert configuration: macosx"
| "linux" -> name_of_section_Linux
| "diab" -> name_of_section_Diab
| _ -> fatal "Unsupported CompCert configuration"