Fix ld testsuite for x86-64
Andreas Jaeger
aj@suse.de
Fri Apr 27 09:19:00 GMT 2001
Running the testsuite for x86-64 on the current mainline I noticed a
failure in ld, here's a patch. Ok to commit?
But this still doesn't fix all of my problems, vaddr should be 0x80040
but it is 0x040. The second filesz looks also really broken :-(.
I'm cross-compiling from i686-linux-gnu to x86_64-linux-gnu.
Thanks,
Andreas
gromit:/builds/sourceware-src/cross/ld:[2]$ /builds/sourceware-src/cross/ld/../binutils/objdump --private tmpdir/phdrs
tmpdir/phdrs: file format elf64-x86-64
Program Header:
PHDR off 0x0000000000000040 vaddr 0x0000000000000040 paddr 0x0000000000000040 align 2**3
filesz 0x00000000000000a8 memsz 0x00000000000000a8 flags r--
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**20
filesz 0x00000000000800ec memsz 0x00000000000800ec flags r-x
LOAD off 0x00000000000800ec vaddr 0x00000000000800ec paddr 0x00000000000800ec align 2**20
filesz 0x0000000000000004 memsz 0x0000000000000004 flags rw-
2001-04-27 Andreas Jaeger <aj@suse.de>
* ld-scripts/phdrs.exp: x86-64 is a 64 bit ELF platform, handle it
special.
============================================================
Index: ld/testsuite/ld-scripts/phdrs.exp
--- ld/testsuite/ld-scripts/phdrs.exp 2001/03/13 06:14:28 1.5
+++ ld/testsuite/ld-scripts/phdrs.exp 2001/04/27 15:55:38
@@ -48,7 +48,7 @@
# On a 64 bit ELF format, we need different numbers.
if { [istarget alpha*-*-*] || [istarget "ia64*-*-*"]
- || [istarget "hppa*64*-*-*"] } then {
+ || [istarget "hppa*64*-*-*"] || [istarget "x86_64*-*-*"] } then {
set phdrs_regexp \
".*Program Header:.*PHDR *off *0x00*40 *vaddr *0x00*80040 *paddr *0x00*80040.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*80000 *paddr *0x00*80000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*"
}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Binutils
mailing list