diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-04-03 10:08:29 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2017-04-04 08:29:16 -0700 |
commit | b52920324fabbcad93042f2e17de52696d0dab42 (patch) | |
tree | 35f0068b46fd2e207feba053509415467c86ac11 /opcodes | |
parent | 65dd1e590e519eba10bc29fb6e952271e0604c9b (diff) | |
download | gdb-b52920324fabbcad93042f2e17de52696d0dab42.zip gdb-b52920324fabbcad93042f2e17de52696d0dab42.tar.gz gdb-b52920324fabbcad93042f2e17de52696d0dab42.tar.bz2 |
RISC-V: Resurrect GP-relative disassembly hints
We missed a "_gp" when changing the GP symbol. To make sure that
doesn't happen again, we now use the same definition everywhere (thanks,
Nick).
include/ChangeLog:
2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
* elf/riscv.h (RISCV_GP_SYMBOL): New define.
bfd/ChangeLog:
2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
* elfnn-riscv.c (GP_NAME): Delete.
(riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
(_bfd_riscv_relax_lui): Likewise.
opcodes/ChangeLog:
2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
* riscv-dis.c (riscv_disassemble_insn): Change "_gp" to
RISCV_GP_SYMBOL.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/riscv-dis.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 07262aa..ce6ee40 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2017-04-03 Palmer Dabbelt <palmer@dabbelt.com> + + * riscv-dis.c (riscv_disassemble_insn): Change "_gp" to + RISCV_GP_SYMBOL. + 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..d760d70 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]), RISCV_GP_SYMBOL) == 0) pd->gp = bfd_asymbol_value (info->symtab[i]); } else |