Fix .section directives for MacOSX.

git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15478 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2014-10-06 15:35:01 +00:00
parent 7b91064895
commit 376ea01574
1 changed files with 3 additions and 3 deletions

View File

@ -696,7 +696,7 @@ let emit_instr fallthrough i =
I.jmp (reg tmp1); I.jmp (reg tmp1);
begin match system with begin match system with
| S_macosx -> D.section [".const"] None [] | S_macosx -> D.section ["__TEXT";"__const"] None []
| S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") [] | S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") []
| S_win64 -> () (* with MASM, use the text segment *) | S_win64 -> () (* with MASM, use the text segment *)
| _ -> D.section [".rodata"] None [] | _ -> D.section [".rodata"] None []
@ -857,7 +857,7 @@ let begin_assembly() =
if !Clflags.dlcode && system <> S_win64 then begin if !Clflags.dlcode && system <> S_win64 then begin
(* from amd64.S; could emit these constants on demand *) (* from amd64.S; could emit these constants on demand *)
begin match system with begin match system with
| S_macosx -> D.section [".literal16"] None [] | S_macosx -> D.section ["__TEXT";"__literal16"] None ["16byte_literals"]
| S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") [] | S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") []
| _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"] | _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"]
end; end;
@ -882,7 +882,7 @@ let begin_assembly() =
let end_assembly() = let end_assembly() =
if !float_constants <> [] then begin if !float_constants <> [] then begin
begin match system with begin match system with
| S_macosx -> D.section [".literal8"] None [] | S_macosx -> D.section ["__TEXT";"__literal8"] None ["8byte_literals"]
| S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") [] | S_mingw64 | S_cygwin -> D.section [".rdata"] (Some "dr") []
| S_win64 -> D.data () | S_win64 -> D.data ()
| _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"] | _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"]