bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with 64 bit binutils (32bit seems ok)


From: Alan Modra
Subject: Re: problem with 64 bit binutils (32bit seems ok)
Date: Thu, 10 Dec 2009 09:21:28 +1030
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Wed, Dec 09, 2009 at 10:11:54PM +0000, me wrote:
> The following two-liner ie
> #========
> .int gdt
> gdt:
> #========
> assembled with "as test.s; objcopy -O binary a.out a.com; hte a.com"
> 
> gives "00000000 00 00 00 00" on my phenom X3
> under both Crunchbang linux 64bit 
> (binutils both downloaded as package and also compiled from gnu sources)
> and Desktopbsd 64bit 
> (binutils included with distro)
> 
> Under puppy linux and fedora 9 (both 32bit) on the same phenom
> x3 I got "00000000 04 00 00 00" which looks right.
> 
> I also checked on my PIII running antix linux (32bit)
> and it also gives "00000000 04 00 00 00"
> 
> The 64bit version of binutils seems to not do forward referencing.
> Can someone please advice on this inconsistency/confirm this seeming

Not a bug.  objcopy -O binary on a relocatable file loses the relocs.
X86_64 uses rela style relocs where the addend is in the reloc, x86
uses rel where the addend is in the section.  So in the latter case
you get the "+4" from .text+4, in the former you don't.

-- 
Alan Modra
Australia Development Lab, IBM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]