From 7beeaeb8c6d84ecc899b9454d9b92521e515fe4a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 23 Sep 2019 10:00:21 +0930 Subject: [PATCH] mips bfd.h tidy bfd/ * bfd-in.h: Move mips function declaration to.. * elfxx-mips.h: ..here. * bfd-in2.h: Regenerate. opcodes/ * mips-dis.c: Include elfxx-mips.h. Move "elf-bfd.h" and "elf/mips.h" earlier. --- bfd/ChangeLog | 6 ++++++ bfd/bfd-in.h | 4 ---- bfd/bfd-in2.h | 4 ---- bfd/elfxx-mips.h | 3 +++ opcodes/ChangeLog | 5 +++++ opcodes/mips-dis.c | 5 +++-- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 906ff1d2b4d..d5521fb6dc1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-09-23 Alan Modra + + * bfd-in.h: Move mips function declaration to.. + * elfxx-mips.h: ..here. + * bfd-in2.h: Regenerate. + 2019-09-23 Alan Modra * bfd-in.h: Move csky function declarations to.. diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 56a006e9cce..c2105e3a94e 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1019,7 +1019,3 @@ extern bfd_boolean v850_elf_create_sections extern bfd_boolean v850_elf_set_note (bfd *, unsigned int, unsigned int); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 1aa2975bd40..9960163e277 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1026,10 +1026,6 @@ extern bfd_boolean v850_elf_create_sections extern bfd_boolean v850_elf_set_note (bfd *, unsigned int, unsigned int); - -/* MIPS ABI flags data access. For the disassembler. */ -struct elf_internal_abiflags_v0; -extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); /* Extracted from init.c. */ unsigned int bfd_init (void); diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h index 8e796a99d9d..fe0e50ff398 100644 --- a/bfd/elfxx-mips.h +++ b/bfd/elfxx-mips.h @@ -176,6 +176,9 @@ extern int _bfd_mips_elf_cant_unwind_opcode (struct bfd_link_info *); extern void _bfd_mips_elf_record_xhash_symbol (struct elf_link_hash_entry *h, bfd_vma xlat_loc); +/* MIPS ABI flags data access. For the disassembler. */ +extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); + static inline bfd_boolean gprel16_reloc_p (unsigned int r_type) { diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 0043d4eb167..91b084ef8ae 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2019-09-23 Alan Modra + + * mips-dis.c: Include elfxx-mips.h. Move "elf-bfd.h" and + "elf/mips.h" earlier. + 2018-09-20 Jan Beulich PR gas/25012 diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index 5bf33d9f8fd..84188418421 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -24,6 +24,9 @@ #include "libiberty.h" #include "opcode/mips.h" #include "opintl.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "elfxx-mips.h" /* FIXME: These are needed to figure out if the code is mips16 or not. The low bit of the address is often a good indicator. No @@ -32,8 +35,6 @@ #if !defined(EMBEDDED_ENV) #define SYMTAB_AVAILABLE 1 -#include "elf-bfd.h" -#include "elf/mips.h" #endif /* Mips instructions are at maximum this many bytes long. */