This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFC PATCH] Enabling ld -r ELF .stab/.stabstr optimization
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Earl Chew <earl_chew at agilent dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 1 Oct 2002 17:36:50 +0930
- Subject: Re: [RFC PATCH] Enabling ld -r ELF .stab/.stabstr optimization
- References: <3D929521.60708@agilent.com>
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