bfd/
[external/binutils.git] / bfd / ChangeLog
index 682cd1e..6bbe72a 100644 (file)
@@ -1,5 +1,469 @@
+2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
+
+       * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
+       * bfd-in2.h: Regenerate.
+       * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
+       bfd_mach_cpu32_fido.
+       (m68k_arch_features): Use fido_a instead of cpu32.
+       (bfd_m68k_compatible): Reject the combination of Fido and
+       ColdFire.  Accept the combination of CPU32 and Fido with a
+       warning.
+       * elf32-m68k.c (elf32_m68k_object_p,
+       elf32_m68k_merge_private_bfd_data,
+       elf32_m68k_print_private_bfd_data): Treat Fido as an
+       architecture by itself.
+
+2007-01-08  Kai Tietz  <kai.tietz@onevision.com>
+
+       * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
+
+2007-01-05  Jakub Jelinek  <jakub@redhat.com>
+
+       * texhex.c (first_phase): Don't fall through into the default
+       case.
+       (pass_over): Replace abort () calls with return FALSE.  Fix
+       buffer overflow.
+
+2007-01-04  Jie Zhang  <jie.zhang@analog.com>
+
+       * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
+       SEC_EXCLUDE on zero size .eh_frame.
+
+2006-12-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * bfd.c (bfd_record_phdr): Call bfd_zalloc instead of bfd_alloc
+       to allocate elf_segment_map.
+
+2006-12-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_link_add_object_symbols): Remember the symbol
+       size only if it is defined.
+
+2006-12-25  Kazu Hirata  <kazu@codesourcery.com>
+
+       * archures.c (bfd_mach_cpu32_fido): New.
+       (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a,
+       bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac,
+       bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
+       bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp,
+       bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac,
+       bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac,
+       bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float,
+       bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac):
+       Increment the defined values.
+       * bfd-in2.h: Regenerate.
+       * cpu-m68k.c (arch_info_struct): Add en entry for
+       bfd_mach_cpu32_fido.
+       * elf32-m68k.c (elf32_m68k_object_p): Handle
+       EF_M68K_CPU32_FIDO_A.
+       (elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK.
+       (elf32_m68k_print_private_bfd_data): Handle
+       EF_M68K_CPU32_FIDO_A.
+
+2006-12-25  Mei Ligang  <ligang@sunnorth.com.cn>
+       
+       * elf32-score.c (score_elf_got_lo16_reloc): Change some variables
+       type from unsigned to signed.
+       (score_elf_final_link_relocate): Fix bugs of handling relocation
+       type R_SCORE_GOT15, R_SCORE_GOT_LO16, and R_SCORE_REL32.
+       (_bfd_score_elf_relocate_section): Handle R_SCORE_GOT_LO16
+       specially.
+
+2006-12-23  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf-bfd.h (struct elf_backend_data): Add as_needed_cleanup hook.
+       * elfxx-target.h (elf_backend_as_needed_cleanup): Define.
+       (elfNN_bed): Add as_needed_cleanup hook.
+       * elflink.c (elf_link_add_object_symbols): Call it when reverting
+       hash table changes for unneeded --as-needed input.
+       * elf64-ppc64.c (elf_backend_as_needed_cleanup): Define.
+       (ppc64_elf_as_needed_cleanup): New function.
+
+2006-12-19  Kazu Hirata  <kazu@codesourcery.com>
+
+       * elf32-m68k.c (elf32_m68k_object_p,
+       elf32_m68k_print_private_bfd_data): Use EF_M68K_ARCH_MASK to
+       extract architecture mask.
+
+2006-12-19  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * elf.c (assign_file_positions_for_load_sections): Adjust p_vaddr
+       by p_vaddr_offset.  Copy alignment & use if it is valid.
+       (rewrite_elf_program_headers): Cope with leading padding in a
+       segment that does not contain file or program headers.
+       (copy_elf_program_header): Likewise.
+
+2006-12-15  Mark Kettenis  <kettenis@gnu.org>
+
+       * config.bfd: (sh*-*-openbsd*): Add target. 
+       * configure.in (sh*-*-openbsd*): Set COREFILE to netbsd-core.lo.
+       * configure: Regenerate.
+
+2006-12-15  Alan Modra  <amodra@bigpond.net.au>
+
+       * opncls.c (bfd_openr_iovec): Add "stat" parameter.
+       (struct opncls): Add "stat" field.
+       (opncls_bstat): Call vec->stat.
+       * bfd-in2.h: Regenerate.
+       * elf32-spu.c (spu_elf_open_builtin_lib): Adjust.
+
+2006-12-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-bfd.h (struct bfd_elf_section_data): Clarify sec_group
+       and next_in_group usage.
+
+2006-12-14  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 3704
+       * bfdio.c (bfd_bread): Don't read past end of archive elements.
+
+2006-12-12  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * doc/Makefile.am (bfd_TEXINFOS): Set.
+       (bfd.info bfd.dvi bfd.html): Delete rule.
+       * doc/Makefile.in: Regenerated.
+
+2006-12-11  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * configure.in: Define GENINSRC_NEVER.
+       * doc/Makefile.am (bfd.info): Remove srcdir prefix.
+       (MAINTAINERCLEANFILES): Add info file.
+       (DISTCLEANFILES): Pretend to add info file.
+       * po/Make-in (.po.gmo): Put gmo files in objdir.
+       * configure, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-12-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * elflink.c (bfd_elf_gc_sections): Also search for corresponding
+       sections with .gnu.linkonce.t. prefix.
+
+2006-12-07  Kazu Hirata  <kazu@codesourcery.com>
+
+       * elf32-m68k.c: Update uses of EF_M68K_*.
+
+2006-12-07  H.J. Lu <hjl@gnu.org>
+
+       PR ld/3666
+       * elflink.c (elf_link_add_object_symbols): Keep symbol
+       visibility for symbols from discarded section.
+
+2006-12-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-alpha.c (elf64_alpha_merge_symbol_attribute): New function.
+       (elf_backend_merge_symbol_attribute): Define.
+
+2006-12-04  Jan Beulich  <jbeulich@novell.com>
+
+       * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
+       .eh_frame_hdr section from here anymore.
+       (bfd_elf_size_dynamic_sections): Call _bfd_elf_maybe_strip_eh_frame_hdr
+       a little earlier.
+
+2006-12-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/3609
+       * elf.c (rewrite_elf_program_header): Preserve segment physical
+       address in the output segment if the first section in the
+       corresponding input segment is null.
+
+2006-12-01  Nick Clifton  <nickc@redhat.com>
+
+       PR 3609
+       * elf.c (rewrite_elf_program_header): Do not use the first_section
+       pointer if it is null.
+
+2006-11-29  Paul Brook  <paul@codesourcery.com>
+
+       * elf32-arm.c (elf32_arm_to_thumb_export_stub): Assert that output
+       section is present.
+       (allocate_dynrelocs): Only add export stub for symbols defined in
+       this object.
+
+2006-11-29  Paul Brook  <paul@codesourcery.com>
+
+       * elf32-arm.c (elf32_arm_to_thumb_export_stub): Assert that output
+       section is present.
+       (allocate_dynrelocs): Only add export stub for symbols defined in
+       this object.
+
+2006-11-29  Paul Brook  <paul@codesourcery.com>
+       Julian Brown  <julian@codesourcery.com>
+
+       * elf32-arm.c (copy_eabi_attributes): Correct starting offset.
+       (elf32_arm_merge_eabi_attributes): Mark output as initialized.
+       Only set Tag_CPU_name and Tag_ABI_PCS_R9_use if input attribute
+       is present.
+
+2006-11-27  Bob Wilson  <bob.wilson@acm.org>
+
+       * elf32-xtensa.c (elf_xtensa_special_sections): Add .xtensa.info.
+
+2006-11-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf.c (IS_SECTION_IN_INPUT_SEGMENT): New.
+       (INCLUDE_SECTION_IN_SEGMENT): Use IS_SECTION_IN_INPUT_SEGMENT.
+       (rewrite_elf_program_header): Don't preserve segment physical
+       address in the output segment if the first section in the
+       corresponding input segment is removed.
+
+2006-11-22  Alan Modra  <amodra@bigpond.net.au>
+
+       * pef.c (bfd_pef_make_empty_symbol): Delete function.  Define instead.
+       * xsym.c (bfd_sym_make_empty_symbol): Likewise.
+       * xsym.h (bfd_sym_make_empty_symbol): Delete.
+
+2006-11-21  Greg McGary  <greg@mcgary.org>
+
+       * elf32-ppc.c (ppc_elf_relocate_section): Fixup D field
+       at proper offset in little-endian mode.
+       * elf64-ppc.c (ppc_elf_relocate_section): Likewise.
+
+2006-11-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf-eh-frame.c (struct cie): New type.
+       (cie_compare): Removed.
+       (cie_eq, cie_hash, cie_compute_hash): New functions.
+       (_bfd_elf_discard_section_eh_frame): Rewrite not to rely on FDEs
+       pointing only to last CIE and allow merging of any duplicate CIEs,
+       not just duplicate consecutive CIEs.
+       (_bfd_elf_discard_section_eh_frame_hdr): Delete cies hash table.
+       * elf-bfd.h (struct cie_header, struct cie): Removed.
+       (struct eh_frame_sec_info): Remove alloced field.
+       (struct eh_frame_hdr_info): Remove last_cie, last_cie_sec
+       and last_cie_inf fields.  Add cies field.
+
+2006-11-20  Alan Modra  <amodra@bigpond.net.au>
+
+       * bfd-in.h (struct stat): Don't typedef.
+       * bfdio.c (bfd_get_size): Return a file_ptr.
+       * cisco-core.c (cisco_core_file_validate): Use bfd_size_type for nread.
+       * mmo.c (mmo_scan): Use file_ptr for curpos.
+       * trad-core.c (trad_unix_core): Don't cast statbuf.st_size to
+       unsigned long.
+       * bfd-in2.h: Regenerate.
+
+2006-11-20  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 3532
+       * bfd-in.h (struct bfd_hash_table): Reorganize.  Add "frozen".
+       * hash.c (bfd_hash_table_init_n): Init frozen.
+       (bfd_hash_lookup): Don't grow if frozen.
+       (bfd_hash_traverse): Freeze hash table during traversal.
+       * bfd-in2.h: Regenerate.
+
+2006-11-18  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (_bfd_elf_check_kept_section): Test for kept group
+       section.  Save result of checks in kept_section.
+       (_bfd_elf_section_already_linked): Tidy.  Correct comments.
+       Ignore all group member sections.  Handle special matching of
+       single-member groups against linkonce sections via their group
+       section.  When such a match is found, set kept_section to the
+       group member section rather than to the group.
+
+2006-11-14  Phil Lello  <phil.lello@homecall.co.uk>
+
+       * peXXigen.c: Updates for PE/COFF V8.0, and clarification
+       (dir_names): Added CLR Runtime Header to dir_names[].
+       (_bfd_XX_print_private_bfd_data_common): Added EFI_ROM and XBOX
+       subsystem names
+       (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out)
+       (pe_print_idata, pe_print_edata)
+       (_bfd_XX_bfd_copy_private_bfd_data_common)
+       (_bfd_XXi_final_link_postscript): Use #DEFINEs for index into
+       DataDirectory.
+
+2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
+       prototype.
+       (bfd_elf32_arm_set_byteswap_code): New prototype.
+       * bfd-in2.h: Regenerate.
+       * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Don't take
+       byteswap_code as an argument.  Revert 2006-11-01 change.
+       (bfd_elf32_arm_set_byteswap_code): New.
+       (elf32_arm_size_dynamic_sections): Call
+       bfd_elf32_arm_process_before_allocation.
+
+2006-11-10  Thiemo Seufer  <ths@mips.com>
+
+       * config.bfd (mips*el-sde-elf*, mips*-sde-elf*): Drop ECOFF support
+       for SDE configs.
+
+2006-11-10  Nick Clifton  <nickc@redhat.com>
+
+       * config.bfd: Move previously obsoleted targets to the REMOVED
+       list.
+       Add maxq-*-coff to the obsolete list.
+
+2006-11-10  Pedro Alves  <pedro_alves@portugalmail.pt>
+
+       * pe-arm-wince.c (LOCAL_LABEL_PREFIX): Define as ".".
+       * pei-arm-wince.c (LOCAL_LABEL_PREFIX): Likewise.
+       * coff-arm.c (LOCAL_LABEL_PREFIX): Only define if not defined before.
+
+2006-11-07  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * elf32-arm.c (find_thumb_glue): Add ERROR_MESSAGE argument; set it
+       on error.
+       (find_arm_glue): Likewise.
+       (elf32_thumb_to_arm_stub, elf32_arm_create_thumb_stub)
+       (elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate): Add
+       ERROR_MESSAGE argument and pass it through.
+       (elf32_arm_to_thumb_export_stub): Update.
+       (elf32_arm_relocate_section): Use ERROR_MESSAGE and reloc_dangerous.
+
+2006-11-07  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (enum _ppc64_sec_type): New.
+       (struct _ppc64_elf_section_data): Move "t_symndx" into opd union,
+       and rename fields.  Add sec_type and has_14bit_branch.
+       (struct ppc_link_hash_table): Remove has_14bit_branch.
+       (get_opd_info, get_tls_mask, ppc64_elf_edit_opd): Adjust.
+       (ppc64_elf_relocate_section): Likewise.
+       (ppc64_elf_check_relocs): Likewise.  Set per-section has_14bit_branch.
+       (ppc64_elf_size_stubs): Don't set default group size here.
+       (group_sections): Instead do so here, and group sections using
+       their individual requirements.
+
+2006-11-07  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (struct ppc64_elf_obj_tdata): Remove "has_dotsym"
+       and union.
+       (struct ppc_link_hash_entry): Add "next_dot_sym".
+       (struct ppc_link_hash_table): Add "dot_syms".
+       (link_hash_newfunc): Make list of syms starting with a dot.
+       (ppc_get_stub_entry, adjust_opd_syms): Adjust.
+       (ppc64_elf_add_symbol_hook): Don't set has_dotsym.
+       (struct add_symbol_adjust_data): Delete.
+       (add_symbol_adjust): Simplify params and return.
+       (ppc64_elf_check_directives): Just process the "dot_syms" lists,
+       not all syms.
+
+2006-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * libbfd-in.h (_bfd_clear_contents): New prototype.
+       * reloc.c (_bfd_clear_contents): New.
+       * libbfd.h: Regenerated.
+
+       * elf32-arm.c (elf32_arm_final_link_relocate): Use
+       _bfd_clear_contents.
+       * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+       * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+       * elf32-i386.c (elf_i386_relocate_section): Likewise.
+       * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+       * elf32-s390.c (elf_s390_relocate_section): Likewise.
+       * elf32-sh.c (sh_elf_relocate_section): Likewise.
+       * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+       * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+       * elf64-s390.c (elf_s390_relocate_section): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Set value to
+       zero for discarded symbols.
+       * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+2006-11-01  Thiemo Seufer  <ths@mips.com>
+            David Ung  <davidu@mips.com>
+
+       * elf-bfd.h (local_call_stubs): New member.
+       * elfxx-mips.c (FN_STUB_P, CALL_STUB_P, CALL_FP_STUB_P): New macros.
+       (mips_elf_calculate_relocation): Handle local mips16 call stubs.
+       (mips16_stub_section_p): Rename from mips_elf_stub_section_p, use
+       the new stub macros.
+       (_bfd_mips_elf_check_relocs): Handle call stubs for code which
+       mixes mips16 and mips32 functions. Use mips16_stub_section_p. Mark
+       used stubs with SEC_KEEP. Use the new stub macros.
+
+2006-11-01  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct
+       check for PLT usage.
+
+2006-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * elfxx-mips.c (mips_elf_merge_gots): Always use maxcnt.
+
+2006-10-31  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (elfcore_write_note): Pad note descriptor to 4-byte
+       boundary.  Tidy.  Comment.
+
+2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/3111
+       * elf-bfd.h (elf_obj_tdata): Add symbuf.
+       (_bfd_elf_section_already_linked): Add struct bfd_link_info *.
+       (_bfd_elf_check_kept_section): Likewise.
+       (bfd_elf_match_symbols_in_sections): Likewise.
+
+       * elf.c (assign_section_numbers): Updated to add
+       struct bfd_link_info *.
+       (bfd_elf_match_symbols_in_sections): Updated. Cache symbol
+       buffer if info->reduce_memory_overheads is false.
+
+       * elflink.c (match_group_member): Updated to add
+       struct bfd_link_info *.
+       (_bfd_elf_check_kept_section): Likewise.
+       (elf_link_input_bfd): Likewise.
+       (_bfd_elf_section_already_linked): Likewise.
+       (bfd_elf_final_link): Free symbol buffer if
+       info->reduce_memory_overheads is false.
+
+       * libbfd-in.h (_bfd_nolink_section_already_linked): Add
+       struct bfd_link_info *.
+       (_bfd_generic_section_already_linked): Likewise.
+       * libbfd.h: Regenerated.
+
+       * linker.c (bfd_section_already_linked): Add
+       struct bfd_link_info *.
+       (_bfd_generic_section_already_linked): Likewise.
+       * targets.c (bfd_target): Add struct bfd_link_info * to
+       _section_already_linked.
+       * bfd-in2.h: Regenerated.
+
+2006-10-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * bfd.c (bfd_error_type): Add bfd_error_on_input.
+       (input_bfd, input_error): New static vars.
+       (bfd_set_error): Handle bfd_error_on_input.
+       (bfd_errmsg): Likewise.
+       (bfd_perror): Simplify.
+       * archive.c (_bfd_write_archive_contents): Report errors on input.
+       * bfd-in2.h: Regenerate.
+
+2006-10-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (elfcore_write_note): Pad to 4-byte boundary.
+
+2006-10-28  Richard Sandiford  <richard@codesourcery.com>
+
+       * elf32-mips.c (elf_mips_howto_table_rel): Add R_MIPS_GLOB_DAT.
+       * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
+       (elf_mips_howto_table_rela): Likewise.
+       * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
+       (mips_elf64_howto_table_rela): Likewise.
+
+2006-10-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf.c (_bfd_elf_init_private_section_data): Assert output
+       section ELF type instead of check if it is SHT_NULL.  Copy
+       OS/PROC specific flags from input section to output section.
+
+2006-10-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * section.c (SEC_KEEP): Update comment.
+       * bfd-in2.h: Regenerate.
+       * elflink.c (bfd_elf_gc_sections): Ignore SEC_EXCLUDE sections.
+       * merge.c (_bfd_merge_sections): Set SEC_KEEP on excluded sections.
+       * stabs.c (_bfd_discard_section_stabs): Likewise.
+       (_bfd_link_section_stabs): Likewise.  Simplify abs_section check.
+
 2006-10-26  Ben Elliston  <bje@au.ibm.com>
 
+       * reloc.c (_bfd_relocate_contents): Remove explicit case 0.
+
        * elf.c (bfd_section_from_shdr): Remove extraneous breaks.
        * targets.c (find_target): Remove extraneous break.
 
        (maxq_reloc_map): Likewise.
        (maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
 
-2006-10-26  Ben Elliston  <bje@au.ibm.com>     
+2006-10-26  Ben Elliston  <bje@au.ibm.com>
 
        * elf.c (bfd_elf_set_dyn_lib_class): Change second argument type
        from int to enum dynamic_lib_link_class lib_class.
 2006-09-16  Nick Clifton  <nickc@redhat.com>
            Pedro Alves  <pedro_alves@portugalmail.pt>
 
-       * bfd-in.h (STRING_AND_COMMA): New macro.  Takes one constant
+       * bfd-in.h (STRING_COMMA_LEN): New macro.  Takes one constant
        string as its argument and emits the string followed by a comma
        and then the length of the string.
        (CONST_STRNEQ): New macro.  Checks to see if a variable string