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: [RFC] PR ld/13621


On Mon, Jan 30, 2012 at 11:56:49AM +1100, Richard Henderson wrote:
> At first I attempted to SEC_KEEP any section with global symbols.  But
> this ran into all sorts of testsuite failures re .got.  In those cases
> the _GLOBAL_OFFSET_TABLE_ symbol still exists, which causes .got to 
> be kept instead of removed as unused later in the link.

My attempt was using a separate flag to indicate global symbols
were present for the an input section. This works for the example
given in the bug report, but doesn't for the actual gc 4.7 case.
I assume because multiple input files define the same symbol, some
as undefined, and the output section gets associated with the "wrong"
input section. Maybe a solution could be to do te registration in
_bfd_elf_merge_symbol?

Cheers,

Mark

Attachment: section_syms.patch
Description: Text document


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