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] PowerPC64 fails reloc-discard test


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

commit 49ddb0fbdad2bdf5ff4fcbcf50470f16c0f1f34a
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jul 23 12:31:18 2018 +0930

    PowerPC64 fails reloc-discard test
    
    PowerPC64 fails here due to emitting a warning about discarded dynamic
    relocations.  That's a good thing, since accidentally discarding
    dynamic relocations will likely result in a non-working binary.
    
    	* testsuite/ld-elf/reloc-discard-warn.d: New.
    	* testsuite/ld-elf/reloc-discard.d: Skip test on PowerPC64.

Diff:
---
 ld/ChangeLog                             |  5 +++++
 ld/testsuite/ld-elf/reloc-discard-warn.d | 10 ++++++++++
 ld/testsuite/ld-elf/reloc-discard.d      |  3 +++
 3 files changed, 18 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 573e777..cbff2d0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-23  Alan Modra  <amodra@gmail.com>
+
+	* testsuite/ld-elf/reloc-discard-warn.d: New.
+	* testsuite/ld-elf/reloc-discard.d: Skip test on PowerPC64.
+
 2018-07-20  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* testsuite/ld-elf/reloc-discard.ld: Discard .rel.* and .rela.*
diff --git a/ld/testsuite/ld-elf/reloc-discard-warn.d b/ld/testsuite/ld-elf/reloc-discard-warn.d
new file mode 100644
index 0000000..492abfa
--- /dev/null
+++ b/ld/testsuite/ld-elf/reloc-discard-warn.d
@@ -0,0 +1,10 @@
+#name: Discarded dynamic relocation section
+#ld: -shared -T reloc-discard.ld
+#readelf: -r --use-dynamic
+#target: [check_shared_lib_support]
+#noskip: powerpc64*-*-*
+#source: reloc-discard.s
+#warning: .*discarding dynamic section.*
+# More targets should be using this variant of reloc-discard.d.
+
+There are no dynamic relocations in this file\.
diff --git a/ld/testsuite/ld-elf/reloc-discard.d b/ld/testsuite/ld-elf/reloc-discard.d
index b8aad88..dd2c99b 100644
--- a/ld/testsuite/ld-elf/reloc-discard.d
+++ b/ld/testsuite/ld-elf/reloc-discard.d
@@ -2,9 +2,12 @@
 #ld: -shared -T reloc-discard.ld
 #readelf: -r --use-dynamic
 #target: [check_shared_lib_support]
+#skip: powerpc64*-*-*
 #source: reloc-discard.s
 #xfail: nds32*-*-* tic6x-*-*
 # Need to figure out how to pass `-fpic' for NDS32 or `-mpic -mpid=near'
 # for TI C6X targets to GAS for this test.
+# PowerPC64 warns when discarding dynamic relocs, which is generally
+# a good thing.  See reloc-discard-warn.d test variant.
 
 There are no dynamic relocations in this file\.


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