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: PATCH: PR ld/11133: Static linking with gc-sections deletes sections with __start/__stop reference


"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Tue, Jan 5, 2010 at 11:11 AM, Ian Lance Taylor <iant@google.com> wrote:
>> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>>
>>> __start_XXX and __stop_XXX symbols may reference the start address and
>>> end address of the orphaned section. ÂWe need to search all input files
>>> for section XXX. ÂOK to install?
>>
>> I see code in lang_insert_orphan which defines the __start and __stop
>> symbols. ÂWhy does that code not work?
>>
>
> _bfd_elf_gc_mark_hook is run before lang_insert_orphan is called.

Bother.  I wonder what would break if we simply moved up the call to
lang_insert_orphans in lang_process.

In any case, adding special handling of __start and __stop symbols in
two widely separated places does not sound like the best approach to
me.

Ian


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