diff options
Diffstat (limited to 'opcodes/riscv-dis.c')
-rw-r--r-- | opcodes/riscv-dis.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index 9790820..f1bbfdb 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -518,6 +518,23 @@ print_insn_riscv (bfd_vma memaddr, struct disassemble_info *info) return riscv_disassemble_insn (memaddr, insn, info); } +/* Prevent use of the fake labels that are generated as part of the DWARF + and for relaxable relocations in the assembler. */ + +bfd_boolean +riscv_symbol_is_valid (asymbol * sym, + struct disassemble_info * info ATTRIBUTE_UNUSED) +{ + const char * name; + + if (sym == NULL) + return FALSE; + + name = bfd_asymbol_name (sym); + + return (strcmp (name, RISCV_FAKE_LABEL_NAME) != 0); +} + void print_riscv_disassembler_options (FILE *stream) { |