[PATCH] Mark SJLJ EH label as local
Richard Earnshaw
rearnsha@arm.com
Fri Nov 14 11:12:00 GMT 2003
This patch causes an internal label generated by the EH unwinding support
that uses SJLJ to be marked as local so that backends can optimize GOT
accesses for it.
On arm-netbsdelf this cuts the number of R_ARM_RELATIVE relocs in
libstdc++.so from 684 to 288 (With a corresponding cut in the number of
GOT entries). On libjava.so it eliminates 1348 entries.
Bootstrapped and reg-tested on arm-netbsdelf.
2003-11-14 Richard Earnshaw <rearnsha@arm.com>
* except.c (sjlj_emit_function_enter): Mark internal label as LOCAL.
-------------- next part --------------
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.253
diff -p -r1.253 except.c
*** except.c 18 Sep 2003 20:53:03 -0000 1.253
--- except.c 12 Nov 2003 15:39:05 -0000
*************** sjlj_emit_function_enter (rtx dispatch_l
*** 2047,2054 ****
if (cfun->uses_eh_lsda)
{
char buf[20];
ASM_GENERATE_INTERNAL_LABEL (buf, "LLSDA", current_function_funcdef_no);
! emit_move_insn (mem, gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)));
}
else
emit_move_insn (mem, const0_rtx);
--- 2047,2058 ----
if (cfun->uses_eh_lsda)
{
char buf[20];
+ rtx sym;
+
ASM_GENERATE_INTERNAL_LABEL (buf, "LLSDA", current_function_funcdef_no);
! sym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
! SYMBOL_REF_FLAGS (sym) = SYMBOL_FLAG_LOCAL;
! emit_move_insn (mem, sym);
}
else
emit_move_insn (mem, const0_rtx);
More information about the Gcc-patches
mailing list