Fix mergeable section flags and use .rodata.cst16 where appropriate (#9981)
On x86-64 ELF, the `.rodata.cst8` section was incorrectly used.master
parent
64f6f83f44
commit
8a46d76bf9
4
Changes
4
Changes
|
@ -182,6 +182,10 @@ Working version
|
|||
that is rejected by the assembler.
|
||||
(Xavier Leroy, review by Stephen Dolan)
|
||||
|
||||
- #9969, #9981: Added mergeable flag to ELF sections containing mergeable
|
||||
constants. Fixes compatibility with the integrated assembler in clang 11.0.0.
|
||||
(Jacob Young, review by Nicolás Ojeda Bär)
|
||||
|
||||
### Standard library:
|
||||
|
||||
- #9865: add Format.pp_print_seq
|
||||
|
|
|
@ -956,7 +956,7 @@ let begin_assembly() =
|
|||
| S_macosx -> D.section ["__TEXT";"__literal16"] None ["16byte_literals"]
|
||||
| S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") []
|
||||
| S_win64 -> D.data ()
|
||||
| _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"]
|
||||
| _ -> D.section [".rodata.cst16"] (Some "aM") ["@progbits";"16"]
|
||||
end;
|
||||
D.align 16;
|
||||
_label (emit_symbol "caml_negf_mask");
|
||||
|
@ -982,8 +982,9 @@ let end_assembly() =
|
|||
| S_macosx -> D.section ["__TEXT";"__literal8"] None ["8byte_literals"]
|
||||
| S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") []
|
||||
| S_win64 -> D.data ()
|
||||
| _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"]
|
||||
| _ -> D.section [".rodata.cst8"] (Some "aM") ["@progbits";"8"]
|
||||
end;
|
||||
D.align 8;
|
||||
List.iter (fun (cst,lbl) -> emit_float_constant cst lbl) !float_constants
|
||||
end;
|
||||
|
||||
|
|
|
@ -679,7 +679,7 @@ G(caml_system__frametable):
|
|||
#elif defined(SYS_mingw64) || defined(SYS_cygwin)
|
||||
.section .rdata,"dr"
|
||||
#else
|
||||
.section .rodata.cst8,"a",@progbits
|
||||
.section .rodata.cst16,"aM",@progbits,16
|
||||
#endif
|
||||
.globl G(caml_negf_mask)
|
||||
.align SIXTEEN_ALIGN
|
||||
|
|
Loading…
Reference in New Issue