aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlyssa Milburn <amilburn@zall.org>2016-12-04 22:59:18 -0800
committerJose E. Marchesi <jose.marchesi@oracle.com>2016-12-04 22:59:18 -0800
commit597e138ca0cf96889a1965d06d28552c1d1174d2 (patch)
tree7260625ac8e8cc05479232f4b7cd08e54374a4c9 /ld
parenta55c9876bb111fd301b4762cf501de0040b8f9db (diff)
downloadgdb-597e138ca0cf96889a1965d06d28552c1d1174d2.zip
gdb-597e138ca0cf96889a1965d06d28552c1d1174d2.tar.gz
gdb-597e138ca0cf96889a1965d06d28552c1d1174d2.tar.bz2
bfd,ld: Continue after partially-successful relaxed call relocations in sparc.
bfd/ChangeLog: 2016-12-05 Alyssa Milburn <amilburn@zall.org> * elfxx-sparc.c: Do not stop processing relocations after partially relaxing a call with WDISP30. ld/ChangeLog: 2016-12-05 Alyssa Milburn <amilburn@zall.org> * testsuite/ld-sparc/wdispcall.s: New file. * testsuite/ld-sparc/wdispcall.dd: Likewise. * testsuite/ld-sparc/sparc.exp: Run new test.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/testsuite/ld-sparc/sparc.exp3
-rw-r--r--ld/testsuite/ld-sparc/wdispcall.dd18
-rw-r--r--ld/testsuite/ld-sparc/wdispcall.s14
4 files changed, 41 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 90283e3..3529834 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-05 Alyssa Milburn <amilburn@zall.org>
+
+ * testsuite/ld-sparc/wdispcall.s: New file.
+ * testsuite/ld-sparc/wdispcall.dd: Likewise.
+ * testsuite/ld-sparc/sparc.exp: Run new test.
+
2016-12-03 Alan Modra <amodra@gmail.com>
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't call
diff --git a/ld/testsuite/ld-sparc/sparc.exp b/ld/testsuite/ld-sparc/sparc.exp
index e58a21f..ec92d12 100644
--- a/ld/testsuite/ld-sparc/sparc.exp
+++ b/ld/testsuite/ld-sparc/sparc.exp
@@ -94,6 +94,9 @@ set sparctests {
{{readelf -WSsrl gotop32.rd} {objdump -drj.text gotop32.dd}
{objdump -sj.got gotop32.sd} {objdump -sj.data gotop32.td}}
"libgotop32.so"}
+ {"relaxed call WDISP30 relocation" "-static -melf32_sparc -relax" ""
+ "--32" {wdispcall.s}
+ {{objdump -dj.wdispcall wdispcall.dd}} "wdispcall"}
}
set sparc64tests {
{"64-bit: TLS -fpic -shared transitions" "-shared -melf64_sparc" ""
diff --git a/ld/testsuite/ld-sparc/wdispcall.dd b/ld/testsuite/ld-sparc/wdispcall.dd
new file mode 100644
index 0000000..ab06a56
--- /dev/null
+++ b/ld/testsuite/ld-sparc/wdispcall.dd
@@ -0,0 +1,18 @@
+#source: wdispcall.s
+#as: --32
+#ld: -static -melf32_sparc -relax
+#objdump: -dj.wdispcall
+#target: sparc*-*-*
+
+.*: +file format elf32-sparc
+
+Disassembly of section .wdispcall:
+
+00000000 <foo>:
+ +0: 01 00 00 00 nop *
+ +4: 10 80 40 ff b 10400 <bar>
+ +8: 9e 10 40 00 mov %g1, %o7
+ +c: 01 00 00 00 nop *
+ +10: 40 00 40 fc call 10400 <bar>
+ +14: 01 00 00 00 nop *
+
diff --git a/ld/testsuite/ld-sparc/wdispcall.s b/ld/testsuite/ld-sparc/wdispcall.s
new file mode 100644
index 0000000..0b05cad
--- /dev/null
+++ b/ld/testsuite/ld-sparc/wdispcall.s
@@ -0,0 +1,14 @@
+ .text
+bar:
+ retl
+ nop
+
+ .align 1024
+ .section ".wdispcall"
+foo:
+ nop
+ call bar
+ or %r1, %g0, %o7
+ nop
+ call bar
+ nop