aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-21bfd/Alan Modra1-7/+7
* elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map. Delete num_locals and num_globals. (elf_num_locals, elf_num_globals): Don't define. (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker, elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define. * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c, * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c, * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata accessor macros. * elf.c (elf_map_symbols): Add pnum_locals param. Return number of locals syms via new param. (swap_out_syms): Adjust to suit elf_map_symbols change. ld/ * emultempl/elf-generic.em: Use newly defined elf_obj_tdata accessor macros.
2013-02-19 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clearMaciej W. Rozycki1-2/+7
STO_MICROMIPS annotation.
2013-02-18 * elfxx-mips.c (MICROMIPS_P): New macro.Maciej W. Rozycki1-1/+5
(_bfd_mips_elf_symbol_processing): Use it.
2013-02-18 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): ClarifyMaciej W. Rozycki1-1/+1
comment on _PROCEDURE_LINKAGE_TABLE_ creation.
2013-02-18 * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,Alan Modra1-24/+40
local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section, and elf_text_section to.. * elfxx-mips.c (struct mips_elf_obj_tdata): ..here. Update all refs. * elf64-alpha.c (struct mips_elf_find_line): Rename to.. (struct alpha_elf_find_line): ..this. (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
2013-02-13bfd/Richard Sandiford1-120/+296
* elfxx-mips.c (mips_got_page_ref): New structure. (mips_got_page_entry): Use a section rather than a (bfd, symndx) pair to represent the anchor point. (mips_got_info): Add a got_page_refs field. (mips_elf_link_hash_table): Add a sym_cache field. (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions. (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for new anchor representation. (mips_elf_create_got_info): Create got_page_refs rather than got_page_entries. (mips_elf_record_got_page_ref): New function. (mips_elf_pages_for_range): Move further down file. (mips_elf_record_got_page_entry): Likewise. Take a got as argument. Use a section rather than a (bfd, symndx) pair to represent the anchor point. (mips_elf_resolve_got_page_ref): New function. (mips_elf_resolve_final_got_entries): Use it to populate got_page_entries. (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref rather than mips_elf_record_got_page_entry. Only nullify h afterwards. (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries earlier. ld/testsuite/ * ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd: Remove 3 unused local GOT entries. * ld-mips-elf/got-page-4a.s, ld-mips-elf/got-page-4b.s, ld-mips-elf/got-page-4a.d, ld-mips-elf/got-page-4a.got, ld-mips-elf/got-page-4b.d, ld-mips-elf/got-page-4b.got, ld-mips-elf/got-page-5.s, ld-mips-elf/got-page-5.d, ld-mips-elf/got-page-5.got, ld-mips-elf/got-page-6.s, ld-mips-elf/got-page-6.d, ld-mips-elf/got-page-6.got, ld-mips-elf/got-page-7a.s, ld-mips-elf/got-page-7b.s, ld-mips-elf/got-page-7c.s, ld-mips-elf/got-page-7d.s, ld-mips-elf/got-page-7e.s, ld-mips-elf/got-page-7.d, ld-mips-elf/got-page-7.got: New tests. * ld-mips-elf/mips-elf.exp: Run them.
2013-02-12bfd/Richard Sandiford1-14/+5
* elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs in g->relocs.
2013-02-11bfd/Richard Sandiford1-59/+44
* elfxx-mips.c (mips_elf_count_got_entries): Delete. (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a mips_elf_traverse_got_arg. Count GOT entries. (mips_elf_resolve_final_got_entries): Take the bfd_link_info as argument. Update after above changes. (mips_elf_merge_got, mips_elf_lay_out_got): Don't call mips_elf_count_got_entries. Update the calls to mips_elf_resolve_final_got_entries.
2013-02-11bfd/Richard Sandiford1-55/+39
* elfxx-mips.c (mips_got_tls_type): New enum. (mips_got_entry): Add tls_initialized. (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs) (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove GOT_TLS_TYPE masks. (mips_elf_reloc_tls_type, mips_tls_got_entries) (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index) (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather than GOT_NORMAL. (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use tls_initialized rather than GOT_TLS_DONE. (mips_tls_got_index): Delete. (mips_elf_local_got_index, mips_elf_global_got_index): Use mips_elf_initialize_tls_slots rather than mips_tls_got_index. (mips_elf_record_got_entry): Initialize tls_initialized.
2013-02-11bfd/Richard Sandiford1-229/+51
* elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset. (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type, tls_ie_got_offset and tls_gd_got_offset. (mips_elf_link_hash_newfunc): Remove initialization. (mips_elf_create_got_info): Likewise. (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries) (mips_tls_single_got_index): Delete. (mips_elf_local_got_index): Always use the GOT entry to track GOT indices. (mips_elf_global_got_index): Likewise. (mips_elf_create_local_got_entry): Assert that TLS entries have already been allocated. (mips_elf_record_global_got_symbol): Don't initialize tls_ie_type or tls_gd_type. (mips_elf_count_got_symbols): Only count reloc-only GOT entries here. (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS entry. (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count the GOT entries. (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets have been allocated. (_bfd_mips_elf_copy_indirect_symbol): Remove handling of tls_ie_type and tls_gd_type.
2013-02-11bfd/Richard Sandiford1-36/+37
* elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid aliasing violation. Check for htab allocation failures.
2013-02-11bfd/Richard Sandiford1-24/+42
* elfxx-mips.c (mips_elf_primary_global_got_index): New function, split out from... (mips_elf_global_got_index): ...here. Reorder arguments so that the output bfd and info come first. (mips_elf_calculate_relocation): Update the call to mips_elf_global_got_index accordingly. (_bfd_mips_elf_finish_dynamic_symbol): Use mips_elf_primary_global_got_index rather than mips_elf_global_got_index. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2013-02-11bfd/Richard Sandiford1-70/+27
* elfxx-mips.c (mips_got_entry): Update comments. (mips_elf_multi_got_entry_eq): Rename to... (mips_elf_got_entry_eq): ...this, deleting the old definition. (mips_elf_create_got_info): Remove master_got_p argument. Always use mips_elf_got_entry_eq. (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section): Update calls accordingly. ld/testsuite/ * ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got, ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got, ld-mips-elf/tls-hidden3.d, ld-mips-elf/tls-hidden3.got: Update for new hash table order.
2013-02-11bfd/Richard Sandiford1-206/+124
* elfxx-mips.c (mips_got_info): Remove bfd2got. (mips_elf_bfd2got_hash): Delete. (mips_elf_got_per_bfd_arg): Remove bfd2got. (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions. (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use g->next to test for the multigot case. Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd. (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq) (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete. (mips_elf_make_got_per_bfd): Replace with... (mips_elf_add_got_entry): ...this new function. (mips_elf_make_got_pages_per_bfd): Replace with... (mips_elf_add_got_page_entry): ...this new function. (mips_elf_merge_got_with): Replace bfd2got argument with separate bfd and GOT arguments. Use mips_elf_add_got_entry and mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got to set the BFD's GOT and free the old table. (mips_elf_merge_got): Replace bfd2got argument with separate bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries. Use mips_elf_count_got_entries to count the number of entries in each GOT. Update the calls to mips_elf_merge_got_with. (mips_elf_adjust_gp): Use g->next to test for the multigot case. Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd. (mips_elf_multi_got): Don't create the bfd2got hash table. Replace hash table traversal with a walk over the input bfds, updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got to set the output bfd's GOT. (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all bfds use the master GOT in the single-GOT case. (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd. ld/testsuite/ * ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-multi-got-1.d, ld-mips-elf/tls-multi-got-1.got: Update for changes in the order that symbols are added to per-bfd GOTs.
2013-02-11bfd/Richard Sandiford1-56/+101
* elfxx-mips.c (mips_elf_obj_tdata): Add a got field. (mips_elf_bfd_got, mips_elf_record_got_entry): New functions. (mips_elf_record_global_got_symbol): Update the hash entry before adding the mips_got_entry. Use mips_elf_record_got_entry to do the latter. (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry. (mips_elf_record_got_page_entry): Record the entry in both the master and bfd GOTs.
2013-02-11bfd/Richard Sandiford1-18/+88
* elfxx-mips.c (mips_elf_recreate_got): Don't change the entry; create another one if necessary. (mips_elf_set_gotidx): New function. (mips_elf_set_global_gotidx): Use it. (mips_elf_initialize_tls_index): Likewise. Take a mips_elf_traverse_got_arg as argument. (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index. (mips_elf_multi_got): Likewise. Cope with error returns from mips_elf_set_global_gotidx.
2013-02-11bfd/Richard Sandiford1-132/+124
* elfxx-mips.c (mips_got_info): Add relocs field. (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace with... (mips_elf_traverse_got_arg): ...this new structure. (mips_elf_count_local_tls_relocs): Delete. (mips_elf_count_global_tls_relocs): Likewise. (mips_elf_count_got_entry): New function. (mips_elf_count_local_got_entries): Likewise. (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg rather than a mips_elf_count_tls_arg. Count both relocs and entries. (mips_elf_record_local_got_symbol): Don't count got entries here. (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry. (mips_elf_set_global_got_offset): Split into... (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these new functions. Take a mips_elf_traverse_got_arg rather than a mips_elf_set_global_got_offset_arg. Don't count TLS relocs here. Use g->relocs to record the number of relocs needed for global GOT entries. (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than mips_elf_set_global_got_offset_arg. Use the relocs field to count relocations. Update for above function split. (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries to count both the number of GOT entries and the number of TLS relocs required by local entries. Likewise mips_elf_count_global_tls_entries and global entries. Remove uses of mips_elf_count_local_tls_relocs and mips_elf_count_global_tls_relocs.
2013-02-11bfd/Richard Sandiford1-220/+201
* elfxx-mips.c (mips_got_entry): Update comment above tls_type entry to say that each structure represents only one type of TLS reference. (GOT_TLS_TYPE): New define. (mips_elf_link_hash_entry): Temporarily split tls_type and tls_got_offset into two variables each. (mips_elf_link_hash_newfunc): Update accordingly. (mips_elf_got_entry_eq, mips_elf_got_entry_hash) (mips_elf_multi_got_entry_eq): Require the tls_type to be the same. (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions. (mips_tls_got_relocs): Use a switch statement. (mips_elf_count_global_tls_entries): Handle the new hash entry fields. (mips_elf_initialize_tls_slots): Use a switch statement. Avoid local "offset" variable. (mips_tls_got_index): Remove r_type argument and assert. Remove code that handled entries with two TLS types; always use the original got_index instead. (mips_tls_single_got_index): New function. (mips_elf_local_got_index): Use entry->tls_type to check for TLS entries. Use mips_tls_single_got_index. Update call to mips_tls_got_index. (mips_elf_global_got_index): Use mips_elf_reloc_tls_type. Use p->tls_type to check for TLS entries. Update call to mips_tls_got_index. Use mips_tls_single_got_index. (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type. Use entry.tls_type to check for TLS entries. (mips_elf_record_global_got_symbol): Replace tls_flag argument with r_type argument. Use mips_elf_reloc_tls_type. Set up the new hash entry fields. (mips_elf_record_local_got_symbol): Replace tls_flag argument with r_type argument. Use mips_elf_reloc_tls_type and mips_tls_got_entries. Remove code that handled entries with multiple TLS types. (mips_elf_make_got_per_bfd): Use mips_tls_got_entries. (mips_elf_initialize_tls_index): Handle new hash entry fields. Use equality rather than masks when checking for specific TLS types. Use mips_tls_got_entries. Remove code that handled entries with multiple TLS types. (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of testing the hash table entry. (_bfd_mips_elf_check_relocs): Update calls to mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol. (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type. (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
2013-02-11bfd/Richard Sandiford1-17/+2
* elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to... (mips_elf_got_entry_hash): ...this, deleting the old version. (mips_elf_create_got_info): Use mips_elf_got_entry_hash for both types of GOT. ld/testsuite/ * ld-mips-elf/tls-hidden3.d, ld-mips-elf/tls-hidden3.got, ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tlsbin-o32.d, ld-mips-elf/tlsbin-o32.got, ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got, ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got, ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got, ld-mips-elf/tlslib-o32.d, ld-mips-elf/tlslib-o32.got, ld-mips-elf/tlslib-o32-hidden.got, ld-mips-elf/tlslib-o32-ver.got: Adjust GOT layout for new got_entry hash function.
2013-02-11bfd/Richard Sandiford1-77/+34
* elfxx-mips.c (mips_elf_create_got_info): New function. (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it. (mips_elf_create_got_section): Likewise.
2013-02-11bfd/Richard Sandiford1-2/+2
* elfxx-mips.c (mips_elf_record_local_got_symbol): Always set gotidx to -1.
2013-02-11bfd/Richard Sandiford1-3/+1
* elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
2013-02-11bfd/Richard Sandiford1-13/+9
* elfxx-mips.c (mips_got_info): Move global_gotsym to... (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
2013-02-11bfd/Richard Sandiford1-0/+11
* elfxx-mips.c (mips_elf_count_global_tls_entries) (mips_elf_count_global_tls_relocs): Don't count indirect or warning symbols. (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right number of TLS entries were allocated. ld/testsuite/ * ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.got: Remove unused GOT entries.
2013-02-11bfd/Richard Sandiford1-4/+0
* elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
2013-02-11bfd/Richard Sandiford1-3/+3
* elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count if there are TLS relocations.
2013-02-11bfd/Richard Sandiford1-4/+0
* elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment.
2013-02-10 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.Alan Modra1-36/+1
* coff-h8300.c (h8300_coff_link_hash_table_create): Likewise. * m68klinux.c (linux_link_hash_table_create): Likewise. * sparclinux.c (linux_link_hash_table_create): Likewise. * sunos.c (sunos_link_hash_table_create): Likewise. * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise. * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise. * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise. * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise. * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise. * elf32-cris.c (elf_cris_link_hash_table_create): Likewise. * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise. * elf32-i386.c (elf_i386_link_hash_table_create): Likewise. * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise. * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise. * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise. * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise. * elf32-metag.c (elf_metag_link_hash_table_create): Likewise. * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise. * elf32-s390.c (elf_s390_link_hash_table_create): Likewise. * elf32-score.c (elf32_score_link_hash_table_create): Likewise. * elf32-spu.c (spu_elf_link_hash_table_create): Likewise. * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise. * elf32-vax.c (elf_vax_link_hash_table_create): Likewise. * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise. * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise. * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise. * elf64-s390.c (elf_s390_link_hash_table_create): Likewise. * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise. * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise. * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise. * elflink.c (_bfd_elf_link_hash_table_create): Likewise. (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
2013-01-10Remove trailing white spaces in bfdH.J. Lu1-6/+6
* aout0.c: Remove trailing white spaces. * archive.c: Likewise. * archures.c: Likewise. * bfd-in.h: Likewise. * bfd-in2.h: Likewise. * coff-alpha.c: Likewise. * coff-i860.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * compress.c: Likewise. * corefile.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-crx.c: Likewise. * cpu-h8300.c: Likewise. * cpu-i386.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m68k.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-sh.c: Likewise. * cpu-xc16x.c: Likewise. * dwarf2.c: Likewise. * ecofflink.c: Likewise. * ecoffswap.h: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-vxworks.c: Likewise. * elf32-avr.c: Likewise. * elf32-avr.h: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.h: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-v850.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * libcoff.h: Likewise. * libpei.h: Likewise. * libxcoff.h: Likewise. * linker.c: Likewise. * mach-o-i386.c: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mach-o.h: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c: Likewise. * pef-traceback.h: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * plugin.c: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * section.c: Likewise. * som.c: Likewise. * syms.c: Likewise. * tekhex.c: Likewise. * ticoff.h: Likewise. * vaxbsd.c: Likewise. * xcofflink.c: Likewise. * xtensa-isa.c: Likewise.
2013-01-04 * archures.c: Add support for MIPS r5900Nick Clifton1-1/+9
* bfd-in2.h: Add support for MIPS r5900 * config.bfd: Add support for Sony Playstation 2 * cpu-mips.c: Add support for MIPS r5900 * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000) * config/tc-mips.c: Add support for MIPS r5900 Add M_LQ_AB and M_SQ_AB to support large values for instructions lq and sq. * config/tc-mips.c (can_swap_branch_p, get_append_method): Detect some conditional short loops to fix a bug on the r5900 by NOP in the branch delay slot. * config/tc-mips.c (M_MUL): Support 3 operands in multu on r5900. * config/tc-mips.c (M_TRUNCWS): Support trunc.w.s on r5900 in MIPS ISA I. * config/tc-mips.c (s_mipsset): Force 32 bit floating point on r5900. * configure.in: Detect CPU type when target string contains r5900 (e.g. mips64r5900el-linux-gnu). * config/tc-mips.c (mips_ip): Check parameter range of instructions mfps and mtps on r5900. * elf/mips.h: Add MIPS machine variant number for r5900 which is compatible with old Playstation 2 software. * opcode/mips.h: Add support for r5900 instructions including lq and sq. * configure.tgt: Support ELF files for Sony Playstation 2 (for ps2dev and ps2sdk). * emulparams/elf32lr5900n32.sh: Create linker script for Sony Playstation 2 ELF files using MIPS ABI n32. * emulparams/elf32lr5900.sh: Create linker script for Sony Playstation 2 ELF files using MIPS ABI o32. * Makefile.am: Add linker scripts for Sony Playstation 2 ELF files. * opcodes/mips-dis.c: Add names for CP0 registers of r5900. * opcodes/mips-opc.c: Add M_SQ_AB and M_LQ_AB to support larger range for instructions sq and lq. * opcodes/mips-opc.c: Add support for MIPS r5900 CPU. Add support for 128 bit MMI (Multimedia Instructions). Add support for EE instructions (Emotion Engine). Disable unsupported floating point instructions (64 bit and undefined compare operations). Enable instructions of MIPS ISA IV which are supported by r5900. Disable 64 bit co processor instructions. Disable 64 bit multiplication and division instructions. Disable instructions for co-processor 2 and 3, because these are not supported (preparation for later VU0 support (Vector Unit)). Disable cvt.w.s because this behaves like trunc.w.s and the correct execution can't be ensured on r5900. Add trunc.w.s using the opcode encoding of cvt.w.s on r5900. This will confuse less developers and compilers.
2012-12-06 * elfxx-mips.c (allocate_dynrelocs): Correct test for symbolAlan Modra1-1/+1
defined in a regular file to include common symbols.
2012-12-03 PR ld/10629Maciej W. Rozycki1-3/+3
* elfxx-mips.c (mips_elf_link_hash_table): Update comment for use_rld_obj_head. (_bfd_mips_elf_create_dynamic_sections): Always create a .rld_map section if no __rld_obj_head symbol has been seen.
2012-12-03 bfd/Maciej W. Rozycki1-37/+124
* elf32-mips.c (bfd_elf32_mkobject): New macro. * elf64-mips.c (bfd_elf64_mkobject): Likewise. * elfn32-mips.c (bfd_elf32_mkobject): Likewise. * elfxx-mips.h (_bfd_mips_elf_mkobject): New prototype. * elfxx-mips.c (mips_elf_obj_tdata): New struct. (mips_elf_tdata): New macro. (_bfd_mips_elf_mkobject): New function. (mips_elf_merge_obj_attributes): Report the originating input BFD on attribute conflicts. ld/testsuite/ * ld-mips-elf/attr-gnu-4-12.d: Update the warning message. * ld-mips-elf/attr-gnu-4-13.d: Likewise. * ld-mips-elf/attr-gnu-4-14.d: Likewise. * ld-mips-elf/attr-gnu-4-15.d: Likewise. * ld-mips-elf/attr-gnu-4-21.d: Likewise. * ld-mips-elf/attr-gnu-4-23.d: Likewise. * ld-mips-elf/attr-gnu-4-24.d: Likewise. * ld-mips-elf/attr-gnu-4-25.d: Likewise. * ld-mips-elf/attr-gnu-4-31.d: Likewise. * ld-mips-elf/attr-gnu-4-32.d: Likewise. * ld-mips-elf/attr-gnu-4-34.d: Likewise. * ld-mips-elf/attr-gnu-4-35.d: Likewise. * ld-mips-elf/attr-gnu-4-41.d: Likewise. * ld-mips-elf/attr-gnu-4-42.d: Likewise. * ld-mips-elf/attr-gnu-4-43.d: Likewise. * ld-mips-elf/attr-gnu-4-45.d: Likewise. * ld-mips-elf/attr-gnu-4-51.d: Likewise.
2012-12-03 bfd/Maciej W. Rozycki1-10/+10
* elfxx-mips.c (mips_elf_merge_obj_attributes): Correct messages for the -mdouble-float and -msingle-float cases throughout; make all the messages report the output file consistently on the left-hand side. ld/testsuite/ * ld-mips-elf/attr-gnu-4-12.d: Adjust the warning expected according to changes to BFD. * ld-mips-elf/attr-gnu-4-14.d: Likewise. * ld-mips-elf/attr-gnu-4-31.d: Likewise. * ld-mips-elf/attr-gnu-4-32.d: Likewise. * ld-mips-elf/attr-gnu-4-34.d: Likewise. * ld-mips-elf/attr-gnu-4-41.d: Likewise.
2012-09-02Add hdynamic to elf_link_hash_table for _DYNAMICH.J. Lu1-1/+1
* elf-bfd.h (elf_link_hash_table): Add hdynamic for the _DYNAMIC symbol. * elflink.c (_bfd_elf_link_create_dynamic_sections): Set hdynamic. * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check hdynamic instead of "_DYNAMIC". * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise. * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise. * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise. * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise. * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise. * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise. * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise. * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_, _PROCEDURE_LINKAGE_TABLE_. * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise. * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
2012-08-17typo fixesAlan Modra1-2/+2
2012-08-13 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look upMaciej W. Rozycki1-1/+1
the options section in the output rather than input BFD to decide if to add a DT_MIPS_OPTIONS tag.
2012-08-13 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handlingMaciej W. Rozycki1-1/+4
of protected symbols.
2012-08-09 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):Maciej W. Rozycki1-45/+45
Remove macros, folding them into... (LA25_LUI_MICROMIPS): ... this new macro. (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into... (LA25_J_MICROMIPS): ... this new macro. (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise into... (LA25_ADDIU_MICROMIPS): ... this new macro. (bfd_put_micromips_32, bfd_get_micromips_32): New functions. (mips_elf_create_la25_stub): Use them. (check_br32_dslot, check_br32, check_relocated_bzc): Likewise. (_bfd_mips_elf_relax_section): Likewise.
2012-08-03 bfd/Maciej W. Rozycki1-2/+3
* elfxx-mips.c (mips_elf_perform_relocation): Update the cross-mode jump message. ld/testsuite/ * ld-mips-elf/mode-change-error-1.d: Update the error message.
2012-08-03 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update theMaciej W. Rozycki1-2/+2
comment on DT_MIPS_RLD_MAP.
2012-07-242012-07-24 Teresa Johnson <tejohnson@google.com>Cary Coutant1-1/+1
bfd/ * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. binutils/ * addr2line.c (find_address_in_section): Invoke bfd_find_nearest_line_discriminator to get the discriminator. (find_offset_in_section): Likewise. (translate_addresses): Print discriminator if it is non-zero. * objdump.c (show_line): Invoke bfd_find_nearest_line_discriminator to get the discriminator, and keep track of prev_discriminator. Print discriminator if it is non-zero. (disassemble_data): Initialize prev_discriminator. (dump_reloc_set): Invoke bfd_find_nearest_line_discriminator to get the discriminator, and keep track of last_discriminator. Print discriminator if it is non-zero.
2012-07-13 * aix386-core.c: Remove use of PTR and PARAMS macros.Nick Clifton1-2/+2
* archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise.
2012-07-02 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_sectionAlan Modra1-8/+10
"anyway" variant when creating .plt. (m32c_elf_relax_plt_section): Remove redundant test and unused param. (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling m32c_elf_relax_plt_section. * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant when creating .got and .got.plt. (_bfd_mips_elf_final_link): Likewise for .rtproc, and use bfd_get_linker_section. * sunos.c: Similarly throughout.
2012-06-29 * section.c (bfd_get_linker_section): New function.Alan Modra1-31/+32
* elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use the above throughout rather than bfd_get_section_by_name. Use bfd_make_section_anyway rather than bfd_make_section when creating them. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elflink.c: Likewise. * elf-vxworks.c: Likewise. * elf-m10300.c: Likewise. Also make use of htab plt, got and gotplt shortcuts. * bfd-in2.h: Regenerate. * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when calling create_rofixup_section. * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
2012-05-19 * elf64-mips.c (elf_backend_got_header_size): Correct definition.Maciej W. Rozycki1-1/+2
* elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it.
2012-05-07 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compoundMaciej W. Rozycki1-2/+55
relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2012-04-24 PR ld/13991Alan Modra1-2/+2
bfd/ * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * bfd/elflink.c (_bfd_elf_link_just_syms): Delete. * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type. * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section. * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c, * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c, * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c, * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c, * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c, * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c, * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c, * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c, * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c, * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c, * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c, * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c, * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c, * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c, * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c, * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c, * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c, * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c, * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c, * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c, * bfd/reloc.c: Update all references. * bfd/bfd-in2.h: Regenerate. ld/ * ld/ldlang.c (size_input_section): Use sec_info_type rather than usrdata->flags.just_syms. * ld/ldwrite.c (build_link_order): Likewise. * ld/emultempl/hppaelf.em (build_section_lists): Likewise. * ld/emultempl/ppc64elf.em (build_toc_list): Likewise. * ld/emultempl/armelf.em (build_section_lists): Likewise. (after_allocation): Update for renamed sec_info_type value. * ld/emultempl/tic6xdsbt.em: Likewise.
2012-04-16 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.Maciej W. Rozycki1-5/+8
(_bfd_mips_elf_check_relocs): Update accordingly.
2011-12-192011-12-19 Chung-Lin Tang <cltang@codesourcery.com>Chung-Lin Tang1-5/+43
gas/ * config/tc-mips.c (mips_pseudo_table): Add tprelword/tpreldword entries. (mips16_percent_op): Add MIPS16 TLS relocation ops. (md_apply_fix): Add BFD_RELOC_MIPS16_TLS_* switch cases. (s_tls_rel_directive): Rename from s_dtprel_internal(). Abstract out directive string and reloc type as function parameters. Update comments. (s_dtprelword,s_dtpreldword): Change to use s_tls_rel_directive(). (s_tprelword,s_tpreldword): New functions. include/ * elf/mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries. bfd/ * reloc.c (BFD_RELOC_MIPS16_TLS_GD,BFD_RELOC_MIPS16_TLS_LDM, BFD_RELOC_MIPS16_TLS_DTPREL_HI16,BFD_RELOC_MIPS16_TLS_DTPREL_LO16, BFD_RELOC_MIPS16_TLS_GOTTPREL,BFD_RELOC_MIPS16_TLS_TPREL_HI16, BFD_RELOC_MIPS16_TLS_TPREL_LO16): New relocations for MIPS16 TLS. * bfd-in2.h (bfd_reloc_code_real): Regenerate. * libbfd.h (bfd_reloc_code_real_names): Regenerate. * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_TLS_* entries. (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_* mappings. * elfn32-mips.c (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Add R_MIPS16_TLS_* entries. (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_* mappings. * elf64-mips.c (mips16_elf64_howto_table_rel, mips16_elf64_howto_table_rela): Add R_MIPS16_TLS_* entries. (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_* mappings. * elfxx-mips.c (TLS_RELOC_P,mips16_reloc_p, _bfd_mips_elf_check_relocs): Add cases for R_MIPS16_TLS_* relocations. (tls_gd_reloc_p): Add R_MIPS16_TLS_GD case. (tls_ldm_reloc_p): Add R_MIPS16_TLS_LDM case. (tls_gottprel_reloc_p): Add R_MIPS16_TLS_GOTTPREL case. (mips_elf_calculate_relocation): Add cases for R_MIPS16_TLS_*, R_MIPS_TLS_DTPREL32/64, and R_MIPS_TLS_TPREL32/64 relocations.