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]

[PATCH] Use `supports_gnu_unique' with the `unique_symbol' and `type' tests

Complement commit a43942db49b0 ("LD/ELF: Unify STB_GNU_UNIQUE handling")
and use `supports_gnu_unique' with the `unique_symbol' and `type tests,
fixing failures like:

.../binutils/testsuite/binutils-all/unique.s: Assembler messages:
.../binutils/testsuite/binutils-all/unique.s:2: Error: symbol type "gnu_unique_object" is supported only by GNU targets

ERROR: .../binutils/testsuite/binutils-all/unique.s: assembly failed
UNRESOLVED: ar unique symbol in archive
.../binutils/ar -s -r -c tmpdir/artest.a tmpdir/unique.o
Executing on host: .../binutils/ar -s -r -c tmpdir/artest.a tmpdir/unique.o   (timeout = 300)
.../binutils/ar: tmpdir/unique.o: No such file or directory

FAIL: ar unique symbol in archive


.../gas/testsuite/gas/elf/type.s: Assembler messages:
.../gas/testsuite/gas/elf/type.s:30: Error: symbol type "gnu_unique_object" is supported only by GNU targets
../as-new: BFD (GNU Binutils) internal error, aborting at .../gas/write.c:608 in size_seg

../as-new: Please report this bug.

.../gas/testsuite/../../binutils/readelf -s dump.o | grep "1 *\[FIONTCU\]" > dump.out
Executing on host: sh -c {.../gas/testsuite/../../binutils/readelf -s dump.o >readelf.out 2>gas.stderr}  /dev/null  (timeout = 300)
readelf: Error: dump.o: Failed to read file's magic number
FAIL: elf type list

on MIPS/FreeBSD targets:

mips-freebsd  -FAIL: ar unique symbol in archive
mips-freebsd  -FAIL: elf type list
mips64-freebsd  -FAIL: ar unique symbol in archive
mips64-freebsd  -FAIL: elf type list
mips64el-freebsd  -FAIL: ar unique symbol in archive
mips64el-freebsd  -FAIL: elf type list
mipsel-freebsd  -FAIL: ar unique symbol in archive
mipsel-freebsd  -FAIL: elf type list

	* testsuite/binutils-all/ar.exp: Use `supports_gnu_unique' with
	the `unique_symbol' test.

	* testsuite/gas/elf/elf.exp: Use `supports_gnu_unique' with the
	`type' test.

 This has been regression-tested against the usual 162 targets.  OK to 

 While testing this I've noticed an `alpha-unknown-freebsd4.7' progression 
has gone and this is due to your recent change with commit 96037eb0b8c2 
("Fix various binutils testsuite failures.") to exclude `alpha-*-*' from 
`ar.exp' testing.  I think it is too broad, I think only non-ELF (ECOFF) 
Alpha targets might have problems with `ar.exp' (except for the GNU unique 
feature, handled here) as these tests used to pass for ELF targets like 
`alpha-linux', `alpha-netbsd' or said `alpha-unknown-freebsd4.7'.  So I 
think you have unnecessarily reduced coverage (assuming that any failures 
for ECOFF were due to a shortcoming of that format rather than our bug).

 I think updating the condition to say:

if { [istarget "alpha-*-*"] && ![is_elf_format] } then {

will do, however, unfortunately, I'm still busy with 2.27 clean-ups, so I 
can't even afford machine cycles for testing this refined update to your 
sledgehammer approach -- will you therefore please look into it yourself?

 NB I have separate fixes for the assertion failure noted above and the 
bug in the assertion message itself, and will post them later today, once 
their final testing has completed.


Index: binutils/binutils/testsuite/binutils-all/ar.exp
--- binutils.orig/binutils/testsuite/binutils-all/ar.exp	2016-06-28 02:27:39.363846765 +0100
+++ binutils/binutils/testsuite/binutils-all/ar.exp	2016-06-28 11:02:06.035732560 +0100
@@ -619,8 +619,6 @@ delete_an_element
-if { [is_elf_format]
-     && ![istarget "*-*-hpux*"]
-     && ![istarget "msp*-*-*"] } {
+if { [is_elf_format] && [supports_gnu_unique] } {
Index: binutils/gas/testsuite/gas/elf/elf.exp
--- binutils.orig/gas/testsuite/gas/elf/elf.exp	2016-06-28 02:27:51.197241615 +0100
+++ binutils/gas/testsuite/gas/elf/elf.exp	2016-06-28 11:02:06.081706122 +0100
@@ -184,12 +184,12 @@ if { [is_elf_format] } then {
     # The non-eabi ARM ports sets it to ELFOSABI_ARM.
     # So for these targets we cannot include an IFUNC symbol type
     # in the symbol type test.
-    # The Alpha FreeBSD target does not support unique objects.
+    # We also need to exclude targets that do not support unique objects.
     if {    [istarget "*-*-hpux*"]
-	 || [istarget "alpha*-*-*freebsd*"]
 	 || [istarget "arm*-*-*"]
 	 || [istarget "msp*-*-*"]
 	 || [istarget "visium-*-*"]
+	 || ![supports_gnu_unique]
      } then {
 	# hppa64 has a non-standard common directive
 	if { ![istarget "hppa64*-*-hpux*"] } then {

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