[PATCH] Add a record_link_assignments hook to ldemul

H.J. Lu hjl.tools@gmail.com
Fri Apr 29 01:00:00 GMT 2016


On Thu, Apr 28, 2016 at 4:38 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Apr 28, 2016 at 02:01:47PM -0700, H.J. Lu wrote:
>> +      /* Symbol is defined.  Check if it is also defined in a regular
>> +      input file only when it is currently defined in a dynamic
>> +      object, since otherwise, it can't be a __start_<name> nor
>> +      __stop_<name> symbol.  */
>> +      if (!h->def_dynamic)
>>       return NULL;
> [snip]
>> +         if (s != NULL)
>> +           {
>> +             h->root.u.undef.section = s;
>> +             break;
>> +           }
>
> You can't set u.undef here on a defined symbol.  That's just too ugly,
> even if you later set it to undefined.  Better to force it
> bfd_link_hash_undefined here.

Like this?

> This is getting quite messy, and I'm wondering if we even need
> _bfd_elf_is_start_stop, except for gc-sections code.
>

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-record_link_assignments-hook-to-ldemul.patch
Type: text/x-patch
Size: 22801 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160429/6efb8368/attachment.bin>


More information about the Binutils mailing list