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 _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils