This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Wrong symbol index generated in object file
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nemanja Popov <nemanja dot popov at micronasnit dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 15 Mar 2006 21:52:25 +1030
- Subject: Re: Wrong symbol index generated in object file
- References: <042901c64512$a3ee2920$b200a8c0@niit.micronasnit.com>
On Sat, Mar 11, 2006 at 02:49:38PM +0100, Nemanja Popov wrote:
> As you can see, symbol index which references to the necessary symbol
> (_foo_func2) for this relocation is wrong. That causes wrong relocation
> calculation at linking time.
You may have found a problem, but the fact that _foo_func2 is replaced
by the section symbol .foo in the reloc isn't wrong in itself.
Effectively, the assembler is generating code for "jal .foo+4" instead
of "jal _foo_func_2". Since _foo_func_2 is equal to .foo+4 this should
be OK.
You might like to take a look at bfd/elf32-dlx.c. I think much of this
file is bogus.
--
Alan Modra
IBM OzLabs - Linux Technology Centre