X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=bfd%2FChangeLog;h=ce54d18fd61277863f292c2295fb12c66922dba7;hb=21da9f89f2648f919c97277358cd4078b81047ae;hp=e2fb365912674b5e13ed1f30e3f5251278c95eb8;hpb=3882b010780ca1aa1ed5d7b38e936cd2d6d5486b;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e2fb365912..ce54d18fd6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,916 @@ +2001-11-02 John David Anglin + + * som.c (setup_sections): Initialize subspace_sections. + +2001-11-02 H.J. Lu (hjl@gnu.org) + + * coffgen.c (coff_object_p): Return 0 if the header is too big. + +2001-11-02 Hans-Peter Nilsson + + * elfcore.h (elf_core_file_p): Preserve and clear abfd section + information. Save bfd arch and mach values. Restore on error. + +2001-11-02 Alan Modra + + * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls. + (allocate_PIC_calls): New function. + (allocate_dynrelocs): Don't allocate pic_call plt entries here. + (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls. + (elf32_hppa_finish_dynamic_symbol): Remove dead code. + +2001-11-02 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_grok_prstatus): New function. + (cris_elf_grok_psinfo): New function. + (elf_backend_grok_prstatus): Define. + (elf_backend_grok_psinfo): Define. + +2001-11-01 Alan Modra + + * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch + prediction bits. + +2001-10-31 Chris Demetriou + + * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative + relocations properly. + +2001-10-31 H.J. Lu + + * elflink.h (elf_link_output_extsym): Don't clear the visibility + field for relocateable. + +2001-11-01 Alan Modra + + * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count + .plt relocs in DT_RELASZ. + +2001-10-29 NIIBE Yutaka + + * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu + targets. + +2001-10-31 Nick Clifton + + * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec. + +2001-10-30 Hans-Peter Nilsson + + * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo. + (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo. + (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c. + Regenerate dependencies. + * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors. + * config.bfd: [BFD64] (mmix-*-*): New case. + * cpu-mmix.c, mmo.c, elf64-mmix.c: New files. + * archures.c (enum bfd_architecture): Add bfd_arch_mmix. + (bfd_mmix_arch): Declare. + (bfd_archures_list): Add bfd_mmix_arch. + * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour. + (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare. + (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and + bfd_mmo_mmix_vec. + * reloc.c: Add MMIX relocations. + * bfd.c (struct _bfd, tdata): Add mmo_data. + * Makefile.in: Regenerate. + * configure: Regenerate. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * configure: Rebuild. + +2001-10-30 Richard Earnshaw (rearnsha@arm.com) + + * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the + p_paddr of the segment that contains it. + (copy_private_bfd_data): If the LMA for a segment is known, use it + for matching sections to segments. + (assign_file_positions_for_segments): Use the LMA when adjusting + for inter-section alignment padding. + +2001-10-29 Kazu Hirata + + * README: Fix a typo. + +2001-10-24 Richard Henderson + + * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy + timestamp to time_t for ctime. + +2001-10-24 Hans-Peter Nilsson + + * elf32-cris.c (cris_reloc_type_lookup): Change loop to use + unsigned, increasing index. + +2001-10-23 H.J. Lu + + * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check + m != NULL before accessing it. + +2001-10-23 Alan Modra + + * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing + bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup + doesn't accept BFD_RELOC_* on some targets, eg. hppa. + + * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs. + (hppa_link_hash_newfunc): Likewise. + (elf32_hppa_finish_dynamic_symbol): Likewise. + (allocate_dynrelocs): Always allocate .got relocs if shared. + (elf32_hppa_relocate_section): Output them too. Similarly + consolidate .plt reloc code, and no longer initialise .plt + when a reloc is output. + (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries + when no reloc is output. + + From Herbert Xu + * elf32-hppa.c (final_link_relocate): Call bfd_set_error for + unreachable branches. + +2001-10-22 H.J. Lu + + * configure.in (WIN32LIBADD): Use -L../libiberty for + mips*-*-linux*. + * configure: Rebuild. + +2001-10-21 H.J. Lu + + * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty + if shared library is enabled only for Linux hosts. + * configure: Rebuild. + +2001-10-21 H.J. Lu + + * configure.in (WIN32LIBADD): Check if PICFLAG is defined in + ../libiberty/Makefile instead of $enable_shared. + * configure: Rebuild. + +2001-10-21 H.J. Lu + + * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover + index 0. + +2001-10-20 H.J. Lu + + * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty + if shared library is enabled. + * configure: Rebuild. + +2001-10-20 H.J. Lu + + * elf32-cris.c (cris_reloc_type_lookup): Allow index 0. + +2001-10-19 H.J. Lu + + * elfcode.h (elf_object_p): Don't clear D_PAGED if the section + size is empty. + +2001-10-18 H.J. Lu + + * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + +2001-10-18 Jakub Jelinek + + * section.c (_bfd_strip_section_from_output): Don't count + SEC_EXCLUDE sections as references. Set SEC_EXCLUDE. + +2001-10-17 Alan Modra + + * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to + Elf_Internal_Shdr.contents now that it's no longer a PTR. + * elf-m10300.c (mn10300_elf_relax_section): Likewise. + * elf32-h8300.c (elf32_h8_relax_section): Likewise. + * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise. + * elf32-sh.c (sh_elf_relax_section): Likewise. + * elf64-alpha.c (elf64_alpha_relax_section): Likewise. + * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. + * elf.c (setup_group): Warning fixes. + * elflink.h (elf_link_sort_relocs): Likewise. + * pdp11.c (slurp_reloc_table): Likewise. + +2001-10-16 Jeff Holcomb + + * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer + casts. + +2001-10-15 H.J. Lu + + * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE + for relocations against discarded link-once section. + +2001-10-15 Alan Modra + + * elf32-i386.c (elf_i386_relocate_section): Report some detail on + bfd_reloc_outofrange and similar errors. + + * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type + rather than ind->weakdef. + * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise. + * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. + * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. + +2001-10-15 Alan Modra + H.J. Lu + + * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc + counts for aliases instead of aborting. + * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + + * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset + to -1 for non-function symbols. + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. + * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. + * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise. + * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to + plt.offset instead of plt.refcount when setting to -1. + +2001-10-12 Nick Clifton + + * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22 + like R_ARM_PC24. Include reloc number in error message about + unresolvable relocs. + +2001-10-10 Jakub Jelinek + + * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT + relocations against the same symbol in .rel{,a}.dyn section. + +2001-10-10 Kazu Hirata + + * aout-encap.c: Fix comment typos. + * aoutx.h: Likewise. + * archive.c: Likewise. + * bout.c: Likewise. + * coff64-rs6000.c: Likewise. + * coffcode.h: Likewise. + * coffgen.c: Likewise. + * cofflink.c: Likewise. + * coff-mips.c: Likewise. + * ecoff.c: Likewise. + * elf32-m32r.c: Likewise. + * libcoff-in.h: Likewise. + * libecoff.h: Likewise. + * libxcoff.h: Likewise. + * nlm32-i386.c: Likewise. + * pdp11.c: Likewise. + * section.c: Likewise. + * som.c: Likewise. + * som.h: Likewise. + * bfd-in2.h: Regenerate. + * libcoff.h: Likewise. + +2001-10-10 Alan Modra + + * elf.c (elf_map_symbols): Don't create new section symbols; Use + existing section syms. Update comments. + (copy_private_bfd_data): Formatting fixes. + (elfcore_grok_win32pstatus): Likewise. + (swap_out_syms): Likewise. Remove unnecessary level of braces. + +2001-10-09 Alan Modra + + * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to + "group_name". + (elf_group_name): Define. + (elf_next_in_group): Define. + * elf.c: Make use of elf_group_name and elf_next_in_group throughout. + (setup_group): Don't use sec->lineno for SHT_GROUP section to store + first member section; Instead use elf_next_in_group. + (bfd_section_from_shdr): Likewise. + (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol. + +2001-10-09 Alan Modra + + * elf-bfd.h (struct bfd_elf_section_data): Add "group" and + "next_in_group". Fix gp and gp_size comments. + * elf.c (union elf_internal_group): New. + (setup_group): New function. + (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP. + Call setup_group for SHF_GROUP sections. + (bfd_section_from_shdr): Build a BFD section for SHT_GROUP. + (elf_fake_sections): Set header type for SEC_GROUP, and header + flags for sections in a group. + (set_group_contents): New function. + (_bfd_elf_compute_section_file_positions): Call it. + (assign_section_numbers): Set sh_link for SHT_GROUP. + + * elflink.h (gc_mark_hook): Handle section groups. + * elfxx-target.h: Add SEC_GROUP to applicable_flags. + * section.c (SEC_GROUP): Define. + (struct sec): Comment fixes. + * bfd-in2.h: Regenerate. + + * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression + out of function args. + (_bfd_elf_canonicalize_reloc): Similarly. + (_bfd_elf_get_symtab): Here too. + (_bfd_elf_canonicalize_dynamic_symtab): And here. + * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for + bfd_bread, and remove unnecessary cast. + +2001-10-08 Aldy Hernandez + + * bfd/config.bfd (targ_cpu): Add arm9e-*-elf. + +2001-10-06 Stephane Carrez + + * dwarf2.c (comp_unit_find_nearest_line): Check for end of + compilation unit. + +2001-10-06 Alan Modra + + * bfd.c (bfd_assert): Report bfd version. + (_bfd_abort): Likewise. + + * elflink.h (elf_link_input_bfd): Don't zero discarded link-once + section sym values. Instead replace any relocs against them with + relocs against STN_UNDEF, which has a zero value. + + * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all + relocs. + +2001-10-05 Jeff Law + + * som.h (som_exec_data): New field "version_id". + * som.c (som_object_setup): Record the version_id if it + exists. + (som_prep_headers): Do not initialize version_id here. + (som_finish_writing): Initialize version_id here. + +2000-10-05 Thiemo Seufer + + * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos + according to the MIPS/SGI ELF64 ABI Draft. + (mips_elf_sort_hash_table): Typo. + +2001-10-04 Alan Modra + + * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo. + + * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after + copying flags if this is a weakdef. + +2001-10-04 Alan Modra + + * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better + packing. + + * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset + to 1 rather than 0 to avoid confusing copy_indirect_symbol. + (mips_elf_sort_hash_table_f): Compare got.offset against 1. + + * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything + depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those + backends we configure. Run "make dep-am". + (install-data-local): Install symcat.h. + * dep-in.sed: Remove symcat.h from dependencies. + * Makefile.in: Regenerate. + +2001-10-03 Vassili Karpov + + * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc. + +2001-10-03 Thiemo Seufer + + * elf64-mips.c (elf_backend_may_use_rela_p): New define. + (elf_backend_default_use_rela_p): New define. + +2001-10-03 Alan Modra + + * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last + change. + + * configure.in (AC_OUTPUT ): Remove version.h. + * configure: Regenerate. + * Makefile.am (BFD_H_FILES): Add version.h. + * Makefile.in: Regenerate. + * po/SRC-POTFILES.in: Regenerate. + + * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using + elf_backend_copy_indirect_symbol so that backend has a chance to + copy other necessary fields. + * elf-bfd.h (struct elf_backend_data): Update description of + elf_backend_copy_indirect_symbol. + * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after + copying flags if this is a weakdef. + * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise. + (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather + than bfd_link_hash_lookup. + * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy + reloc processing for weakdefs. + * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. + +2001-10-02 Alan Modra + + * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast + result of ELF64_R_TYPE to enum before using in a switch. + (ppc64_elf_gc_mark_hook): Likewise. + (ppc64_elf_gc_sweep_hook): Likewise. + (ppc64_elf_reloc_type_class): Likewise. + +2001-10-02 Alan Modra + + * version.h: New file. + * bfd-in.h: (BFD_VERSION): Substitute bfd_version. + (BFD_VERSION_DATE): Define. + (BFD_VERSION_STRING): Define. + * configure.in: AC_SUBST bfd_version, bfd_version_date and + bfd_version_string. + (AC_OUTPUT ): Depend on version.h. + * bfd-in2.h: Regenerate. + * configure: Regenerate. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + * bfd-in.h: Include "symcat.h". + (CONCAT4): Redefine as for old CAT4. + * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros. + Add warning regarding whitespace. + * aout-cris.c: Likewise. + * aout-ns32k.c: Likewise. + * aout-sparcle.c: Likewise. + * aout-tic30.c: Likewise. + * aout0.c: Likewise. + * armnetbsd.c: Likewise. + * demo64.c: Likewise. + * elf-bfd.h: Likewise. + * gen-aout.c: Likewise. + * host-aout.c: Likewise. + * hp300bsd.c: Likewise. + * hp300hpux.c: Likewise. + * i386aout.c: Likewise. + * i386bsd.c: Likewise. + * i386dynix.c: Likewise. + * i386freebsd.c: Likewise. + * i386linux.c: Likewise. + * i386lynx.c: Likewise. + * i386mach3.c: Likewise. + * i386netbsd.c: Likewise. + * libaout.h: Likewise. + * m68k4knetbsd.c: Likewise. + * m68klinux.c: Likewise. + * m68klynx.c: Likewise. + * m68knetbsd.c: Likewise. + * m88kmach3.c: Likewise. + * mipsbsd.c: Likewise. + * newsos3.c: Likewise. + * ns32knetbsd.c: Likewise. + * pc532-mach.c: Likewise. + * pdp11.c: Likewise. + * riscix.c: Likewise. + * sparclinux.c: Likewise. + * sparclynx.c: Likewise. + * sparcnetbsd.c: Likewise. + * sunos.c: Likewise. + * targets.c: Likewise. + * vaxnetbsd.c: Likewise. + * vms-hdr.c: Likewise. + +2001-10-01 Alan Modra + + * bfd-in.h: Remove comments regarding generated files. + * libbfd-in.h: Likewise. + * libcoff-in.h: Likewise. + * bfd-in2.h: Regenerate. + * libbfd.h: Likewise. + * libcoff.h: Likewise. + +2001-09-30 kaz Kojima + Hans-Peter Nilsson + + * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make + partial_inplace, matching assembler output. Set src_mask to + all ones. + (sh_elf_relocate_section): Delete misplaced comment. + For relocatable linking against section symbol, call + _bfd_relocate_contents for partial_inplace relocs and adjust + rel->r_addend for others. + : Fetch partial_inplace addend with + bfd_get_32, not at rel->r_addend. + +2001-09-30 Alan Modra + + * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to + the old dir refcount, so we indirectly set them to init_refcount. + Short-circuit asserts when we've just verified they are true. + +2001-09-29 Alan Modra + + * section.c (struct sec): Remove kept_section. + (STD_SECTION): Remove kept_section initialisation. + (bfd_make_section_anyway): Here too. + * ecoff.c (bfd_debug_section): Remove kept_section initialisation. + * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section. + * elflink.h (elf_link_input_bfd): Set discarded link-once section + symbols to zero, and remove all code involved with kept_section + and tracking section symbol values. + * bfd-in2.h: Regenerate. + * configure.in: Bump version number. + * configure: Regenerate. + +2001-09-29 Alan Modra + + * elf64-ppc.c (struct ppc_dyn_relocs): New. + (IS_ABSOLUTE_RELOC): Define. + (struct ppc_link_hash_entry): New. + (struct ppc_link_hash_table): New. + (ppc_hash_table): Define. + (link_hash_newfunc): New function. + (ppc64_elf_link_hash_table_create): New function. + (create_got_section): New function. + (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash + pointers to our dynamic sections in hash table. + (ppc64_elf_copy_indirect_symbol): New function. + (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to + dynamic sections. Localise vars. Modify code for refcounts + starting from zero. Don't allocate here, or force symbols dynamic. + Don't copy all relocs if shared, select ones we need. Add code + to track possible copy relocs for non-shared link. + (ppc64_elf_gc_mark_hook): Update comment. + (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too. + (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt + code for reference counting garbage collection. Don't create .plt + entries for functions that don't comply with ABI naming convention, + and don't allocate .plt space here. Use short-cuts to dynamic + sections. If possible, keep dynamic relocations instead of using + copy relocs. Remove confused comments. + (ppc_adjust_dynindx): Delete. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define. + (allocate_dynrelocs): New function. + (readonly_dynrelocs): New function. + (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got + space here, and call allocate_dynrelocs to allocate space for + global .plt, .got and reloc sections. Use short-cuts to dynamic + sections. Call readonly_dynrelocs to determine whether we need + DT_TEXTREL. Don't generate section symbols here, the generic + ELF linker code does it for us. + (ppc64_elf_final_link): Call regular ELF backend linker rather than + gc variety, since we do our own .got handling. + (ppc64_elf_relocate_section): Remove DEBUG code. Make use of + dynamic section short-cuts. Localise vars, and delay setting. + Handle unknown relocs in main switch statement. Replace ugly + complicated tests for unresolvable relocs with a simple direct + scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY + before allowing an undefined sym in a shared lib. Do R_*_DS tests + after main switch, when we've set addend. Do non-addend insn + tweaks before main swithc. Ignore input_section->vma when + calculating reloc offsets as it's always zero. Rewrite dynamic + reloc handling. Consolidate R_*_HA handling. Handle more relocs. + (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use + of dynamic section short-cuts. Reorganise .plt handling code. + Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL. + Move expressions out of swap_reloca_out function calls. + (ppc64_elf_reloc_type_class): New function. + (ppc64_elf_info_to_howto): Move common expression to local var. + (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use + of dynamic section short-cuts. Don't fiddle with section syms + here as the ELF linker does it for us. + (elf_backend_can_refcount): Define. + (bfd_elf64_bfd_link_hash_table_create): Define. + (elf_backend_copy_indirect_symbol): Define. + (elf_backend_reloc_type_class): Define. + (elf_backend_*, bfd_elf64_bfd_* defines): Sort. + +2001-09-29 Alan Modra + + * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount. + (struct elf_backend_data): Add can_refcount. + * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set + got.refcount and plt.refcount from init_refcount. + (_bfd_elf_link_hash_table_init): Set up init_refcount. + (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount + rather than got/plt.offset, and test for <= 0 rather than -1. + * elflink.h (size_dynamic_sections): Set init_refcount to -1. + * elfxx-target.h (elf_backend_can_refcount): Define. + (elfNN_bed): Init can_refcount. + * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts. + (_bfd_generic_link_hash_newfunc): Likewise. + * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts + starting from zero. + (elf32_hppa_copy_indirect_symbol): Make static to agree with + prototype. + (elf_backend_can_refcount): Define. + * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts + starting from zero. + (allocate_dynrelocs): Set plt/got.offset rather than *.refcount. + (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment. + (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars. + (elf_backend_can_refcount): Define. + (elf_i386_copy_indirect_symbol): Make static to agree with + prototype. Formatting fix. + * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts + starting from zero. + (elf_backend_can_refcount): Define. + + * som.c (som_write_symbol_strings): Cast current_offset in + bfd_seek call to match param type. + +2001-09-28 J. Brobecker + + * som.c (som_write_symbol_strings): Fix incorrect type of + current_offset to match the function definition. Fixes a build + failure on HPUX-11.00. + +2001-09-28 Richard Henderson + + * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA, + SEC_MERGE, SEC_STRINGS. + + * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN. + * bfd-in2.h: Rebuild. + +2001-09-28 Alan Modra + + * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd + reloc code using x86_64_reloc_map. + + * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we + no longer allocate here. Localise some vars to blocks where they + are used. + (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay + setting of vars until needed. + (allocate_dynrelocs): Don't create a .plt entry without a reloc + when symbol visibilty makes a function local. + (elf32_hppa_finish_dynamic_symbol): Move expressions out of + swap_reloca_out function calls. + (elf32_hppa_relocate_section): Likewies. Comment typo fix. + (elf32_hppa_finish_dynamic_sections): Migrate common code out of + switch statement. + + * elf32-i386.c (elf_i386_check_relocs): Update comment since we + no longer allocate here. Localise some vars to blocks where they + are used. Remove separate switch stmt for creating .got sec. + (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove + redundant casts and aborts. Delay setting of vars until needed. + (allocate_dynrelocs): Remove redundant casts and aborts. + (elf_i386_size_dynamic_sections): Move comment. + (elf_i386_finish_dynamic_symbol): Move expressions out of function + calls. + (elf_i386_relocate_section): Likewise. Comment typo fix. + (elf_i386_finish_dynamic_sections): Migrate common code out of + switch statement. + (elf_backend_* defines): Sort. + + * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry + without a reloc when symbol visibilty makes a function local. + +2001-09-27 Nick Clifton + + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of + conflicting float flags. + +2001-09-26 Alan Modra + + * elf32-i386 (elf_i386_copy_indirect_symbol): New function. + (elf_backend_copy_indirect_symbol): Define. + (struct elf_i386_link_hash_entry): Rename "root" to "elf". + (struct elf_i386_link_hash_table): Likewise. + (link_hash_newfunc): Get rid of unnecessary casts. + (elf_i386_link_hash_table_create): Likewise. + (elf_i386_check_relocs): Initialise local_got_refcounts to 0. + Don't test input section SEC_READONLY here to try to avoid copy + relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF. + (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY + here to properly test whether we need copy relocs. Do so for weak + syms too. + + * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function. + (elf_backend_copy_indirect_symbol): Define. + (struct elf32_hppa_link_hash_table): Rename "root" to "elf". + (stub_hash_newfunc): Get rid of unnecessary casts. + (hppa_link_hash_newfunc): Likewise. + (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0. + Don't test input section SEC_READONLY here to try to avoid copy + relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF. + (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY + here to properly test whether we need copy relocs. Do so for weak + syms too. + +2001-09-26 Alan Modra + + * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS, + VA_OPEN, VA_FIXEDARG, VA_CLOSE. + (bfd_archive_filename): Cast bfd_malloc arg to the correct size. + +2001-09-25 Jakub Jelinek + + * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot + computation. + +2001-09-25 H.J. Lu + + * bfd-in2.h: Regenerated. + +2001-09-25 Alan Modra + + * elf32-i386.c: Add comment re linker function names and ordering. + (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc. + (elf_i386_grok_prstatus): Move before linker functions. + (elf_i386_grok_psinfo): Likewise. + (elf_i386_fake_sections): Move so that functions are ordered. + (elf_i386_reloc_type_class): Likewise. Comment function purpose. + +2001-09-25 Alan Modra + + * elf32-hppa.c: Rename occurrences of "hplink" to "htab" + throughout file. + + * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all + code handling this option. + (LONG_BRANCH_VIA_PLT): Likewise. + (RELATIVE_DYNRELOCS): Define as zero. + (struct elf32_hppa_dyn_reloc_entry): Add "sec", and + "pc_count" fields. Remove "section" field. + (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs. + (elf32_hppa_check_relocs): Don't allocate space for dynamic + relocs here. Instead, record all needed dynamic relocs via + dyn_relocs and local_dynrel. Cache pointer to "sreloc" section + in elf_section_data. + (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. + (allocate_plt_and_got_and_discard_relocs): Rename to + allocate_dynrelocs. Allocate rather than discarding dyn relocs. + (readonly_dynrelocs): New function. + (elf32_hppa_size_dynamic_sections): Mark output_bfd unused. + Call readonly_dynrelocs to determine need for DT_TEXTREL. + Rename "i" to "ibfd". Allocate space for local dyn relocs. + (elf32_hppa_relocate_section): Make use of cached sreloc. + (elf32_hppa_reloc_type_class): New function. + (elf_backend_reloc_type_class): Define. + +2001-09-25 Alan Modra + + * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel" + and "sreloc" fields. + * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and + "pc_count" fields. Remove "section" field. + (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't + allocate space for dynamic relocs here. Instead, record all + needed dynamic relocs via dyn_relocs and local_dynrel. Cache + pointer to "sreloc" section in elf_section_data. + (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel. + (allocate_plt_and_got_and_discard_relocs): Rename to + allocate_dynrelocs. Allocate rather than discarding dyn relocs. + (readonly_dynrelocs): New function. + (elf_i386_size_dynamic_sections): Call readonly_dynrelocs. + Rename "i" to "ibfd". Allocate space for local dyn relocs. + (elf_i386_relocate_section): Make use of cached sreloc. + +2001-09-24 Alan Modra + + * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire + reloc rather than just the type. + (_bfd_elf_reloc_type_class): Likewise. + * elf.c (_bfd_elf_reloc_type_class): Likewise. + * elf32-arm.h (elf32_arm_reloc_type_class): Likewise. + * elf32-cris.c (elf_cris_reloc_type_class): Likewise. + * elf32-i386.c (elf_i386_reloc_type_class): Likewise. + * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise. + * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise. + * elf32-s390.c (elf_s390_reloc_type_class): Likewise. + * elf32-sh.c (sh_elf_reloc_type_class): Likewise. + * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise. + * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise. + * elf64-s390.c (elf_s390_reloc_type_class): Likewise. + * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise. + * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise. + * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise. + * elflink.h: Formatting fixes. + (elf_link_sort_relocs): Make "count" and "size" bfd_size_type. + Call bfd_zmalloc rather than calloc. Remove unnecessary cast of + o->contents to PTR. Update call to elf_backend_reloc_type_class. + +2001-09-22 John Reiser + + * elfcode.h (elf_object_p): Allow for no section header at all in + non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff. + +2001-09-21 Nick Clifton + + * elfxx-ia64.c: Fix compile time warning messages. + * coff-mcore.c: Fix compile time warning messages. + * coff-ppc.c: Fix compile time warning messages. + * coffcode.h: Fix compile time warning messages. + * elf32-mips.c: Fix compile time warning messages. + * elf64-alpha.c: Fix compile time warning messages. + * libbfd.c: Fix compile time warning messages. + * bfd-in2.h: Regenerate. + +2001-09-21 Alan Modra + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + + * aoutx.h: Formatting fixes. + * merge.c (_bfd_merged_section_offset): Break line at 80 chars. + + * linker.c: Replace bfd_get_filename with bfd_archive_filename + in error message. + +2001-09-21 Alan Modra + + * bfd.c (bfd_archive_filename): New function. + * bfd-in2.h: Regenerate. + * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename + in error messages where the bfd is an input bfd. + * aout-cris.c: Likewise. + * coff-arm.c: Likewise. + * coff-mcore.c: Likewise. + * coff-ppc.c: Likewise. + * coff-rs6000.c: Likewise. + * coff-sh.c: Likewise. + * coff-tic54x.c: Likewise. + * coff-tic80.c: Likewise. + * coff64-rs6000.c: Likewise. + * coffcode.h: Likewise. + * coffgen.c: Likewise. + * cofflink.c: Likewise. + * ecofflink.c: Likewise. + * elf-hppa.h: Likewise. + * elf.c: Likewise. + * elf32-arm.h: Likewise. + * elf32-cris.c: Likewise. + * elf32-gen.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-i370.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-m32r.c: Likewise. + * elf32-mcore.c: Likewise. + * elf32-mips.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-sparc.c: Likewise. + * elf32-v850.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-gen.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-sparc.c: Likewise. + * elf64-x86-64.c: Likewise. + * elflink.h: Likewise. + * elfxx-ia64.c: Likewise. + * ieee.c: Likewise. + * ihex.c: Likewise. + * libbfd.c: Likewise. + * pdp11.c: Likewise. + * pe-mips.c: Likewise. + * peicode.h: Likewise. + * srec.c: Likewise. + * xcofflink.c: Likewise. + + * elf32-arm.h: Make _bfd_error_handler calls K&R compatible. + + * elflink.c (_bfd_elf_create_linker_section): Better grammar for + error message. + + * coff-mcore.c (coff_mcore_relocate_section): Internalionalise + error message. + + * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types. + Consolidate error messages, and split long messages to two lines. + +2001-09-20 John Reiser + + * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic + and info->allow_shlib_undefined. + * elf32-cris.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-m68k.c: Likewise. + * elf32-mips.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-sparc.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-hppa.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-sparc.c: Likewise. + * elf64-x86-64.c: Likewise. + * elfxx-ia64.c: Likewise. + 2001-09-18 Bruno Haible * aoutx.h: Include "safe-ctype.h" instead of .