This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] MIPS/opcodes: Only examine ELF file structures if SYMTAB_AVAILABLE
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Mon, 19 Dec 2016 11:43:56 +0000
- Subject: [committed] MIPS/opcodes: Only examine ELF file structures if SYMTAB_AVAILABLE
- Authentication-results: sourceware.org; auth=none
Correct commit 640c0ccdc980 ("some objdump -M options, better reg
dumps"), <https://sourceware.org/ml/binutils/2002-12/msg00706.html>, and
only execute code setting up disassembler options based on ELF file
structures if SYMTAB_AVAILABLE is set.
opcodes/
* mips-dis.c (set_default_mips_dis_options) [SYMTAB_AVAILABLE]:
Only examine ELF file structures here.
---
binutils-mips-opcodes-dis-nosymtab.diff
Index: binutils/opcodes/mips-dis.c
===================================================================
--- binutils.orig/opcodes/mips-dis.c 2016-12-19 09:47:48.000000000 +0000
+++ binutils/opcodes/mips-dis.c 2016-12-19 09:48:25.285678779 +0000
@@ -839,7 +839,6 @@ set_default_mips_dis_options (struct dis
mips_cp1_names = chosen_arch->cp1_names;
mips_hwr_names = chosen_arch->hwr_names;
}
-#endif
/* Update settings according to the ELF file header flags. */
if (info->flavour == bfd_target_elf_flavour && info->section != NULL)
@@ -859,6 +858,7 @@ set_default_mips_dis_options (struct dis
else if (header->e_flags & EF_MIPS_ARCH_ASE_MDMX)
mips_ase |= ASE_MDMX;
}
+#endif
}
static void