aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-12-30 11:00:22 +0100
committerXavier Leroy <xavierleroy@users.noreply.github.com>2021-02-23 11:33:14 +0100
commited89275cb820bb7ab283c51e461d852d1c8bec63 (patch)
treee076d92145806c6de92194dfa816e9944c2d27f2 /aarch64
parent30feb31c6d6e9235acad42ec5d09d14f3919cc36 (diff)
downloadcompcert-kvx-ed89275cb820bb7ab283c51e461d852d1c8bec63.tar.gz
compcert-kvx-ed89275cb820bb7ab283c51e461d852d1c8bec63.zip
Section handling: finer control of variable initialization
Distinguish between: - uninitialized variables, which can go in COMM if supported - variables initialized with fixed, numeric quantities, which can go in a readonly section if "const" - variables initialized with symbol addresses which may need relocation, which cannot go in a readonly section even if "const", but can go in a special "const_data" section. Also: on macOS, use ".const" instead of ".literal8" for literals, as not all literals have size 8.
Diffstat (limited to 'aarch64')
-rw-r--r--aarch64/TargetPrinter.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/aarch64/TargetPrinter.ml b/aarch64/TargetPrinter.ml
index e31abf71..a9d47bdd 100644
--- a/aarch64/TargetPrinter.ml
+++ b/aarch64/TargetPrinter.ml
@@ -226,7 +226,7 @@ module MacOS_System : SYSTEM =
| Section_data i | Section_small_data i ->
variable_section ~sec:".data" i
| Section_const i | Section_small_const i ->
- variable_section ~sec:".section __DATA,__CONST" i
+ variable_section ~sec:".const" ~reloc:".const_data" i
| Section_string -> ".const"
| Section_literal -> ".const"
| Section_jumptable -> ".text"