This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New flag --keep-section <section_name> to prevent certain sections from being linker garbage collected.


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.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]