$OpenBSD: patch-asmcomp_amd64_emit_mlp,v 1.6 2021/03/15 20:47:23 naddy Exp $

Fix mergeable section flags and use .rodata.cst16 where appropriate
https://github.com/ocaml/ocaml/commit/8a46d76bf9359b5cc505b3f2f9c81eb624c631fa

Index: asmcomp/amd64/emit.mlp
--- asmcomp/amd64/emit.mlp.orig
+++ asmcomp/amd64/emit.mlp
@@ -1034,7 +1034,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");
@@ -1094,8 +1094,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;
 
