Relocations against STN_UNDEF

Thomas Schwinge thomas@codesourcery.com
Fri Sep 24 07:54:00 GMT 2010


Hello!

On 2010-09-24 00:12, Alan Modra wrote:
> On Thu, Sep 23, 2010 at 05:37:01PM +0200, Thomas Schwinge wrote:
>>     $ "$PWD"_install/bin/*-ld -o bl_ABS bl_ABS.o
>>     /scratch/thomas/binutils/HEAD_build_arm-none-eabi_install/bin/arm-none-eabi-ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000
>>     bl_ABS.o:(.text+0x0): undefined reference to `no symbol'
>
> ARM fails because the arm backend specifically checks for undefined
> local symbols.  I'd say the arm backend check needs fixing (or
> removing) rather than changing the common elflink code.

Surely enough we could just change the ARM backend, but I'm not yet
really convinced that this is the most appropriate approach: if we agree
that BFD internally shall register STN_UNDEF with bfd_abs_section
instead of bfd_und_section (as demonstrated in other parts of the code
that I quoted), then why not make it like this during relocations
processing, too?  Or is it that you think this change may be disruptive
for other backends?


>> I wonder why we need this code duplicated in (at least) two places; why
>> do objdump and ld use different code paths for reading in relocations?
>
> Efficiency.

Uhm, okay...


Regards,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100924/ff213802/attachment.sig>


More information about the Binutils mailing list