[RFC PATCH] Enabling ld -r ELF .stab/.stabstr optimization
Alan Modra
amodra@bigpond.net.au
Tue Oct 1 01:07:00 GMT 2002
On Wed, Sep 25, 2002 at 10:03:29PM -0700, Earl Chew wrote:
> Here is a patch to enable .stab/.stabstr optimization in the presence
> of ld -r. This patch was generated against binutils-2.10.1 --- sorry
> the baseline is a little dated, but that's what I'm running.
>
> * bfd/elflink.h (elf_link_add_object_symbols): optimize .stabstr
> even if relocatable
> * ld/ldlang.c (wild_doit): discard debugging sections that have
> been marked SEC_EXCLUDE
I'm a little nervous about this change, although I haven't thought of
any particular problem. Suggestion: Modify ld so that -r sets
link_info.traditional_format, and implement a -fno-traditional-format
option. That way "ld -r" behaviour is unchanged unless you write
"ld -r -fno-traditional-format". Oh, and cofflink.c should have a
similar change to your elflink.h change.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list