This is the mail archive of the
mailing list for the binutils project.
Re: New flag --keep-section <section_name> to prevent certain sections from being linker garbage collected.
- From: Alan Modra <amodra at gmail dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: binutils <binutils at sourceware dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 4 Apr 2012 11:26:36 +0930
- Subject: Re: New flag --keep-section <section_name> to prevent certain sections from being linker garbage collected.
- References: <CAAs8HmwewDcEdmY31qK4iraZbzwgJmngVm3TF55cZnS-c1DuKw@mail.gmail.com>
On Tue, Apr 03, 2012 at 05:48:47PM -0700, Sriraman Tallam wrote:
> This patch adds a new flag, --keep-section to allow specifying
> section names that should not be gc'ed.
I think this is a useful hack for ld developers,
> For use cases, as an example, a statically linked executable with
> pthreads needs .rodata.nptl_version to be debuggable with gdb but
but really, ld should have knowledge about this section built in, bfd
ld too. And both linkers ought to have the option if one has it.
Which is not to say I think your patch ought to be blocked unless you
also submit bfd ld support for the option, but just that the
usefulness of such an option is limited if only one ld has it.
Australia Development Lab, IBM