2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
section structure.
include/
2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (bfd_link_info): Replace need_relax_finalize with
relax_pass.
ld/
2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
link_info.need_relax_finalize.
* ldlang.c (relax_sections): New.
(lang_process): Use. Call relax_sections link_info.relax_pass
times.
* ldmain.c (main): Set link_info.relax_pass to 1. Remove
link_info.need_relax_finalize.
James E Wilson <wilson@specifixinc.com>
PR ld/2442
* elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
(elfNN_ia64_local_hash_entry): Add count, sorted_count and
size.
(elfNN_ia64_link_hash_entry): Likewise.
(elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
and size.
(elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
processing.
(elfNN_ia64_hash_hide_symbol): Likewise.
(elfNN_ia64_global_dyn_sym_thunk): Likewise.
(elfNN_ia64_local_dyn_sym_thunk): Likewise.
(elfNN_ia64_global_dyn_info_free): New function.
(elfNN_ia64_local_dyn_info_free): Likewise.
(elfNN_ia64_hash_table_free): Free local and global
elfNN_ia64_dyn_sym_info.
(addend_compare): New function.
(sort_dyn_sym_info): Likewise.
(get_dyn_sym_info): Updated to use binary search for addend.
(elfNN_ia64_check_relocs): Scan relocations to create dynamic
relocation arrays first.
(elfNN_ia64_relax_section): Reallocate .rela.got when .got has
changed.
(allocate_dynrel_entries): Look only at GOT relocations when
only_got is true.
(elfNN_ia64_size_dynamic_sections): Set only_got to false before
calling allocate_dynrel_entries.
2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (bfd_elf_set_group_contents): Ignore linker created
group section.
(assign_section_numbers): Accept link_info. Check SHT_GROUP
sections for relocatable files only. Remove the linker created
group sections.
(_bfd_elf_compute_section_file_positions): Pass link_info to
assign_section_numbers.
* elfxx-ia64.c (elfNN_ia64_object_p): New.
(elf_backend_object_p): Defined.
gas/
2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ia64.c (start_unwind_section): Undo the change
of 2004-08-18.
(generate_unwind_image, dot_endp): Likewise.
* elf-bfd.h (elf_backend_data): Add int to
elf_backend_section_from_shdr.
(bfd_elf_section_data): Update comment for this_idx.
(_bfd_elf_make_section_from_shdr): Add int.
* elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
* elf.c (_bfd_elf_make_section_from_shdr): Take section index
and use it to set this_idx in bfd_elf_section_data.
(bfd_section_from_shdr): Pass shindex to
_bfd_elf_make_section_from_shdr.
(_bfd_elf_section_from_bfd_section): Use this_idx in
bfd_elf_section_data to find section index.
* elf32-arm.c (elf32_arm_section_from_shdr): Take section
index and pass it to _bfd_elf_make_section_from_shdr.
* elf32-i370.c(i370_elf_section_from_shdr): Likewise.
* elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
* elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
* elf32-v850.c (v850_elf_section_from_shdr): Likewise.
* elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
* elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
* elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
* elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
* elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2005-02-15 Jan Beulich <jbeulich@novell.com>
* elfxx-ia64.c (ia64_howto_table): Correct strings for
R_IA64_DTPMOD64[LM]SB.
gas/
2005-02-15 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (ia64_gen_real_reloc_type): Define and initialize
new variables type, suffix, and width. Handle
BFD_RELOC_IA64_DIR(32|64)[LM]SB in FUNC_LT_FPTR_RELATIVE case.
Handle BFD_RELOC_IA64_DIR64[LM]SB in FUNC_TP_RELATIVE case. Add
FUNC_DTP_MODULE case. Handle BFD_RELOC_IA64_DIR32[LM]SB in
FUNC_DTP_RELATIVE case. Return incoming relocation type if
BFD_RELOC_IA64_IPLT[LM]SB in FUNC_IPLT_RELOC case. Generate warning
if unable to translate relocation type, using the new variables.
gas/testsuite/
2005-02-15 Jan Beulich <jbeulich@novell.com>
* gas/ia64/reloc.[ds]: New.
* gas/ia64/reloc-bad.[ls]: New.
* gas/ia64/ia64.exp: Run new tests.
* elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
backward branch in the same section.
(elfNN_ia64_relocate_section): Inform users that the input
section is too big to relax br instruction when overflow
happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
and R_IA64_PCREL21F.
Nick Clifton <nickc@redhat.com>
PR 290
* bfd.c (_bfd_default_error_handler): Make it global.
* elf-bfd.h (elf_backend_data): Add link_order_error_handler.
* elf.c (assign_section_numbers): Cope gracefully with sections
which have SHF_LINK_ORDER set but no sh_link set up.
* elflink.c (elf_get_linked_section_vma): Likewise.
* elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
it to NULL.
* elfxx-target.h (elf_backend_link_order_error_handler): New.
Set it to _bfd_default_error_handler.
(elfNN_bed): Add elf_backend_link_order_error_handler.
* libbfd-in.h (_bfd_default_error_handler): New.
* libbfd.h: Regenerated.
2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (bfd_elf_section_data): Add a pointer for the
linked-to section.
(elf_linked_to_section): New.
* elf.c (assign_section_numbers): Set up sh_link for
SHF_LINK_ORDER.
* elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
to sh_link for SHT_IA_64_UNWIND sections.
gas/
2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ia64.c (start_unwind_section): Set the linked-to
section.
(ia64_elf_section_change_hook): Set the linked-to section for
SHT_IA_64_UNWIND.
* elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
field to track if a relocation is against readonly section.
(count_dyn_reloc): Take a new argument for rent->reltext.
(elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
(get_reloc_section): Don't set ia64_info->reltext here.
(allocate_dynrel_entries): Set ia64_info->reltext here.
2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Use the
need_relax_finalize field in link_info instead of
relax_finalizing to check if the relax finalize pass is being
done.
include/
2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (bfd_link_info): Change relax_finalizing to
need_relax_finalize.
ld/
2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
* emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Set
link_info.need_relax_finalize to TRUE.
* ldlang.c (lang_process): Use link_info.need_relax_finalize
instead of link_info.relax_finalizing.
* ldmain.c (main): Likewise.
bfd/ChangeLog
* elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
(elfNN_ia64_size_dynamic_sections): When stripping sections, check
for ia64_info->rel_fptr_sec.
ld/ChangeLog
* emulparams/elf64_ia64.sh (OTHER_PLT_RELOC_SECTIONS): Include
.rela.opd if -pie.
(struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
fields.
(struct elfNN_ia64_local_hash_table): Remove.
(struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
to htab_t. Add loc_hash_memory field.
(elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
Removed.
(elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
functions.
(elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
loc_hash_table. Initialize loc_hash_memory.
(elfNN_ia64_hash_table_free): New function.
(elfNN_ia64_local_hash_lookup): Remove.
(elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
callback.
(elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
(get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
(bfd_elfNN_bfd_link_hash_table_free): Define.
* elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
(SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
* elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
* elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
* elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
Update all callers to provide the relocation being resolved.