This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Wrong symbol index generated in object file


Problem was in gas/config/tc-dlx.c

bfd_boolean
md_dlx_fix_adjustable (fixP)
  fixS *fixP;
{
 /* We need the symbol name for the VTABLE entries.  */
 return (fixP->fx_r_type != BFD_RELOC_VTABLE_INHERIT
         && fixP->fx_r_type != BFD_RELOC_VTABLE_ENTRY
}

which is

#define tc_fix_adjustable(FIX) md_dlx_fix_adjustable (FIX)

It was missing one line:

return (fixP->fx_r_type != BFD_RELOC_VTABLE_INHERIT
&& fixP->fx_r_type != BFD_RELOC_VTABLE_ENTRY
&& fixP->fx_r_type != BFD_RELOC_DLX_JMP26);



Regards, Nemanja

----- Original Message ----- From: "Alan Modra" <amodra@bigpond.net.au>
To: "Nemanja Popov" <nemanja.popov@micronasnit.com>
Cc: <binutils@sourceware.org>
Sent: Wednesday, March 15, 2006 12:22 PM
Subject: Re: Wrong symbol index generated in object file



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


__________ NOD32 1.1443 (20060314) Information __________


This message was checked by NOD32 antivirus system.
http://www.eset.com




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]