This is the mail archive of the binutils-cvs@sourceware.org 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]

[binutils-gdb] LD/testsuite: Add STB_GNU_UNIQUE cross-linker test


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c3fbf828add04de391d40883e4bdaf51500300d1

commit c3fbf828add04de391d40883e4bdaf51500300d1
Author: Maciej W. Rozycki <macro@imgtec.com>
Date:   Wed May 4 01:46:10 2016 +0100

    LD/testsuite: Add STB_GNU_UNIQUE cross-linker test
    
    Some targets are only really, or at least regularly, regression-tested
    in a crossed configuration.  Currently we only have native compiled test
    cases for the STB_GNU_UNIQUE feature in the linker test suite.  This is
    nice, covering run-time semantics even, but quite often not run at all.
    Consequently a regression may remain unnoticed for long.
    
    Add a simple test case then to provide basic linker coverage with no
    need for a compiler or a native toolchain.
    
    	ld/
    	* testsuite/ld-unique/unique.d: New test.
    	* testsuite/ld-unique/unique.exp: Run the new test.  Adjust
    	messages for compiled tests.

Diff:
---
 ld/ChangeLog                      | 6 ++++++
 ld/testsuite/ld-unique/unique.d   | 9 +++++++++
 ld/testsuite/ld-unique/unique.exp | 6 ++++--
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8549baa..5fae3c0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-04  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* testsuite/ld-unique/unique.d: New test.
+	* testsuite/ld-unique/unique.exp: Run the new test.  Adjust
+	messages for compiled tests.
+
 2016-05-04  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
 
 	* testsuite/ld-elf/pr18735.d: Allow other symbols.
diff --git a/ld/testsuite/ld-unique/unique.d b/ld/testsuite/ld-unique/unique.d
new file mode 100644
index 0000000..73c939b
--- /dev/null
+++ b/ld/testsuite/ld-unique/unique.d
@@ -0,0 +1,9 @@
+#ld: -r
+#readelf: -sh
+#name: Linker setting GNU OSABI on STB_GNU_UNIQUE symbol (PR 10549)
+
+#...
+ *OS/ABI: +UNIX - GNU
+#...
+ *[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +UNIQUE +DEFAULT +[0-9]+ a
+#pass
diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index c632a92..a34bc4c 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -42,19 +42,21 @@ if {!(([istarget "i?86-*-*"]
     return
 }
 
+run_dump_test "unique"
+
 # We need a native system.  FIXME: Strictly speaking this
 # is not true, we just need to know how to create a fully
 # linked executable, including the C and Z libraries, using
 # the linker that is under test.
 if ![isnative] {
-    verbose "UNIQUE tests not run - not a native toolchain"
+    verbose "UNIQUE compiled tests not run - not a native toolchain"
     return
 }
 
 # We need a working compiler.  (Strictly speaking this is
 # not true, we could use target specific assembler files).
 if { [which $CC] == 0 } {
-    verbose "UNIQUE tests not run - no compiler available"
+    verbose "UNIQUE compiled tests not run - no compiler available"
     return
 }


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