[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emitting relocation info bug
From: |
Alan Modra |
Subject: |
Re: emitting relocation info bug |
Date: |
Mon, 6 May 2002 13:31:26 +0930 |
User-agent: |
Mutt/1.3.25i |
On Mon, Apr 15, 2002 at 06:53:57AM -0700, Jeffrey Blank wrote:
> On my Red Hat 7.2 system, ld is writing the wrong
> address for a symbol only when asked to emit
> relocation information (with the -q) and the
> executable it creates segfaults during run. Compiling
> the SRPM for wu-ftpd will demonstrate this.
I'm going to guess that you're trying to use -q with a dynamically
linked executable on x86.
Don't do that. x86 is a REL target (reloc addends are stored in the
instruction), and an executable has the final values written to
where reloc addends are stored. These are _not_ the right numbers
for the relocs, and ld.so will merrily trash your executable when
it processes the relocs.
I guess the linker should refuse to accept -q in such cases.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: emitting relocation info bug,
Alan Modra <=