aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorDimitar Dimitrov <dimitar@dinux.eu>2017-12-13 13:08:50 +0000
committerNick Clifton <nickc@redhat.com>2017-12-13 13:09:59 +0000
commit024d185c10a48339ae06634d0738dd796a159cd8 (patch)
tree0861482eadc0fa2a1109d6ca80a23cfab23cf106 /gas
parent10e7c0457cb7531f8b205e29e88b3e191cfa6037 (diff)
downloadfsf-binutils-gdb-024d185c10a48339ae06634d0738dd796a159cd8.zip
fsf-binutils-gdb-024d185c10a48339ae06634d0738dd796a159cd8.tar.gz
fsf-binutils-gdb-024d185c10a48339ae06634d0738dd796a159cd8.tar.bz2
This patch enables disassembler_needs_relocs for PRU. It is needed to print correct symbols when disassembling arguments of "call" instructions with a relocation.
opcodes * disassemble.c: Enable disassembler_needs_relocs for PRU. gas * testsuite/gas/pru/extern.s: New test for print of U16_PMEMM relocation. * testsuite/gas/pru/extern.d: New test driver.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/testsuite/gas/pru/extern.d10
-rw-r--r--gas/testsuite/gas/pru/extern.s5
3 files changed, 21 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 99cd425..dcc4cb8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2017-12-13 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * testsuite/gas/pru/extern.s: New test for print of U16_PMEMM
+ relocation.
+ * testsuite/gas/pru/extern.d: New test driver.
+
2017-12-12 Alan Modra <amodra@gmail.com>
PR 21118
diff --git a/gas/testsuite/gas/pru/extern.d b/gas/testsuite/gas/pru/extern.d
new file mode 100644
index 0000000..e06f758
--- /dev/null
+++ b/gas/testsuite/gas/pru/extern.d
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: PRU extern function call dump
+
+# Test dumping of U16_PMEMIMM relocation
+
+.*: +file format elf32-pru
+
+Disassembly of section .text:
+0+0000 <[^>]*> 230000c3 call 00000000 <myextfunc>
+[\t ]*0: R_PRU_U16_PMEMIMM[\t ]*myextfunc
diff --git a/gas/testsuite/gas/pru/extern.s b/gas/testsuite/gas/pru/extern.s
new file mode 100644
index 0000000..87380df
--- /dev/null
+++ b/gas/testsuite/gas/pru/extern.s
@@ -0,0 +1,5 @@
+# Source file used to test text dump of U16_PMEMIMM relocation
+
+ .extern myextfunc
+foo:
+ call myextfunc