This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch, testsuite] Require shared library support for -z {common,nocommon} tests
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: <binutils at sourceware dot org>, <nickc at redhat dot com>, <hjl dot tools at gmail dot com>
- Date: Tue, 3 May 2016 07:49:02 +0530
- Subject: [Patch, testsuite] Require shared library support for -z {common,nocommon} tests
- Authentication-results: sourceware.org; auth=none
Hi,
When looking at ld test suite failures for the AVR target after adding
it to is_elf_format, I found that tests related to the recently added
-z {common,nocommon} linker option were failing.
According at emultempl/elf32.em, the option is handled only for
targets that generate a shared library linker script i.e.
GENERATE_SHLIB_SCRIPT is enabled. This is not enabled for avr, and the
tests fail because the linker warns that the options are ignored.
This patch skips those tests if check_shared_lib_support is not present.
If ok, could someone commit please? I don't have commit access.
Regards
Senthil
2016-05-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* testsuite/ld-elfcomm/elfcomm.exp: Check for shared lib support.
diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
index 926b98c..18ea130 100644
--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
+++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -243,6 +243,14 @@ if { [dump_common1 $test1c2] } {
pass $test1c2
}
+# 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
+}
+
#
# The following tests are for when we are generating STT_COMMON symbols only.
#