* elf32-ppc.c (struct elf_linker_section): Remove rel_section.
[binutils-gdb.git] / bfd / ChangeLog
index b2c94521bbd472786f71f0ddaee49ed1396e4034..93587fe5ebcd5b92955113d7b7f456a207cb51a1 100644 (file)
@@ -1,3 +1,447 @@
+2005-03-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
+       (ppc_elf_create_linker_section): Don't create rel_section.
+       (elf_create_pointer_linker_section): Don't size relocs.
+       (elf_finish_pointer_linker_section): Remove relative_reloc parm.
+       Don't generate relocs.
+       (ppc_elf_relocate_section): Adjust calls to
+       elf_finish_pointer_linker_section.
+
+2005-03-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (is_ppc_elf_target): New function.
+       (ppc_elf_merge_private_bfd_data): Use it rather than just testing
+       for bfd_target_elf_flavour.  Do this test before endian check.
+       (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
+       (ppc_elf_size_dynamic_sections): Likewise.
+
+2005-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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-03-19  Danny Smith <dannysmith@users.sourceforge.net>
+           Ross Ridge  <rridge@csclub.uwaterloo.ca>
+
+       * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
+       character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
+       cases.  Add comment.
+
+2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_mark_used_section): Remove check for special
+       sections.
+
+2005-03-18  Andreas Schwab  <schwab@suse.de>
+
+       * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
+       from bfd_vma to ia64_insn, remove broken cast.
+
+2005-03-18  C Jaiprakash  <cjaiprakash@noida.hcltech.com>
+
+       * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e. 
+       (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
+        elf_m68k_finish_dynamic_sections): Use it.
+
+2005-03-17  Paul Brook <paul@codesourcery.com>
+           Dan Jacobowitz <dan@codesourcery.com>
+           Mark Mitchell  <mark@codesourcery.com>
+
+       * elf32-arm.c (elf32_arm_modify_segment_map): New function.
+       (elf32_arm_additional_program_headers): Likewise.
+       (elf_backend_modify_segment_map): Define.
+       (elf_backend_additional_program_headers): Likewise.
+       (elf32_arm_symbian_modify_segment_map): Use
+       elf32_arm_modify_segment_map.
+
+2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_mark_used_section): Check bfd_is_const_section
+       for special sections.
+
+2005-03-18  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
+       * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
+       section_sym_count param, and return number of section symbols.
+       (bfd_elf_size_dynamic_sections): Clear section symbol area of
+       .dynsym contents.  Don't bother calling swap_symbol_out on the
+       first all-zero dynsym.
+       (elf_mark_used_section): Formatting.  Avoid twiddling flags in
+       special sections like bfd_abs_section.
+       (bfd_elf_gc_sections): Spelling fix.
+
+2005-03-16  Fred Fish  <fnf@specifixinc.com>
+
+       PR binutils/790
+       * dwarf2.c (read_indirect_string): Fix apparent typo, check
+       dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
+
+2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_mark_used_section): New.
+       (bfd_elf_gc_sections): Call elf_gc_mark_section for
+       non-relocatable link if we don't do GC.
+
+2005-03-16  Nick Clifton  <nickc@redhat.com>
+           Ben Elliston  <bje@au.ibm.com>
+
+       * configure.in (werror): New switch: Add -Werror to the
+       compiler command line.  Enabled by default.  Disable via
+       --disable-werror.
+       * configure: Regenerate.
+
+2005-03-16  Nick Clifton  <nickc@redhat.com>
+
+       * ecoff.c: Convert to ISO C90 formatting.
+
+2005-03-16  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c: Divide file into general and linker specific
+       functions.  Sort linker functions into roughly the order in which
+       they are called by the ELF linker code.
+
+2005-03-16  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
+       on section.  Correct comment, and add FIXME.
+       (ppc_elf_additional_program_headers): Don't bump header count for
+       interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
+       (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
+       do allocate memory if they need it.
+
+2005-03-15  Mikkel Krautz  <krautz@gmail.com>
+
+       * config.bfd (x86_64-elf): Add target.
+
+2005-03-15  Alan Modra  <amodra@bigpond.net.au>
+
+       * po/es.po: Commit new Spanish translation.
+
+2005-03-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
+       for global symbol when reporting overflow.
+
+2005-03-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * libbfd-in.h (_bfd_ar_spacepad): New prototype.
+       * libbfd.h: Rebuilt.
+       * archive.c (_bfd_ar_spacepad): New function.
+       (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
+       bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
+       coff_write_armap): Use it.
+       (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
+       uid/gid support.
+       * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
+
+2005-03-10  Mark Kettenis  <kettenis@gnu.org>
+
+       * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
+       has_table to the start of the function.
+
+2005-03-10  Ben Elliston  <bje@au.ibm.com>
+
+       * archive.c: Include hashtab.h.
+       (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
+       (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
+       (hash_file_ptr): New function.
+       (eq_file_ptr): Likewise.
+       (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
+       * libbfd-in.h: Include hashtab.h.
+       (struct artdata): Change `cache' member type to htab_t.
+       * libbfd.h: Rebuild.
+
+2005-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * configure.in: Bump version to 2.16.90.
+       * configure: Regenerated.
+
+2005-03-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
+       close is a function like macro in system headers.
+
+2005-03-07  Alan Modra  <amodra@bigpond.net.au>
+
+       PR ld/778
+       * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
+       _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
+
+2005-03-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (elfcore_grok_win32pstatus): Warning fixes.
+
+2005-03-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * po/bfd.pot: Regenerate.
+
+2005-03-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
+       with is_func.
+       (func_desc_adjust): Force dot-syms local in executables as well
+       as shared libs.
+
+2005-03-04  David Daney  <ddaney@avtrex.com>
+
+       * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
+       '__gnu_local_gp' symbol used by gas -mno-shared.
+
+2005-03-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_backend_data): Add "const char *" to
+       elf_backend_section_from_phdr.
+
+       * elf.c (bfd_section_from_phdr): Pass "proc" to the
+       elf_backend_section_from_phdr hook.
+
+2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
+           Joseph Myers  <joseph@codesourcery.com>
+
+       * elfxx-mips.c (struct mips_got_entry): Add tls_type.
+       (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
+       and tls_ldm_offset.
+       (struct mips_elf_got_per_bfd_arg): Add global_count.
+       (struct mips_elf_count_tls_arg): New.
+       (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
+       (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
+       (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
+       (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
+       (TLS_RELOC_P): Define.
+       (TP_OFFSET, DTP_OFFSET): Define.
+       (dtprel_base, tprel_base): New functions.
+       (mips_elf_link_hash_newfunc): Initialize tls_type.
+       (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
+       (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
+       TLS entries.
+       (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
+       (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
+       (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
+       (mips_tls_got_index): New functions.
+       (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
+       arguments.  Pass them to mips_elf_create_local_got_entry.  Use
+       mips_tls_got_index.
+       (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
+       Handle TLS entries.
+       (mips_elf_got_page, mips_elf_got16_entry): Update calls to
+       mips_elf_create_local_got_entry.
+       (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
+       arguments.  Handle TLS entries.
+       (mips_elf_sort_hash_table_f): Add non-TLS assertions.
+       (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
+       TLS entries.
+       (mips_elf_record_global_got_symbol): Likewise.
+       (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
+       Count TLS entries.
+       (mips_elf_merge_gots): Handle TLS entries when merging.
+       (mips_elf_initialize_tls_index): New function.
+       (mips_elf_set_global_got_offset): Handle TLS entries.
+       (mips_elf_adjust_gp): Handle TLS.
+       (mips_elf_multi_got): Remove redundant call to
+       mips_elf_resolve_final_got_entries.  Initialize global_count.
+       Correct a comment.  Initialize new TLS members of mips_got_info.
+       Assign TLS GOT indexes for new GOTs.
+       (mips_elf_create_got_section): Initialize new TLS members of
+       mips_got_info.
+       (mips_elf_calculate_relocation): Handle TLS relocs.
+       (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
+       functions.
+       (_bfd_mips_elf_always_size_sections): Handle TLS.
+       (_bfd_mips_elf_size_dynamic_sections): Likewise.
+       (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
+       changed functions.
+       (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
+       (_bfd_mips_elf_hide_symbol): Handle TLS.
+       * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
+       (mips_reloc_map): Add TLS relocs.
+       * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
+       * elf64-mips.c (mips_elf64_howto_table_rel)
+       (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
+       * reloc.c: Define new MIPS TLS relocations.
+       * libbfd.h, bfd-in2.h: Regenerated.
+
+2005-03-02  Jan Beulich  <jbeulich@novell.com>
+
+       * Makefile.am: Add dependency of cache.o on libiberty.h.
+       * cache.c: Include libiberty.h.
+       (bfd_open_file): Use unlink_if_ordinary instead of unlink.
+
+2005-03-01  Zack Weinberg  <zack@codesourcery.com>
+
+       * elf.c (bfd_section_from_shdr <default case>): Call
+       elf_backend_section_from_shdr hook unconditionally, and return
+       what it returns.
+       (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
+       * elfxx-target.h (elf_backend_section_from_shdr)
+       (elf_backend_section_from_phdr): Default to
+       _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
+       respectively.
+
+2005-03-01  Alan Modra  <amodra@bigpond.net.au>
+
+       * targets.h: Typo fix.
+       * bfd-in2.h: Regenerate.
+
+       * bout.c (b_out_write_object_contents): Don't use sizeof on host
+       structs to size on-disk structures.
+       (b_out_set_section_contents): Size the external struct, not the
+       internal one for on-disk size.
+       (b_out_sizeof_headers): Likewise.
+
+2005-03-01  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
+       entry points with the func descriptor as well as undefweak.
+
+2005-02-28  Ross Ridge  <rridge@csclub.uwaterloo.ca>
+
+       * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
+       present when IMPORT_NAME_UNDOECRATE is used.
+
+2005-02-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 757
+       * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
+       int.
+
+       * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
+       to _bfd_elf_merge_symbol.
+
+       * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
+       unsigned int to return the alignment of the old common symbol
+       in the dynamic object.
+       (_bfd_elf_add_default_symbol): Pass NULL to
+       _bfd_elf_merge_symbol.
+       (elf_link_add_object_symbols): Pass &old_alignment to
+       _bfd_elf_merge_symbol. Get the alignment of the new common
+       symbol in the dynamic object.
+
+2005-02-24  Ben Elliston  <bje@au.ibm.com>
+
+       * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
+       * format.c (bfd_check_format_matches): Likewise.
+       * archive.c (BFD_GNU960_ARMAG): Likewise.
+       (bfd_generic_archive_p): Likewise.
+       (_bfd_write_archive_contents): Likewise.
+
+2005-02-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
+       * configure: Regenerate.
+
+2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
+
+       * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
+       COMDAT group sections to have default visibility.
+
+2005-02-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * coffcode.h (coff_print_aux): Warning fix.
+       * elf-m10300.c (mn10300_elf_relax_section): Use section->id
+       instead of section pointer to identify.
+       * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
+       the correct size buffer for local sym mangling too.
+       (h8300_bfd_link_add_symbols): Likewise.
+       * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
+       warning.
+       * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
+       * elf32-xtensa.c (literal_value_hash): Warning fix.
+       * versados.c (process_otr): Warning fix.
+       (versados_canonicalize_reloc): Likewise.
+       * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
+       * vms.c (fill_section_ptr): Warning fix.
+
+2005-02-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
+       * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
+
+2005-02-23  Nick Clifton  <nickc@redhat.com>
+
+       * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
+       the relvaddr field of the Elf32_crinfo structure.
+
+       * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
+       variables that are passed by reference to
+       m68hc11_get_relocation_value in case that function does not
+       initialise them.
+
+       * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
+       return statements and replace with a single return at the end of
+       the function.  This helps pacify the flow analysis code in gcc 4.0.
+
+       * elf.c (_bfd_elf_compute_section_file_positions): Initialise
+       strtab to avoid compile time warning.
+
+2005-02-23  Ben Elliston  <bje@au.ibm.com>
+
+       * opncls.c (bfd_zalloc): Document this function.
+
+2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
+       SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
+       Replace SEC_SHARED with SEC_COFF_SHARED.
+       (styp_to_sec_flags): Likewise.
+
+       * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
+       (TARGET_LITTLE_SYM): Likewise.
+
+       * section.c (SEC_ARCH_BIT_0): Removed.
+       (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
+       SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
+       (SEC_SHARED): Renamed to ...
+       (SEC_COFF_SHARED): This.
+       (SEC_BLOCK): Renamed to ...
+       (SEC_TIC54X_BLOCK): This.
+       (SEC_CLINK): Renamed to ...
+       (SEC_TIC54X_CLINK): This.
+       (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
+       SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
+       end.
+       * bfd-in2.h: Regenerated.
+
+2005-02-21  Fred Fish  <fnf@specifixinc.com>
+
+       * dwarf2.c (find_abstract_instance_name): Call recursively
+       to handle a DW_AT_specification.
+
+2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
+
+       * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
+       mips_elf_create_dynamic_relocation,
+       _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
+       Remove #if 0'd code.
+
+2005-02-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * Makefile.am: Run "make dep-am"
+       * Makefile.in: Regenerate.
+
 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
 
        * coffgen.c (bfd_coff_get_comdat_section): Check that