This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] RISC-V: Resurrect GP-relative disassembly hints
- From: Palmer Dabbelt <palmer at dabbelt dot com>
- To: binutils at sourceware dot org
- Cc: Palmer Dabbelt <palmer at dabbelt dot com>
- Date: Fri, 31 Mar 2017 16:17:22 -0700
- Subject: [PATCH] RISC-V: Resurrect GP-relative disassembly hints
- Authentication-results: sourceware.org; auth=none
We missed a "_gp" when changing the GP symbol.
2017-03-31 Palmer Dabbelt <palmer@dabbelt.com>
* riscv-dis.c (riscv_disassemble_insn): Change _gp to
__global_pointer$.
---
opcodes/ChangeLog | 5 +++++
opcodes/riscv-dis.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 07262aa..0058b46 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-31 Palmer Dabbelt <palmer@dabbelt.com>
+
+ * riscv-dis.c (riscv_disassemble_insn): Change _gp to
+ __global_pointer$.
+
2017-03-30 Pip Cet <pipcet@gmail.com>
* configure.ac: Add (empty) bfd_wasm32_arch target.
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
index 20b6854..5df61c2 100644
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -384,7 +384,7 @@ riscv_disassemble_insn (bfd_vma memaddr, insn_t word, disassemble_info *info)
pd->hi_addr[i] = -1;
for (i = 0; i < info->symtab_size; i++)
- if (strcmp (bfd_asymbol_name (info->symtab[i]), "_gp") == 0)
+ if (strcmp (bfd_asymbol_name (info->symtab[i]), "__global_pointer$") == 0)
pd->gp = bfd_asymbol_value (info->symtab[i]);
}
else
--
2.10.2