aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64/TargetPrinter.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-26 18:54:14 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-26 18:54:14 +0100
commit4925303d4f8c011fbb40157cbf44e51a68f7aa2d (patch)
tree3a327bf044ae3425bc3879d2083fd3414b9d4c12 /aarch64/TargetPrinter.ml
parentc50680bb86564fe61db61e6140a418ccc7d36677 (diff)
downloadcompcert-kvx-4925303d4f8c011fbb40157cbf44e51a68f7aa2d.tar.gz
compcert-kvx-4925303d4f8c011fbb40157cbf44e51a68f7aa2d.zip
AArch64 / macOS: use __DATA,__CONST section instead of .const (temporary fix)
The .const section cannot contain absolute references to symbols, as these may need relocation and therefore must be writable. This should be fixed more generally by distinguishing between initialization data that contains absolute references to symbols and initialization data that does not.
Diffstat (limited to 'aarch64/TargetPrinter.ml')
-rw-r--r--aarch64/TargetPrinter.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/aarch64/TargetPrinter.ml b/aarch64/TargetPrinter.ml
index 1c1ff018..6e7b3fba 100644
--- a/aarch64/TargetPrinter.ml
+++ b/aarch64/TargetPrinter.ml
@@ -226,7 +226,7 @@ module MacOS_System : SYSTEM =
| Section_data i | Section_small_data i ->
if i || (not !Clflags.option_fcommon) then ".data" else "COMM"
| Section_const i | Section_small_const i ->
- if i || (not !Clflags.option_fcommon) then ".const" else "COMM"
+ if i || (not !Clflags.option_fcommon) then ".section __DATA,__CONST" else "COMM"
| Section_string -> ".const"
| Section_literal -> ".const"
| Section_jumptable -> ".text"