This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Why does ELF/alpha put none-text relocations in .rela.text?
- To: rth at redhat dot com
- Subject: Re: Why does ELF/alpha put none-text relocations in .rela.text?
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Mon, 20 Aug 2001 15:06:35 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010820114419.A16601@lucon.org>
On Mon, Aug 20, 2001 at 11:44:19AM -0700, H . J . Lu wrote:
> When you do
>
> # gcc -c foo.c
>
> on ELF/alpha, as will put relocations for ".debug_line" in
> .rela.text. When you do
>
> # strip --strip-debug foo.o
> # readelf -r foo.o
>
> you will get
>
> 00000000 200569c000000006 R_ALPHA_GPDISP bad symbol index: 200569c0
>
> How should we fix it?
I think the real problem is ELF/alpha abuses ELF64_R_SYM for the GPDISP
relocations where the symbol index is not really an index into the
symbol table. But the generic part of the ELF linker in BFD assumes
ELF64_R_SYM is a real symbol index. I will see what I can do.
H.J.