1 From: Stephane Glondu <steph@glondu.net>
2 Date: Tue, 8 Mar 2011 21:17:40 +0100
3 Subject: [PATCH] Fix ocamlopt w.r.t. binutils 2.21
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
8 Bug: http://caml.inria.fr/mantis/view.php?id=5237
9 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404
10 Authors: Eric Cooper, spiralvoice
11 Reviewed-by: Stéphane Glondu <steph@glondu.net>
13 asmcomp/amd64/emit.mlp | 13 +++++++------
14 asmcomp/i386/emit.mlp | 6 +++---
15 2 files changed, 10 insertions(+), 9 deletions(-)
17 diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
18 index 4a3f844..525c6e6 100644
19 --- a/asmcomp/amd64/emit.mlp
20 +++ b/asmcomp/amd64/emit.mlp
21 @@ -679,17 +679,18 @@ let fundecl fundecl =
22 emit_all true fundecl.fun_body;
23 List.iter emit_call_gc !call_gc_sites;
24 emit_call_bound_errors ();
25 + begin match Config.system with
27 + ` .type {emit_symbol fundecl.fun_name},@function\n`;
28 + ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
31 if !float_constants <> [] then begin
34 else ` .section .rodata.cst8,\"a\",@progbits\n`;
35 List.iter emit_float_constant !float_constants
37 - match Config.system with
39 - ` .type {emit_symbol fundecl.fun_name},@function\n`;
40 - ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
44 (* Emission of data *)
46 diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
47 index 2992f29..0b1252c 100644
48 --- a/asmcomp/i386/emit.mlp
49 +++ b/asmcomp/i386/emit.mlp
50 @@ -905,12 +905,12 @@ let fundecl fundecl =
51 emit_all true fundecl.fun_body;
52 List.iter emit_call_gc !call_gc_sites;
53 emit_call_bound_errors ();
54 - List.iter emit_float_constant !float_constants;
55 - match Config.system with
56 + begin match Config.system with
57 "linux_elf" | "bsd_elf" | "gnu" ->
58 ` .type {emit_symbol fundecl.fun_name},@function\n`;
59 ` .size {emit_symbol fundecl.fun_name},.-{emit_symbol fundecl.fun_name}\n`
62 + List.iter emit_float_constant !float_constants
65 (* Emission of data *)