X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bfd%2Felfn32-mips.c;h=1e42faaf53781b9ba84a6c5208564576249dfa58;hb=8992f0d7c2d63ad6b5c102572be103791c6a958e;hp=b1211f0c65e56de8e2ccfcc2b05fd63ce718aa27;hpb=01f0fe5e0450edf168c1f612feb93cf588e4e7ea;p=binutils-gdb.git diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index b1211f0c65e..1e42faaf537 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -61,8 +61,6 @@ static bfd_reloc_status_type gprel32_with_gp (bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma); static bfd_reloc_status_type mips_elf_shift6_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_reloc_status_type mips16_jump_reloc - (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips16_gprel_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup @@ -1444,7 +1442,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] = /* This needs complex overflow detection, because the upper four bits must match the PC. */ - mips16_jump_reloc, /* special_function */ + _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ TRUE, /* partial_inplace */ 0x3ffffff, /* src_mask */ @@ -1516,7 +1514,7 @@ static reloc_howto_type elf_mips16_howto_table_rela[] = /* This needs complex overflow detection, because the upper four bits must match the PC. */ - mips16_jump_reloc, /* special_function */ + _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ FALSE, /* partial_inplace */ 0x3ffffff, /* src_mask */ @@ -1901,28 +1899,6 @@ mips_elf_shift6_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, error_message); } -/* Handle a mips16 jump. */ - -static bfd_reloc_status_type -mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED, - arelent *reloc_entry ATTRIBUTE_UNUSED, - asymbol *symbol ATTRIBUTE_UNUSED, - void *data ATTRIBUTE_UNUSED, - asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED, - char **error_message ATTRIBUTE_UNUSED) -{ - static bfd_boolean warned = FALSE; - - /* FIXME. */ - if (! warned) - (*_bfd_error_handler) - (_("Linking mips16 objects into %s format is not supported"), - bfd_get_target (input_section->output_section->owner)); - warned = TRUE; - - return bfd_reloc_undefined; -} - /* Handle a mips16 GP relative reloc. */ static bfd_reloc_status_type @@ -2317,6 +2293,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define elf_backend_create_dynamic_sections \ _bfd_mips_elf_create_dynamic_sections #define elf_backend_check_relocs _bfd_mips_elf_check_relocs +#define elf_backend_merge_symbol_attribute \ + _bfd_mips_elf_merge_symbol_attribute #define elf_backend_adjust_dynamic_symbol \ _bfd_mips_elf_adjust_dynamic_symbol #define elf_backend_always_size_sections \ @@ -2380,10 +2358,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define TARGET_BIG_SYM bfd_elf32_nbigmips_vec #define TARGET_BIG_NAME "elf32-nbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses - a value of 0x1000, and we are compatible. - FIXME: How does this affect NewABI? */ -#define ELF_MAXPAGESIZE 0x1000 +#define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #include "elf32-target.h" @@ -2394,15 +2370,15 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #undef TARGET_BIG_NAME #undef ELF_MAXPAGESIZE +#undef ELF_COMMONPAGESIZE #define TARGET_LITTLE_SYM bfd_elf32_ntradlittlemips_vec #define TARGET_LITTLE_NAME "elf32-ntradlittlemips" #define TARGET_BIG_SYM bfd_elf32_ntradbigmips_vec #define TARGET_BIG_NAME "elf32-ntradbigmips" -/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses - page sizes of up to that limit, so we need to respect it. */ #define ELF_MAXPAGESIZE 0x10000 +#define ELF_COMMONPAGESIZE 0x1000 #define elf32_bed elf32_tradbed /* Include the target file again for this target. */