opcodes: Use autoconf to check for `bfd_mips_elf_get_abiflags' in BFD

Fix a regression introduced with commit 5e7fc731f8 ("MIPS/opcodes:
Also set disassembler's ASE flags from ELF structures"), further updated
with commit 4df995c771 ("MIPS/opcodes: Also set disassembler's ASE
flags from ELF structures"), and use autoconf to check for the presence
of `bfd_mips_elf_get_abiflags' in BFD.

	opcodes/
	* mips-dis.c (set_default_mips_dis_options): Use
	HAVE_BFD_MIPS_ELF_GET_ABIFLAGS rather than BFD64 to guard the
	call to `bfd_mips_elf_get_abiflags'.
	* configure.ac: Check for `bfd_mips_elf_get_abiflags' in BFD.
	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add `libbfd.la'.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* config.in: Regenerate.
	* Makefile.in: Regenerate.
This commit is contained in:
Maciej W. Rozycki 2016-12-23 12:11:12 +00:00
parent 5b362f04b2
commit 9e76c212e6
8 changed files with 150 additions and 12 deletions

View file

@ -847,11 +847,12 @@ set_default_mips_dis_options (struct disassemble_info *info)
Elf_Internal_Ehdr *header = elf_elfheader (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
/* We won't ever get here if !HAVE_BFD_MIPS_ELF_GET_ABIFLAGS,
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, or with MIPS/ECOFF configurations. */
#ifdef HAVE_BFD_MIPS_ELF_GET_ABIFLAGS
abiflags = bfd_mips_elf_get_abiflags (abfd);
#endif
/* If an ELF "newabi" binary, use the n32/(n)64 GPR names. */