This is the mail archive of the 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: [PATCH] ld: provide __ehdr_start magic symbol

On Tue, Jun 26, 2012 at 06:21:43AM +0200, Hans-Peter Nilsson wrote:
> cris-axis-linux-gnu.  Instead only targets expected to hold
> phdrs in the address space should be included.  Other such tests
> use "#target: *-*-linux* *-*-gnu*", which seems appropriate here
> too.

Good idea.  Current testsuite delta looks like:

arc-elf  +FAIL: ld-elf/ehdr_start
avr-elf  +FAIL: ld-elf/ehdr_start
bfin-elf  +FAIL: ld-elf/ehdr_start
cr16-elf  +FAIL: ld-elf/ehdr_start
crx-elf  +FAIL: ld-elf/ehdr_start
d10v-elf  +FAIL: ld-elf/ehdr_start
d30v-elf  +FAIL: ld-elf/ehdr_start
dlx-elf  +FAIL: ld-elf/ehdr_start
fr30-elf  +FAIL: ld-elf/ehdr_start
frv-elf  +FAIL: ld-elf/ehdr_start
frv-linux  +FAIL: ld-elf/ehdr_start
h8300-elf  +FAIL: ld-elf/ehdr_start
i386-linuxaout  +FAIL: rep prefix on ret
i586-aout  +FAIL: rep prefix on ret
i586-coff  +FAIL: rep prefix on ret
i686-pe  +FAIL: rep prefix on ret
i960-elf  +FAIL: ld-elf/ehdr_start
ip2k-elf  +FAIL: ld-elf/ehdr_start
iq2000-elf  +FAIL: ld-elf/ehdr_start
lm32-elf  +FAIL: ld-elf/ehdr_start
m32c-elf  +FAIL: ld-elf/ehdr_start
m32r-elf  +FAIL: ld-elf/ehdr_start
mcore-elf  +FAIL: ld-elf/ehdr_start
mep-elf  +FAIL: ld-elf/ehdr_start
microblaze-elf  +FAIL: ld-elf/ehdr_start
mn10200-elf  +FAIL: ld-elf/ehdr_start
mn10300-elf  +FAIL: ld-elf/ehdr_start
ms1-elf  +FAIL: ld-elf/ehdr_start
msp430-elf  +FAIL: ld-elf/ehdr_start
or32-elf  +FAIL: ld-elf/ehdr_start
pj-elf  +FAIL: ld-elf/ehdr_start
rx-elf  +FAIL: ld-elf/ehdr_start
sh64-elf  +FAIL: ld-elf/ehdr_start
sh-rtems  +FAIL: ld-elf/ehdr_start
spu-elf  +FAIL: ld-elf/ehdr_start
tx39-elf  +FAIL: ld-elf/ehdr_start
v850-elf  +FAIL: ld-elf/ehdr_start
x86_64-mingw32  +FAIL: rep prefix on ret
xstormy16-elf  +FAIL: ld-elf/ehdr_start

The frv-linux failure for ehdr_start is
tmpdir/dump0.o: In function `foo':
(.rodata+0x0): cannot emit fixups in read-only section
./ld-new: final link failed: Nonrepresentable section on output

The "rep prefix on ret" failures are all nop padding like:
extra lines in dump.out starting with "^   2:   90                      nop$"
EOF from /src/binutils-current/gas/testsuite/gas/i386/rep-ret.d

	* gas/i386/rep-ret.s: Zero pad section.
	* gas/i386/rep-ret.d: Update.
	* ld-elf/ehdr_start.s: Use data rather than rodata.
	* ld-elf/ehdr_start.d: Run on linux and gnu targets only.

The above fixes the failures, except for the frv-linux one, which now
fails with

./ld-new: BFD (GNU Binutils) assertion fail /src/binutils-current/bfd/elf32-frv.c:1333
./ld-new: BFD (GNU Binutils) assertion fail /src/binutils-current/bfd/elf32-frv.c:1324
LINKER BUG: .rofixup section size mismatch
./ld-new: final link failed: Nonrepresentable section on output

Index: gas/testsuite/gas/i386/rep-ret.d
RCS file: /cvs/src/src/gas/testsuite/gas/i386/rep-ret.d,v
retrieving revision 1.1
diff -u -p -r1.1 rep-ret.d
--- gas/testsuite/gas/i386/rep-ret.d	22 Jun 2012 21:54:05 -0000	1.1
+++ gas/testsuite/gas/i386/rep-ret.d	27 Jun 2012 00:45:38 -0000
@@ -7,3 +7,4 @@ Disassembly of section .text:
 0+000 <foo>:
 \s*[0-9a-f]+:\s+f3 c3\s+repz ret\s*
+	\.\.\.
Index: gas/testsuite/gas/i386/rep-ret.s
RCS file: /cvs/src/src/gas/testsuite/gas/i386/rep-ret.s,v
retrieving revision 1.1
diff -u -p -r1.1 rep-ret.s
--- gas/testsuite/gas/i386/rep-ret.s	22 Jun 2012 21:54:05 -0000	1.1
+++ gas/testsuite/gas/i386/rep-ret.s	27 Jun 2012 00:45:38 -0000
@@ -1,2 +1,3 @@
 foo:	rep ret
+	.p2align 4,0
Index: ld/testsuite/ld-elf/ehdr_start.d
RCS file: /cvs/src/src/ld/testsuite/ld-elf/ehdr_start.d,v
retrieving revision 1.2
diff -u -p -r1.2 ehdr_start.d
--- ld/testsuite/ld-elf/ehdr_start.d	25 Jun 2012 22:36:21 -0000	1.2
+++ ld/testsuite/ld-elf/ehdr_start.d	27 Jun 2012 00:45:40 -0000
@@ -1,7 +1,7 @@
 #source: ehdr_start.s
 #ld: -e _start
 #nm: -n
-#notarget: arm*-*-eabi* cris-*-*
+#target: *-*-linux* *-*-gnu*
 [0-9a-f]*000 [ADRT] __ehdr_start
Index: ld/testsuite/ld-elf/ehdr_start.s
RCS file: /cvs/src/src/ld/testsuite/ld-elf/ehdr_start.s,v
retrieving revision 1.1
diff -u -p -r1.1 ehdr_start.s
--- ld/testsuite/ld-elf/ehdr_start.s	22 Jun 2012 16:52:33 -0000	1.1
+++ ld/testsuite/ld-elf/ehdr_start.s	27 Jun 2012 00:45:40 -0000
@@ -3,7 +3,7 @@
 	.space 16
-	.section .rodata,"a",%progbits
+	.data
 	.globl foo
 	.weak __ehdr_start

Alan Modra
Australia Development Lab, IBM

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