diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d247bac90b..2618f90850 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2016-12-19 Maciej W. Rozycki + + * mips-dis.c (set_default_mips_dis_options) [BFD64]: Only call + `bfd_mips_elf_get_abiflags' here. + 2016-12-16 Nick Clifton * arm-dis.c (print_insn_thumb32): Fix compile time warning diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index c30bbd0207..cd9893e70e 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -846,8 +846,15 @@ set_default_mips_dis_options (struct disassemble_info *info) { struct bfd *abfd = info->section->owner; Elf_Internal_Ehdr *header = elf_elfheader (abfd); - Elf_Internal_ABIFlags_v0 *abiflags = bfd_mips_elf_get_abiflags (abfd); + Elf_Internal_ABIFlags_v0 *abiflags = NULL; + /* We won't ever get here if !BFD64, because we won't then have + a MIPS/ELF BFD, however we need to guard against a link error + in a `--enable-targets=...' configuration with a 32-bit host, + where the MIPS target is a secondary. */ +#ifdef BFD64 + abiflags = bfd_mips_elf_get_abiflags (abfd); +#endif /* If an ELF "newabi" binary, use the n32/(n)64 GPR names. */ if (is_newabi (header)) mips_gpr_names = mips_gpr_names_newabi;