Summary: | sys-devel/binutils-2.35.1: 9 ld tests fail on ppc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | PPC Porters <ppc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein, toolchain |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | Linux | ||
URL: | https://sourceware.org/PR26882 | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=714922 https://bugs.gentoo.org/show_bug.cgi?id=751814 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
build.log.xz ld.log.xz test-suite.log |
Description
ernsteiswuerfel
![]() Created attachment 671203 [details]
build.log.xz
Created attachment 671206 [details]
ld.log.xz
Created attachment 671209 [details]
test-suite.log
Let's try to address at least some of failures. I ran tests on 2.35.1 and can see the same failures: Running /var/tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite/ld-powerpc/powerpc.exp ... FAIL: Reloc section order ... build/ld/ls.log contains failure details: /var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/../gas/as-new -I/var/tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite/ld-powerpc -o tmpdir/reloc.o -a32 /var /tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite/ld-powerpc/reloc.s Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/../gas/as-new -I/var/tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite/ld-powerpc - o tmpdir/reloc.o -a32 /var/tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite/ld-powerpc/reloc.s 2>&1} /dev/null ld.tmp (timeout = 300) spawn [open ...] /var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/ld-new --hash-style=sysv -o tmpdir/reloc.so -z norelro -L/var/tmp/portage/sys-devel/binutils-2.35.1/work/binutils-2.35.1/ld/testsuite /ld-powerpc -melf32ppc -shared -z nocombreloc tmpdir/reloc.o Executing on host: sh -c {/var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/ld-new --hash-style=sysv -o tmpdir/reloc.so -z norelro -L/var/tmp/portage/sys-devel/binutils-2.35.1/work/bi nutils-2.35.1/ld/testsuite/ld-powerpc -melf32ppc -shared -z nocombreloc tmpdir/reloc.o 2>&1} /dev/null ld.tmp (timeout = 300) spawn [open ...] /var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/.libs/ld-new: warning: creating DT_TEXTREL in a shared object /var/tmp/portage/sys-devel/binutils-2.35.1/work/build/ld/.libs/ld-new: warning: creating DT_TEXTREL in a shared object FAIL: Reloc section order The test itself does not seem to have space for TEXTRELs: ld/testsuite/ld-powerpc/reloc.s .section echidna .long .text .section platypus,"ax" .long .text .text b _start@plt nop Let's see where it comes from. The test itself: # Actions: # objdump: Apply objdump options on result. Compare with regex (last arg). # nm: Apply nm options on result. Compare with regex (last arg). # readelf: Apply readelf options on result. Compare with regex (last arg) set ppcelftests { {"Reloc section order" "-melf32ppc -shared -z nocombreloc" "" "-a32" {reloc.s} {{objdump -hw reloc.d}} "reloc.so"} ... ld $ ../gas/as-new -o reloc.o -a32 reloc.s ld $ ./ld-new --hash-style=sysv -o reloc.so -z norelro -melf32ppc -shared -z nocombreloc reloc.o ld-new: warning: creating DT_TEXTREL in a shared object ld $ LANG=C ../binutils/objdump -hw reloc.so reloc.so: file format elf32-powerpc Sections: Idx Name Size VMA LMA File off Algn Flags 0 .hash 00000018 00000094 00000094 00000094 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .dynsym 00000030 000000ac 000000ac 000000ac 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .dynstr 00000008 000000dc 000000dc 000000dc 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .relaplatypus 0000000c 000000e4 000000e4 000000e4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .rela.plt 0000000c 000000f0 000000f0 000000f0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .text 00000008 000000fc 000000fc 000000fc 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE 6 platypus 00000004 00000104 00000104 00000104 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE 7 .eh_frame 00000000 00000108 00000108 00000108 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .dynamic 000000a0 00010108 00010108 00000108 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .got 00000010 000101a8 000101a8 000001a8 2**2 CONTENTS, ALLOC, LOAD, CODE 10 .plt 00000054 000101b8 000101b8 000001b8 2**2 ALLOC, CODE 11 echidna 00000004 00000000 00000000 000001b8 2**0 CONTENTS, READONLY I'm not sure whar 'reloc.d' regexp corresponds to. Ah, 'reloc.d' is actually a complex regex script on it's own: """ # Test that orphan reloc sections are placed before .rela.plt even when # .rela.plt is the only reloc section. #source: reloc.s #ld: -shared -z nocombreloc #objdump: -hw .*: +file format elf.* #... .*\.relaplatypus.* #... .*\.rela\.plt.* #pass """ It's an effect of '--enable-textrel-check=warning' option. On upstream binutils it's enough to trigger it as: $ ../binutils-gdb/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=powerpc-unknown-linux-gnu --enable-textrel-check=warning $ make $ make -C ld check RUNTESTFLAGS='powerpc.exp' Running /home/slyfox/dev/git/binutils-gdb/ld/testsuite/ld-powerpc/powerpc.exp ... FAIL: Reloc section order FAIL: TLS32 shared FAIL: TLS shared FAIL: TLSTOC shared FAIL: ld-powerpc/dotsym3 FAIL: ld-powerpc/dotsym4 FAIL: ld-powerpc/ppc476-shared FAIL: ld-powerpc/ppc476-shared2 I think the errors are real as TEXTRELs are present in section: """ # LANG=C objdump -d -R reloc.so reloc.so: file format elf32-powerpc Disassembly of section .text: 000000fc <.text>: fc: 48 01 01 04 b 10200 <_start@plt> 100: 60 00 00 00 nop Disassembly of section platypus: 00000104 <platypus>: 104: 00 00 00 00 .long 0x0 104: R_PPC_RELATIVE *ABS*+0xfc """ The warnings are expected. Filed https://sourceware.org/PR26882 upstream. Fixed upstream in 2.36: https://sourceware.org/bugzilla/show_bug.cgi?id=26882 |