ld fails to relocate relative to local symbols?

Paul Lalonde plalonde@neoptica.com
Wed Feb 1 03:50:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks!  Fixed it.

Can you point me to the document that documents that one?

And yes, it is my own restricted ELF library - for assorted reasons  
we can't use a GPL one, and the alternatives are few.

Thanks again, and I'll close the bug, mea culpa.

Paul

On 31-Jan-06, at 7:43 PM, Daniel Jacobowitz wrote:

> On Tue, Jan 31, 2006 at 06:09:18PM -0800, Paul Lalonde wrote:
>> I've just filed a bug, but for anyone who's keen on finding out how I
>> broke it, here's a tgz containing two .o's for AMD64.
>> ld -r success.o succeeds, ld -r fail.o fails.  The files differ in
>> exactly one byte, the change of symbol "mystring" from STB_GLOBAL to
>> STB_LOCAL.
>> It's most likely that I'm violating the ABI in some (not necessarily
>> subtle) way, although the seg fault is disconcerting.
>
> How are you creating these files, anyway?  Your own ELF library?
> fail.o's incorrect: st_info on a symtab section is supposed to be one
> greater than the index of the last local symbol.
>
> -- 
> Daniel Jacobowitz
> CodeSourcery

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD4C/7r7+oA6AsvAkRAt6AAJ9IrsGeH3K1WCWMz3qSX5WIq0nZXQCfdDds
fjX4O053gS91SEZBdVclmK0=
=/iaq
-----END PGP SIGNATURE-----



More information about the Binutils mailing list