This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Zero p_paddr confuses BFD
I guess I should commit this. I was a little hesitant because
binutils without my 2008-05-01 PR 6473 fix will generate a 4G file on
a 32-bit host when running strip. On decent filesystems the file will
be sparse, and this test only runs under Linux so we should be OK even
if this starts failing again.
PR 6473
* ld-elf/lma.s, ld-elf/lma.lnk: New test.
* ld-elf/binutils.exp: Run it.
Index: ld/testsuite/ld-elf/binutils.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/binutils.exp,v
retrieving revision 1.8
diff -u -p -r1.8 binutils.exp
--- ld/testsuite/ld-elf/binutils.exp 18 Sep 2007 00:25:06 -0000 1.8
+++ ld/testsuite/ld-elf/binutils.exp 5 May 2008 01:19:06 -0000
@@ -118,6 +118,8 @@ if { ([istarget "i?86-*-elf*"]
binutils_test objcopy "-z relro -shared" relro2
}
+binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma
+
binutils_test objcopy "" tbss1
binutils_test objcopy "-z relro" tbss1
binutils_test objcopy "-shared" tbss1
Index: ld/testsuite/ld-elf/lma.s
===================================================================
RCS file: ld/testsuite/ld-elf/lma.s
diff -N ld/testsuite/ld-elf/lma.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ld/testsuite/ld-elf/lma.s 5 May 2008 01:22:46 -0000
@@ -0,0 +1,4 @@
+ .text
+ .global _start
+_start:
+ .long 0
Index: ld/testsuite/ld-elf/lma.lnk
===================================================================
RCS file: ld/testsuite/ld-elf/lma.lnk
diff -N ld/testsuite/ld-elf/lma.lnk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ld/testsuite/ld-elf/lma.lnk 5 May 2008 01:22:46 -0000
@@ -0,0 +1,6 @@
+SECTIONS
+{
+ . = -0x100000;
+ .text : AT(ADDR(.text) + 0x100000) { *(.text) }
+ /DISCARD/ : { *(*) }
+}
--
Alan Modra
Australia Development Lab, IBM