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, testsuite] Require shared library support for -z {common,nocommon} tests


  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.


2016-05-02  Senthil Kumar Selvaraj  <>

	* 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.

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