#include "bfd.h"#include "sysdep.h"#include "libbfd.h"#include "bfdlink.h"#include "genlink.h"#include "elf-bfd.h"#include "elfxx-mips.h"#include "elf/mips.h"#include "coff/sym.h"#include "coff/symconst.h"#include "coff/internal.h"#include "coff/ecoff.h"#include "coff/mips.h"#include "ecoffswap.h"#include "elf32-target.h"

Go to the source code of this file.
Definition at line 93 of file elf32-mips.c.
Referenced by _bfd_mips_elf_print_private_bfd_data(), elf_mips_abi_name(), mips_elf32_object_p(), and mips_elf_n32_object_p().
| #define bfd_elf32_bfd_final_link _bfd_mips_elf_final_link |
Definition at line 1586 of file elf32-mips.c.
| #define bfd_elf32_bfd_get_relocated_section_contents _bfd_elf_mips_get_relocated_section_contents |
Definition at line 1582 of file elf32-mips.c.
| #define bfd_elf32_bfd_is_local_label_name mips_elf_is_local_label_name |
Definition at line 1577 of file elf32-mips.c.
| #define bfd_elf32_bfd_link_hash_table_create _bfd_mips_elf_link_hash_table_create |
Definition at line 1584 of file elf32-mips.c.
| #define bfd_elf32_bfd_merge_private_bfd_data _bfd_mips_elf_merge_private_bfd_data |
Definition at line 1587 of file elf32-mips.c.
| #define bfd_elf32_bfd_print_private_bfd_data _bfd_mips_elf_print_private_bfd_data |
Definition at line 1590 of file elf32-mips.c.
| #define bfd_elf32_bfd_set_private_flags _bfd_mips_elf_set_private_flags |
Definition at line 1589 of file elf32-mips.c.
| #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line |
Definition at line 1579 of file elf32-mips.c.
| #define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook |
Definition at line 1580 of file elf32-mips.c.
| #define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents |
Definition at line 1581 of file elf32-mips.c.
| #define ECOFF_SIGNED_32 |
Definition at line 51 of file elf32-mips.c.
| #define elf32_bed elf32_tradbed |
Definition at line 1621 of file elf32-mips.c.
| #define ELF_ARCH bfd_arch_mips |
Definition at line 1519 of file elf32-mips.c.
| #define elf_backend_add_symbol_hook _bfd_mips_elf_add_symbol_hook |
Definition at line 1535 of file elf32-mips.c.
| #define elf_backend_additional_program_headers _bfd_mips_elf_additional_program_headers |
Definition at line 1554 of file elf32-mips.c.
| #define elf_backend_adjust_dynamic_symbol _bfd_mips_elf_adjust_dynamic_symbol |
Definition at line 1541 of file elf32-mips.c.
| #define elf_backend_always_size_sections _bfd_mips_elf_always_size_sections |
Definition at line 1543 of file elf32-mips.c.
| #define elf_backend_can_gc_sections TRUE |
Definition at line 1524 of file elf32-mips.c.
| #define elf_backend_check_relocs _bfd_mips_elf_check_relocs |
Definition at line 1540 of file elf32-mips.c.
| #define elf_backend_collect TRUE |
Definition at line 1522 of file elf32-mips.c.
| #define elf_backend_copy_indirect_symbol _bfd_mips_elf_copy_indirect_symbol |
Definition at line 1559 of file elf32-mips.c.
| #define elf_backend_create_dynamic_sections _bfd_mips_elf_create_dynamic_sections |
Definition at line 1538 of file elf32-mips.c.
| #define elf_backend_default_use_rela_p 0 |
Definition at line 1569 of file elf32-mips.c.
| #define elf_backend_discard_info _bfd_mips_elf_discard_info |
Definition at line 1572 of file elf32-mips.c.
| #define elf_backend_ecoff_debug_swap &mips_elf32_ecoff_debug_swap |
Definition at line 1564 of file elf32-mips.c.
Referenced by _bfd_mips_elf_final_link(), and elf64_alpha_final_link().
| #define elf_backend_fake_sections _bfd_mips_elf_fake_sections |
Definition at line 1532 of file elf32-mips.c.
| #define elf_backend_final_write_processing _bfd_mips_elf_final_write_processing |
Definition at line 1552 of file elf32-mips.c.
| #define elf_backend_finish_dynamic_sections _bfd_mips_elf_finish_dynamic_sections |
Definition at line 1550 of file elf32-mips.c.
| #define elf_backend_finish_dynamic_symbol _bfd_mips_elf_finish_dynamic_symbol |
Definition at line 1548 of file elf32-mips.c.
| #define elf_backend_gc_mark_hook _bfd_mips_elf_gc_mark_hook |
Definition at line 1557 of file elf32-mips.c.
| #define elf_backend_gc_sweep_hook _bfd_mips_elf_gc_sweep_hook |
Definition at line 1558 of file elf32-mips.c.
| #define elf_backend_got_header_size (4 * MIPS_RESERVED_GOTNO) |
Definition at line 1566 of file elf32-mips.c.
| #define elf_backend_grok_prstatus elf32_mips_grok_prstatus |
Definition at line 1562 of file elf32-mips.c.
| #define elf_backend_grok_psinfo elf32_mips_grok_psinfo |
Definition at line 1563 of file elf32-mips.c.
| #define elf_backend_hide_symbol _bfd_mips_elf_hide_symbol |
Definition at line 1561 of file elf32-mips.c.
| #define elf_backend_ignore_discarded_relocs _bfd_mips_elf_ignore_discarded_relocs |
Definition at line 1573 of file elf32-mips.c.
| #define elf_backend_link_output_symbol_hook _bfd_mips_elf_link_output_symbol_hook |
| #define elf_backend_may_use_rel_p 1 |
Definition at line 1567 of file elf32-mips.c.
| #define elf_backend_may_use_rela_p 0 |
Definition at line 1568 of file elf32-mips.c.
| #define elf_backend_mips_irix_compat elf32_mips_irix_compat |
Definition at line 1575 of file elf32-mips.c.
| #define elf_backend_mips_rtype_to_howto mips_elf32_rtype_to_howto |
Definition at line 1576 of file elf32-mips.c.
| #define elf_backend_modify_segment_map _bfd_mips_elf_modify_segment_map |
Definition at line 1556 of file elf32-mips.c.
| #define elf_backend_object_p mips_elf32_object_p |
Definition at line 1528 of file elf32-mips.c.
| #define elf_backend_relocate_section _bfd_mips_elf_relocate_section |
Definition at line 1547 of file elf32-mips.c.
| #define elf_backend_section_from_bfd_section _bfd_mips_elf_section_from_bfd_section |
Definition at line 1533 of file elf32-mips.c.
| #define elf_backend_section_from_shdr _bfd_mips_elf_section_from_shdr |
Definition at line 1531 of file elf32-mips.c.
| #define elf_backend_section_processing _bfd_mips_elf_section_processing |
Definition at line 1530 of file elf32-mips.c.
| #define elf_backend_sign_extend_vma TRUE |
Definition at line 1570 of file elf32-mips.c.
| #define elf_backend_size_dynamic_sections _bfd_mips_elf_size_dynamic_sections |
Definition at line 1545 of file elf32-mips.c.
| #define elf_backend_sym_is_global mips_elf_sym_is_global |
Definition at line 1527 of file elf32-mips.c.
| #define elf_backend_symbol_processing _bfd_mips_elf_symbol_processing |
Definition at line 1529 of file elf32-mips.c.
| #define elf_backend_type_change_ok TRUE |
Definition at line 1523 of file elf32-mips.c.
| #define elf_info_to_howto mips_info_to_howto_rela |
Definition at line 1525 of file elf32-mips.c.
| #define elf_info_to_howto_rel mips_info_to_howto_rel |
Definition at line 1526 of file elf32-mips.c.
| #define ELF_MACHINE_CODE EM_MIPS |
Definition at line 1520 of file elf32-mips.c.
| #define ELF_MAXPAGESIZE 0x10000 |
Definition at line 1620 of file elf32-mips.c.
| #define ELF_MAXPAGESIZE 0x1000 |
Definition at line 1620 of file elf32-mips.c.
| #define MINUS_ONE (((bfd_vma)0) - 1) |
Definition at line 105 of file elf32-mips.c.
| #define MIPS_RESERVED_GOTNO (2) |
Definition at line 101 of file elf32-mips.c.
Referenced by _bfd_mips_elf_finish_dynamic_sections(), _bfd_mips_elf_size_dynamic_sections(), mips_elf_create_got_section(), and mips_elf_multi_got().
Definition at line 97 of file elf32-mips.c.
Referenced by _bfd_mips_elf_add_symbol_hook(), _bfd_mips_elf_check_relocs(), _bfd_mips_elf_create_dynamic_sections(), _bfd_mips_elf_fake_sections(), _bfd_mips_elf_final_link(), _bfd_mips_elf_finish_dynamic_sections(), _bfd_mips_elf_finish_dynamic_symbol(), _bfd_mips_elf_name_local_section_symbols(), _bfd_mips_elf_size_dynamic_sections(), _bfd_mips_elf_symbol_processing(), mips_elf32_object_p(), mips_elf_calculate_relocation(), mips_elf_create_dynamic_relocation(), mips_elf_n32_object_p(), and mips_elf_sym_is_global().
| #define TARGET_BIG_NAME "elf32-tradbigmips" |
Definition at line 1616 of file elf32-mips.c.
| #define TARGET_BIG_NAME "elf32-bigmips" |
Definition at line 1616 of file elf32-mips.c.
Definition at line 1615 of file elf32-mips.c.
| #define TARGET_BIG_SYM bfd_elf32_bigmips_vec |
Definition at line 1615 of file elf32-mips.c.
| #define TARGET_LITTLE_NAME "elf32-tradlittlemips" |
Definition at line 1614 of file elf32-mips.c.
| #define TARGET_LITTLE_NAME "elf32-littlemips" |
Definition at line 1614 of file elf32-mips.c.
Definition at line 1613 of file elf32-mips.c.
Definition at line 1613 of file elf32-mips.c.
| bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc | ( | bfd * | abfd, | |
| arelent * | reloc_entry, | |||
| asymbol * | symbol, | |||
| void * | data, | |||
| asection * | input_section, | |||
| bfd * | output_bfd, | |||
| char ** | error_message | |||
| ) |
Definition at line 959 of file elf32-mips.c.
References _, _bfd_mips_elf_gprel16_with_gp(), bfd_reloc_ok, bfd_reloc_outofrange, BSF_LOCAL, BSF_SECTION_SYM, FALSE, bfd_symbol::flags, reloc_cache_entry::howto, mips_elf_final_gp(), NULL, bfd_section::output_section, bfd_section::owner, R_MIPS_LITERAL, ret, bfd_symbol::section, TRUE, and reloc_howto_struct::type.
Referenced by _bfd_elf_mips_get_relocated_section_contents().
| static reloc_howto_type * bfd_elf32_bfd_reloc_type_lookup | ( | bfd * | abfd, | |
| bfd_reloc_code_real_type | code | |||
| ) | [static] |
Definition at line 1250 of file elf32-mips.c.
References bfd_elf32_bfd_reloc_type_lookup, bfd_error_bad_value, BFD_RELOC_16_PCREL_S2, BFD_RELOC_32_PCREL, BFD_RELOC_CTOR, BFD_RELOC_VTABLE_ENTRY, BFD_RELOC_VTABLE_INHERIT, bfd_set_error(), bfd_val, E_MIPS_ABI_EABI64, E_MIPS_ABI_O64, elf_elfheader, elf_val, howto_table, i, int, NULL, and R_MIPS_32.
| static bfd_boolean elf32_mips_grok_prstatus | ( | bfd * | abfd, | |
| Elf_Internal_Note * | note | |||
| ) | [static] |
Definition at line 1406 of file elf32-mips.c.
References _bfd_elfcore_make_pseudosection(), bfd_get_16, bfd_get_32, elf_internal_note::descdata, elf_internal_note::descpos, elf_internal_note::descsz, elf_tdata, FALSE, offset, and size.
| static bfd_boolean elf32_mips_grok_psinfo | ( | bfd * | abfd, | |
| Elf_Internal_Note * | note | |||
| ) | [static] |
Definition at line 1436 of file elf32-mips.c.
References _bfd_elfcore_strndup(), elf_internal_note::descdata, elf_internal_note::descsz, elf_tdata, FALSE, n, strlen(), and TRUE.
| static irix_compat_t elf32_mips_irix_compat | ( | bfd * | abfd | ) | [static] |
| static bfd_reloc_status_type gprel32_with_gp | ( | bfd * | abfd, | |
| asymbol * | symbol, | |||
| arelent * | reloc_entry, | |||
| asection * | input_section, | |||
| bfd_boolean | relocatable, | |||
| void * | data, | |||
| bfd_vma | gp | |||
| ) | [static] |
Definition at line 1037 of file elf32-mips.c.
References reloc_cache_entry::addend, reloc_cache_entry::address, bfd_get_32, bfd_get_section_limit, bfd_is_com_section, bfd_put_32, bfd_reloc_ok, bfd_reloc_outofrange, BSF_SECTION_SYM, bfd_symbol::flags, reloc_cache_entry::howto, bfd_section::output_offset, bfd_section::output_section, reloc_howto_struct::partial_inplace, bfd_symbol::section, val, bfd_symbol::value, and bfd_section::vma.
Referenced by mips_elf_gprel32_reloc().
| static bfd_reloc_status_type mips16_gprel_reloc | ( | bfd * | abfd, | |
| arelent * | reloc_entry, | |||
| asymbol * | symbol, | |||
| void * | data, | |||
| asection * | input_section, | |||
| bfd * | output_bfd, | |||
| char ** | error_message | |||
| ) | [static] |
Definition at line 1149 of file elf32-mips.c.
References _bfd_mips16_elf_reloc_shuffle(), _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp(), reloc_cache_entry::address, bfd_reloc_ok, BSF_LOCAL, BSF_SECTION_SYM, FALSE, bfd_symbol::flags, reloc_cache_entry::howto, location, mips_elf_final_gp(), NULL, bfd_section::output_offset, bfd_section::output_section, bfd_section::owner, ret, bfd_symbol::section, TRUE, and reloc_howto_struct::type.
| static bfd_reloc_status_type mips16_jump_reloc | ( | bfd *abfd | ATTRIBUTE_UNUSED, | |
| arelent * | reloc_entry, | |||
| asymbol * | symbol, | |||
| void *data | ATTRIBUTE_UNUSED, | |||
| asection * | input_section, | |||
| bfd * | output_bfd, | |||
| char **error_message | ATTRIBUTE_UNUSED | |||
| ) | [static] |
Definition at line 1119 of file elf32-mips.c.
References _, reloc_cache_entry::addend, reloc_cache_entry::address, bfd_get_target, bfd_reloc_ok, bfd_reloc_undefined, BSF_SECTION_SYM, bfd_symbol::flags, NULL, bfd_section::output_offset, bfd_section::output_section, bfd_section::owner, and TRUE.
| static bfd_reloc_status_type mips16_jump_reloc | ( | bfd * | , | |
| arelent * | , | |||
| asymbol * | , | |||
| void * | , | |||
| asection * | , | |||
| bfd * | , | |||
| char ** | ||||
| ) | [static] |
| static bfd_reloc_status_type mips32_64bit_reloc | ( | bfd * | abfd, | |
| arelent * | reloc_entry, | |||
| asymbol *symbol | ATTRIBUTE_UNUSED, | |||
| void * | data, | |||
| asection * | input_section, | |||
| bfd * | output_bfd, | |||
| char ** | error_message | |||
| ) | [static] |
Definition at line 1084 of file elf32-mips.c.
References addr(), reloc_cache_entry::address, bfd_big_endian, bfd_get_32, bfd_little_endian, bfd_perform_relocation(), bfd_put_32, reloc_cache_entry::howto, r, R_MIPS_32, and val.
| static bfd_reloc_status_type mips32_64bit_reloc | ( | bfd * | , | |
| arelent * | , | |||
| asymbol * | , | |||
| void * | , | |||
| asection * | , | |||
| bfd * | , | |||
| char ** | ||||
| ) | [static] |
| static bfd_boolean mips_elf32_object_p | ( | bfd * | abfd | ) | [static] |
Definition at line 1372 of file elf32-mips.c.
References _bfd_elf_mips_mach(), ABI_N32_P, bfd_default_set_arch_mach(), elf_bad_symtab, elf_elfheader, FALSE, mach, SGI_COMPAT, and TRUE.
| static reloc_howto_type* mips_elf32_rtype_to_howto | ( | unsigned int | r_type, | |
| bfd_boolean rela_p | ATTRIBUTE_UNUSED | |||
| ) | [static] |
| static reloc_howto_type* mips_elf32_rtype_to_howto | ( | unsigned | int, | |
| bfd_boolean | ||||
| ) | [static] |
Referenced by mips_info_to_howto_rel().
Definition at line 868 of file elf32-mips.c.
References _bfd_get_gp_value(), _bfd_set_gp_value(), bfd_asymbol_name, bfd_asymbol_value, bfd_get_outsymbols, bfd_get_symcount, count, FALSE, i, NULL, strcmp(), sym, and TRUE.
Referenced by mips_elf_final_gp().
| static bfd_reloc_status_type mips_elf_final_gp | ( | bfd * | output_bfd, | |
| asymbol * | symbol, | |||
| bfd_boolean | relocatable, | |||
| char ** | error_message, | |||
| bfd_vma * | pgp | |||
| ) | [static] |
Definition at line 920 of file elf32-mips.c.
References _, _bfd_get_gp_value(), _bfd_set_gp_value(), bfd_is_und_section, bfd_reloc_dangerous, bfd_reloc_ok, bfd_reloc_undefined, BSF_SECTION_SYM, bfd_symbol::flags, mips_elf_assign_gp(), bfd_section::output_section, bfd_symbol::section, and bfd_section::vma.
Referenced by _bfd_mips_elf32_gprel16_reloc(), mips16_gprel_reloc(), mips_elf_gprel16_reloc(), mips_elf_gprel32_reloc(), and mips_elf_literal_reloc().
| static bfd_reloc_status_type mips_elf_gprel32_reloc | ( | bfd * | abfd, | |
| arelent * | reloc_entry, | |||
| asymbol * | symbol, | |||
| void * | data, | |||
| asection * | input_section, | |||
| bfd * | output_bfd, | |||
| char ** | error_message | |||
| ) | [static] |
Definition at line 1001 of file elf32-mips.c.
References _, bfd_reloc_ok, bfd_reloc_outofrange, BSF_LOCAL, BSF_SECTION_SYM, FALSE, bfd_symbol::flags, gprel32_with_gp(), mips_elf_final_gp(), NULL, bfd_section::output_section, bfd_section::owner, ret, bfd_symbol::section, and TRUE.
| static bfd_boolean mips_elf_is_local_label_name | ( | bfd * | abfd, | |
| const char * | name | |||
| ) | [static] |
Definition at line 1359 of file elf32-mips.c.
References abfd, bfd_get_section, bfd_is_com_section, bfd_is_und_section, BSF_GLOBAL, BSF_SECTION_SYM, BSF_WEAK, bfd_symbol::flags, and SGI_COMPAT.
| static void mips_info_to_howto_rel | ( | bfd * | abfd, | |
| arelent * | cache_ptr, | |||
| Elf_Internal_Rela * | dst | |||
| ) | [static] |
Definition at line 1324 of file elf32-mips.c.
References reloc_cache_entry::addend, BSF_SECTION_SYM, ELF32_R_TYPE, elf_gp, FALSE, reloc_cache_entry::howto, mips_elf32_rtype_to_howto(), elf_internal_rela::r_info, R_MIPS_GPREL16, R_MIPS_LITERAL, and reloc_cache_entry::sym_ptr_ptr.
Referenced by mips_info_to_howto_rela().
| static void mips_info_to_howto_rela | ( | bfd * | abfd, | |
| arelent * | cache_ptr, | |||
| Elf_Internal_Rela * | dst | |||
| ) | [static] |
reloc_howto_type elf_mips16_howto_table_rel[] [static] |
Definition at line 725 of file elf32-mips.c.
reloc_howto_type elf_mips_ctor64_howto [static] |
Initial value:
HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips32_64bit_reloc, /* special_function */ "R_MIPS_64", /* name */ TRUE, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE)
Definition at line 710 of file elf32-mips.c.
reloc_howto_type elf_mips_gnu_pcrel32 [static] |
Initial value:
HOWTO (R_MIPS_PC32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC32", /* name */ TRUE, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ TRUE)
Definition at line 817 of file elf32-mips.c.
reloc_howto_type elf_mips_gnu_rel16_s2 [static] |
Initial value:
HOWTO (R_MIPS_GNU_REL16_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ TRUE, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ TRUE)
Definition at line 798 of file elf32-mips.c.
Initial value:
HOWTO (R_MIPS_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MIPS_GNU_VTENTRY", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE)
Definition at line 849 of file elf32-mips.c.
Initial value:
HOWTO (R_MIPS_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MIPS_GNU_VTINHERIT", /* name */ FALSE, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ FALSE)
Definition at line 833 of file elf32-mips.c.
reloc_howto_type elf_mips_howto_table_rel[] [static] |
Definition at line 109 of file elf32-mips.c.
struct elf_reloc_map mips16_reloc_map[] [static] |
Initial value:
{
{ BFD_RELOC_MIPS16_JMP, R_MIPS16_26 - R_MIPS16_min },
{ BFD_RELOC_MIPS16_GPREL, R_MIPS16_GPREL - R_MIPS16_min },
{ BFD_RELOC_MIPS16_HI16_S, R_MIPS16_HI16 - R_MIPS16_min },
{ BFD_RELOC_MIPS16_LO16, R_MIPS16_LO16 - R_MIPS16_min },
}
Definition at line 1239 of file elf32-mips.c.
Definition at line 1479 of file elf32-mips.c.
struct elf_reloc_map mips_reloc_map[] [static] |
Definition at line 1200 of file elf32-mips.c.
1.5.6