- PR target/13503
- * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
- * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
- R_AVR_8_HLO8.
- (avr_reloc_map): Likewise.
-
-2012-05-16 Daniel Richard G. <skunk@iskunk.org>
-
- PR binutils/13558
- * bfd/aout-cris.c: Include sysdep.h before bfd.h.
- * bfd/aout-ns32k.c: Likewise.
- * bfd/aout-sparcle.c: Likewise.
- * bfd/aout0.c: Likewise.
- * bfd/bfd-in2.h: Likewise.
- * bfd/coff-stgo32.c: Likewise.
- * bfd/cpu-lm32.c: Likewise.
- * bfd/cpu-microblaze.c: Likewise.
- * bfd/cpu-score.c: Likewise.
- * bfd/cpu-tilegx.c: Likewise.
- * bfd/cpu-tilepro.c: Likewise.
- * bfd/elf32-lm32.c: Likewise.
- * bfd/elf32-microblaze.c: Likewise.
- * bfd/elf32-score7.c: Likewise.
- * bfd/elf32-tilepro.c: Likewise.
- * bfd/elfxx-tilegx.c: Likewise.
- * bfd/mach-o.h: Likewise.
- * bfd/nlm32-ppc.c: Likewise.
- * bfd/ns32knetbsd.c: Likewise.
- * bfd/pef.h: Likewise.
- * bfd/plugin.c: Likewise.
- * bfd/stab-syms.c: Likewise.
- * bfd/sunos.c: Likewise.
- * bfd/syms.c: Likewise.
- * bfd/xsym.h: Likewise.
-
-2012-05-16 Alan Modra <amodra@gmail.com>
-
- * elflink.c: Rename flaginfo to flinfo throughout, except..
- (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
- Formatting, style. Simplify flag match.
-
-2012-05-16 Alan Modra <amodra@gmail.com>
-
- * dwarf2.c: Formatting.
- (arange_add): Pass in unit rather than bfd. Update callers.
- Ignore empty ranges. Don't ask for cleared memory.
- (parse_comp_unit): Only set unit->base_address if processing
- DW_TAG_compile_unit.
- (find_debug_info): Optimise section lookup.
- (place_sections): Use bfd_alloc for stash->adjusted_sections.
- (find_line): Match previously parsed comp unit addresses as we
- do for newly parsed comp units.
-
-2012-05-16 Alan Modra <amodra@gmail.com>
-
- * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
- stops at end of ar_size field.
-
-2012-05-16 Alan Modra <amodra@gmail.com>
-
- PR ld/13962
- PR ld/7023
- * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
- out of range. As a special case, fix sh_info for zero sh_size.
- Do the same for .symtab.
-
-2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
- Stephane Carrez <stcarrez@nerim.fr>
-
- * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
- * config.bfd: Likewise.
- * cpu-m9s12x.c: New.
- * cpu-m9s12xg.c: New.
- * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
- Add option to offset S12 addresses into XGATE memory space.
- Fix carry bug in IMM16 (IMM8 low/high) relocate.
- * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
- (ALL_MACHINES_CFILES): Likewise.
- * reloc.c: Add S12X relocs.
- * Makefile.in: Regenerate.
- * bfd-in2.h: Regenerate.
+2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * elf64-mips.c (micromips_elf64_howto_table_rel): Add
+ R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
+ (micromips_elf64_howto_table_rela): Likewise.
+ (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
+ * elfn32-mips.c (elf_micromips_howto_table_rel): Add
+ R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
+ (elf_micromips_howto_table_rela): Likewise.
+ (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
+
+2013-02-18 Paul Brook <paul@codesourcery.com>
+
+ * elfxx-mips.c (MICROMIPS_P): New macro.
+ (_bfd_mips_elf_symbol_processing): Use it.
+
+2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
+ comment on _PROCEDURE_LINKAGE_TABLE_ creation.
+
+2013-02-18 Alan Modra <amodra@gmail.com>
+
+ PR ld/12549
+ * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
+ (_bfd_elf_strtab_clear_all_refs): Declare.
+ (_bfd_elf_strtab_resize): Declare.
+ * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
+ (_bfd_elf_strtab_clear_all_refs): New function.
+ (_bfd_elf_strtab_resize): Likewise.
+ * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
+
+2013-02-18 Alan Modra <amodra@gmail.com>
+
+ * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
+ 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-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/15146
+ * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
+ for references from the dummy bfd.
+
+2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/15149
+ * elflink.c (elf_link_add_object_symbols): Also track weak
+ references.
+
+2013-02-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/15151
+ * archive.c (_bfd_find_nested_archive): Don't allow a nested
+ archive pointing to itself.
+ (_bfd_get_elt_at_filepos): Revert the last 2 changes.
+
+2013-02-15 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/15140
+ * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
+ accessing a corrupt nested archive.
+
+2013-02-13 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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.
+
+2013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
+ in g->relocs.
+
+2013-02-12 Alan Modra <amodra@gmail.com>
+
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
+ suitable definition when using generic linker hash table.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
+ aliasing violation. Check for htab allocation failures.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
+ gotidx to -1.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_got_info): Move global_gotsym to...
+ (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * 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.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
+ if there are TLS relocations.
+
+2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (mips_elf_recreate_got): Remove free.
+ (mips_elf_resolve_final_got_entries): Remove bogus comment.
+
+2013-02-11 Alan Modra <amodra@gmail.com>
+
+ * elfcode.h (elf_checksum_contents): Free contents.
+ * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
+ * elflink.c (_bfd_elf_link_hash_table_free): New function.
+ (elf_final_link_free): New function, extracted from..
+ (bfd_elf_final_link): ..here. Always call
+ _bfd_elf_write_section_eh_frame_hdr.
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
+ _bfd_elf_link_hash_table_free.
+ * libbfd-in.h (_bfd_merge_sections_free): Declare.