ld fails to relocate relative to local symbols?
Paul Lalonde
plalonde@neoptica.com
Wed Feb 1 00:18:00 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have an application that uses ELF to encode it's binary data (for
assorted reasons, the binary data need relocation and linkage - ELF
already supports this well and has many tools).
In the process of emitting the data, it's frequently useful to
relocate against a local symbol (yes, I know I could add them to a
dictionary and do a second pass on my data to resolve them myself).
However, if I add a local symbol to the symbol table, and then a
relocation relative to it ld seg faults when I try to link it. If I
change it to a global symbol all is well. (ld -r test.o seg faults as
well)
Is is the expected behaviour (well, not the seg fault, but at least
not handling relocation relative to a local symbol)?
My environment is fedora core 4 on AMD64. I'm running
binutils-2.15.94.0.2.2. The relocation type is R_X86_64_64.
Thanks,
Paul
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFD3/5tr7+oA6AsvAkRArZ7AKCkRkP+gDnix3pzX0tNVW1MVjASbwCgl5to
Lwak/yF/mR7w5rmGGJsLvds=
=GCiH
-----END PGP SIGNATURE-----
More information about the Binutils
mailing list