#include "elf/common.h"
#include "elf/internal.h"
+#include "elf/mips.h"
+extern bfd_boolean _bfd_mips_elf_mkobject
+ (bfd *);
extern bfd_boolean _bfd_mips_elf_new_section_hook
(bfd *, asection *);
extern void _bfd_mips_elf_symbol_processing
struct elf_link_hash_entry *);
extern bfd_boolean _bfd_mips_elf_ignore_discarded_relocs
(asection *);
+extern bfd_boolean _bfd_mips_elf_is_target_special_symbol
+ (bfd *abfd, asymbol *sym);
extern bfd_boolean _bfd_mips_elf_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, asymbol **);
-extern bfd_boolean _bfd_mips_elf_mkobject
- (bfd *);
+extern bfd_boolean _bfd_mips_elf_relax_section
+ (bfd *abfd, asection *sec, struct bfd_link_info *link_info,
+ bfd_boolean *again);
extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create
(bfd *);
extern struct bfd_link_hash_table *_bfd_mips_vxworks_link_hash_table_create
extern bfd_boolean _bfd_mips_elf_read_ecoff_info
(bfd *, asection *, struct ecoff_debug_info *);
-extern void _bfd_mips16_elf_reloc_unshuffle
+extern void _bfd_mips_elf_reloc_unshuffle
(bfd *, int, bfd_boolean, bfd_byte *);
-extern void _bfd_mips16_elf_reloc_shuffle
+extern void _bfd_mips_elf_reloc_shuffle
(bfd *, int, bfd_boolean, bfd_byte *);
extern bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp
(bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma);
(struct elf_link_hash_entry *);
extern void _bfd_mips_elf_use_plts_and_copy_relocs
(struct bfd_link_info *);
+extern void _bfd_mips_elf_insn32
+ (struct bfd_link_info *, bfd_boolean);
extern bfd_boolean _bfd_mips_elf_init_stubs
(struct bfd_link_info *,
asection *(*) (const char *, asection *, asection *));
extern bfd_vma _bfd_mips_elf_plt_sym_val
(bfd_vma, const asection *, const arelent *rel);
+extern long _bfd_mips_elf_get_synthetic_symtab
+ (bfd *, long, asymbol **, long, asymbol **, asymbol **);
extern void _bfd_mips_post_process_headers
(bfd *abfd, struct bfd_link_info *link_info);
extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *);
+static inline bfd_boolean
+gprel16_reloc_p (unsigned int r_type)
+{
+ return (r_type == R_MIPS_GPREL16
+ || r_type == R_MIPS16_GPREL
+ || r_type == R_MICROMIPS_GPREL16
+ || r_type == R_MICROMIPS_GPREL7_S2);
+}
+
+static inline bfd_boolean
+literal_reloc_p (int r_type)
+{
+ return r_type == R_MIPS_LITERAL || r_type == R_MICROMIPS_LITERAL;
+}
+
#define elf_backend_common_definition _bfd_mips_elf_common_definition
#define elf_backend_name_local_section_symbols \
_bfd_mips_elf_name_local_section_symbols