Skip ELF STT_COMMON linker tests if shared libraries are not supported.
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Tue, 3 May 2016 09:44:35 +0000 (10:44 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 3 May 2016 09:44:35 +0000 (10:44 +0100)
* testsuite/ld-elfcomm/elfcomm.exp: Check for shared lib support
before running STT_COMMON tests.

ld/ChangeLog
ld/testsuite/ld-elfcomm/elfcomm.exp

index aecf58162cf369ab4119b5783880454598c866d8..92596b7fe612172dc0c5e0f71baeb1b939f56e37 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-03  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       * testsuite/ld-elfcomm/elfcomm.exp: Check for shared lib support
+       before running STT_COMMON tests.
+
 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/default.exp (NOPIE_CFLAGS): Download source only on
index 926b98ce7a05183af6a1f2c264af622e467ff941..fd32e02ed7a85b33b6509742ce59ae867df85fbd 100644 (file)
@@ -246,6 +246,14 @@ if { [dump_common1 $test1c2] } {
 #
 # The following tests are for when we are generating STT_COMMON symbols only.
 #
+# Handling of -z common and -z nocommon flags is enabled only if
+# $GENERATE_SHLIB_SCRIPT is turned on in emulparams i.e. shared
+# libraries are supported.
+
+if ![check_shared_lib_support]  {
+    return
+}
+
 stt_common_test "-static -e 0" "static link of common symbols"
 stt_common_test "-shared"      "shared link of common symbols"
 stt_common_test "-pie"         "position independent link of common symbols"