This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld fails to relocate relative to local symbols?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Paul Lalonde <plalonde at neoptica dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 31 Jan 2006 17:19:51 -0800
- Subject: Re: ld fails to relocate relative to local symbols?
- References: <21059CCA-4671-40C4-8DAD-7E98C7CCBE00@neoptica.com>
On Tue, Jan 31, 2006 at 04:18:53PM -0800, Paul Lalonde wrote:
> -----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)?
>
Please open a bug report at
http://www.sourceware.org/bugzilla/
with a small testcase.
H.J.