This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Use `supports_gnu_unique' with the `unique_symbol' and `type' tests
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 28 Jun 2016 12:58:17 -0000
- Subject: [binutils-gdb] Use `supports_gnu_unique' with the `unique_symbol' and `type' tests
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eb9bb5b4ece9208257d85bc22a0f32ddf33f6a46
commit eb9bb5b4ece9208257d85bc22a0f32ddf33f6a46
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Tue Jun 28 13:21:36 2016 +0100
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
and:
.../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) 2.26.51.20160628 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
binutils/
* testsuite/binutils-all/ar.exp: Use `supports_gnu_unique' with
the `unique_symbol' test.
gas/
* testsuite/gas/elf/elf.exp: Use `supports_gnu_unique' with the
`type' test.
Diff:
---
binutils/ChangeLog | 5 +++++
binutils/testsuite/binutils-all/ar.exp | 4 +---
gas/ChangeLog | 5 +++++
gas/testsuite/gas/elf/elf.exp | 4 ++--
4 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index cfea09b..a36eabc 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-28 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/binutils-all/ar.exp: Use `supports_gnu_unique' with
+ the `unique_symbol' test.
+
2016-06-28 Alan Modra <amodra@gmail.com>
PR 20304
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
index b8e0e20..604ebdc 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -619,8 +619,6 @@ delete_an_element
move_an_element
empty_archive
-if { [is_elf_format]
- && ![istarget "*-*-hpux*"]
- && ![istarget "msp*-*-*"] } {
+if { [is_elf_format] && [supports_gnu_unique] } {
unique_symbol
}
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 14adc82..c49d9dc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-28 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/gas/elf/elf.exp: Use `supports_gnu_unique' with the
+ `type' test.
+
2016-06-28 Alan Modra <amodra@gmail.com>
PR gas/20247
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 3e85ae2..d57665e 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -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 {