Commit 4925303d authored by Xavier Leroy's avatar Xavier Leroy
Browse files

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.
parent c50680bb
......@@ -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"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment