ppc64_elf_edit_opd revamp
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 08dda5a3f781ba2b39ae544d9b81956767874526..67b00707adf7b95ce38df20d7036ada0a7e4863b 100644 (file)
@@ -1,3 +1,376 @@
+2014-12-02  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (OPD_NDX): Define.  Use throughout for sizing/indexing
+       _opd_sec_data array, halving required memory.
+       (sort_r_offset): New function.
+       (ppc64_elf_edit_opd): Sort incoming relocs.  Accept .opd
+       sections with a mix of 16 and 24 byte OPD entries.  Don't
+       attempt to honour --non-overlapping-opd for .opd sections with
+       unexpected relocs.  Simplify opd entry size calculations by
+       first finding the reloc for the next entry.  Make edit loop
+       handle one opd entry per iteration, with an inner loop
+       handling relocs per entry.
+
+2014-12-01  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * archive.c (do_slurp_coff_armap): Add range checks to prevent
+       running off the end of the string table.
+       * compress.c (bfd_get_full_section_contents): Return a NULL
+       pointer for zero sized sections.  Do not attempt to copy a buffer
+       onto itself.
+       * elf-attrs.c (_bfd_elf_parse_attributes): Check for an empty
+       header.  Add range checks to avoid running off the end of the
+       section.
+       * elf.c (bfd_elf_get_str_section): Seek before allocating so that
+       if the seek fails, no memory is allocated.
+       (bfd_elf_string_from_elf_section): Do not allocate a string from a
+       non string section.  It only leads to trouble later on.
+       (_bfd_elf_print_private_bfd_data): Check for there being too
+       little external dynamic data.
+       (bfd_section_from_shdr): Replace assertion with a failure mode.
+       (bfd_section_from_shdr): When walking a loaded group section use
+       the internal structure size, not the external size.  Check for the
+       group section being empty.
+       * elf32-i386.c (elf_i386_rtype_to_howto): Replace assertion with a
+       failure mode.
+       * elfcode.h (elf_slurp_reloc_table): Likewise.
+       * reloc.c (bfd_perform_relocation): Avoid seg-fault if the howto
+       parameter is NULL.
+
+2014-11-30  Alan Modra  <amodra@gmail.com>
+
+       PR 16452, 16457
+       * elflink.c (_bfd_elf_link_find_version_dependencies): Exclude
+       symbols from libraries that won't be listed in DT_NEEDED.
+       (elf_link_output_extsym): Don't output verdefs for such symbols.
+
+2014-11-28  Alan Modra  <amodra@gmail.com>
+
+       * elf.c (_bfd_elf_slurp_version_tables): Exit loops when vn_next/
+       vna_next/vd_next/vda_next is zero.  Correct counts.
+
+2014-11-27  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct
+       a discrepancy between the isymMax and ifdMax values in the
+       symbolic header.
+       * elf.c (_bfd_elf_print_private_bfd_data): Fix the range check
+       scanning the external dynamic entries.
+
+2014-11-26  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * coff-h8300.c (rtype2howto): Replace abort with returning a NULL
+       value.
+       * coff-h8500.c (rtype2howto): Likewise.
+       * coff-tic30.c (rtype2howto): Likewise.
+       * coff-z80.c (rtype2howto): Likewise.
+       * coff-z8k.c (rtype2howto): Likewise.
+       * coff-ia64.c (RTYPE2HOWTO): Always return a valid howto.
+       * coff-m68k.c (m68k_rtype2howto): Return a NULL howto if none
+       could be found.
+       * coff-mcore.c (RTYPE2HOWTO): Add range checking.
+       * coff-w65.c (rtype2howto): Likewise.
+       * coff-we32k.c (RTYPE2HOWTO): Likewise.
+       * pe-mips.c (RTYPE2HOWTO): Likewise.
+       * coff-x86_64.c (coff_amd64_reloc): Likewise.  Replace abort with
+       an error return.
+       * coffcode.h (coff_slurp_reloc_table): Allow the rel parameter to
+       be unused.
+       * coffgen.c (make_a_section_from_file): Check the length of a
+       section name before testing to see if it is a debug section name.
+       (coff_object_p): Zero out any uninitialised bytes in the opt
+       header.
+       * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Test for the raw
+       source being empty when there are values to be processed.
+       (_bfd_ecoff_slurp_symbol_table): Add range check.
+       * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Likewise.
+       (bfd_mach_o_mangle_sections): Move test for too many sections to
+       before the allocation of the section table.
+       (bfd_mach_o_read_symtab_strtab): If the read fails, free the
+       memory and nullify the symbol pointer.
+       * reloc.c (bfd_generic_get_relocated_section_contents): Add
+       handling of a bfd_reloc_notsupported return value.
+       * versados.c (EDATA): Add range checking.
+       (get_record): Likewise.
+       (process_otr): Check for contents being available before updating
+       them.
+       (versados_canonicalize_reloc): Add range check.
+
+2014-11-26  Alan Modra  <amodra@gmail.com>
+
+       * elf.c (_bfd_elf_slurp_version_tables): Delay allocation of
+       internal verref buffer.  Error for zero sh_info.  Print errors.
+       Check for zero vd_ndx.  Use bfd_zalloc for vd_auxptr buffer.
+
+2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use
+       NAME##_get_symbol_version_string.
+       (bfd_get_symbol_version_string): New.
+       * aout-adobe.c (aout_32_get_symbol_version_string): Define using
+       _bfd_nosymbols define.
+       * aout-target.h (MY_get_symbol_version_string): Likewise.
+       * aout-tic30.c (MY_get_symbol_version_string): Likewise.
+       * binary.c (binary_get_symbol_version_string): Likewise.
+       * bout.c (aout_32_get_symbol_version_string): Likewise.
+       * coff-rs6000.c (_bfd_xcoff_get_symbol_version_string): Likewise.
+       * i386msdos.c (msdos_get_symbol_version_string): Likewise.
+       * i386os9k.c (aout_32_get_symbol_version_string): Likewise.
+       * ieee.c (ieee_get_symbol_version_string): Likewise.
+       * ihex.c (ihex_get_symbol_version_string): Likewise.
+       * libecoff.h (_bfd_ecoff_get_symbol_version_string): Likewise.
+       * mach-o-target.c (bfd_mach_o_get_symbol_version_string): Likewise.
+       * mmo.c (mmo_get_symbol_version_string): Likewise.
+       * nlm-target.h (nlm_get_symbol_version_string): Likewise.
+       * oasys.c (oasys_get_symbol_version_string): Likewise.
+       * pef.c (bfd_pef_get_symbol_version_string): Likewise.
+       * plugin.c (bfd_plugin_get_symbol_version_string): Likewise.
+       * ppcboot.c (ppcboot_get_symbol_version_string): Likewise.
+       * som.c (som_get_symbol_version_string): Likewise.
+       * srec.c (srec_get_symbol_version_string): Likewise.
+       * tekhex.c (tekhex_get_symbol_version_string): Likewise.
+       * versados.c (versados_get_symbol_version_string): Likewise.
+       * vms-alpha.c (alpha_vms_get_symbol_version_string): Likewise.
+       * xsym.c (bfd_sym_get_symbol_version_string): Likewise.
+
+       * coff64-rs6000.c (rs6000_xcoff64_vec): Use
+       coff_get_symbol_version_string.
+       (rs6000_xcoff64_aix_vec): Likewise.
+
+       * elf-bfd.h (bfd_elf_get_symbol_version_string): Renamed to ...
+       (_bfd_elf_get_symbol_version_string): This.
+       * elf.c: Likewise.
+       (bfd_elf_print_symbol): Updated.
+       * elfxx-target.h (bfd_elfNN_get_symbol_version_string): Define.
+
+       * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Define.
+       * libcoff-in.h (coff_get_symbol_version_string): Likewise.
+       * bfd-in2.h: Regenerated.
+       * libbfd.h: Likewise.
+       * libcoff.h: Likewise.
+
+2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/16496
+       * elf-bfd.h (bfd_elf_get_symbol_version_string): New.
+       * elf.c (bfd_elf_get_symbol_version_string): New.  Extracted
+       from bfd_elf_print_symbol.
+       (bfd_elf_print_symbol): Use it.
+
+2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_got_plt_entry): New.
+       (elf_i386_pic_got_plt_entry): Likewise.
+       (elf_i386_link_hash_entry): Add plt_got.
+       (elf_i386_link_hash_table): Likewise.
+       (elf_i386_link_hash_newfunc): Initialize plt_got.offset to -1.
+       (elf_i386_get_local_sym_hash): Likewise.
+       (elf_i386_check_relocs): Create the GOT PLT if there are both
+       PLT and GOT references when the regular PLT is used.
+       (elf_i386_allocate_dynrelocs): Use the GOT PLT if there are
+       both PLT and GOT references unless pointer equality is needed.
+       (elf_i386_relocate_section): Also check the GOT PLT when
+       resolving R_386_PLT32.
+       (elf_i386_finish_dynamic_symbol): Use the GOT PLT if it is
+       available.
+
+       * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add plt_got.
+       (elf_x86_64_link_hash_table): Likewise.
+       (elf_x86_64_link_hash_newfunc): Initialize plt_got.offset to -1.
+       (elf_x86_64_get_local_sym_hash): Likewise.
+       (elf_x86_64_check_relocs): Create the GOT PLT if there are both
+       PLT and GOT references when the regular PLT is used.
+       (elf_x86_64_allocate_dynrelocs): Use the GOT PLT if there are
+       both PLT and GOT references unless pointer equality is needed.
+       (elf_x86_64_relocate_section): Also check the GOT PLT when
+       resolving R_X86_64_PLT32.
+       (elf_x86_64_finish_dynamic_symbol): Use the GOT PLT if it is
+       available.
+
+2014-11-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * configure: Regenerated.
+
+2014-11-24  Tejas Belagod  <tejas.belagod@arm.com>
+
+       * elfnn-aarch64.c (elf_aarch64_compare_mapping): New.
+       (erratum_835769_scan): Sort map list.
+
+2014-11-24  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (plt_stub_pad): Correct.
+
+2014-11-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Assert size of
+       elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
+       (elf_x86_64_allocate_dynrelocs): Don't assert size of
+       elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
+
+2014-11-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
+       branch displacement overflow in PLT entry.
+
+2014-11-21  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * coffgen.c (coff_get_normalized_symtab): Check for an excessive
+       number of auxillary entries.
+       * ieee.c (next_byte): Convert to a function.  Return FALSE if the
+       next byte is beyond the end of the buffer.
+       (parse_int): Test the return value of next_byte.
+       (parse_expression): Convert to boolean.  Return FALSE if the
+       parsing failed.  Test the return value of next_byte.
+       (ieee_seek): Convert to a function.  Return FALSE if the seek goes
+       beyond the end of the buffer.
+       (ieee_slurp_external_symbols): Test the return value of ieee_seek
+       and next_byte.
+       (ieee_slurp_sections): Convert to boolean.  Return FALSE if the
+       operation failed.  Test the return value of ieee_seek and
+       next_byte.
+       (ieee_archive_p): Test the return value of ieee_seek and
+       next_byte.
+       (do_one): Likewise.
+       (ieee_slurp_section_data): Likewise.
+       (ieee_object_p): Likewise.  Store the size of the buffer in the
+       total_amt field in the header.
+       * libieee.h (common_header_type): Add amt field.
+       * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Check that the
+       reloc's value is within range.
+       (bfd_mach_o_read_symtab_symbols): Nullify the symbols field if the
+       operation fails.
+       * pei-x86_64.c (pex64_xdata_print_uwd_codes): Replace abort with
+       an error message.
+       (pex64_dump_xdata): Check for buffer overflows.
+       * versados.c (process_otr): Check that the section exists before
+       taking its size.
+       (versados_object_p): Make sure that enough data was read for the
+       header to be checked.
+       * vms-alpha.c (vms_get_remaining_object_record): Change
+       read_so_far parameter to an unsigned int.  Check that the amount
+       read is in range.
+
+2014-11-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Optimize
+       PC-relative offset overflow check.
+
+2014-11-21  Alexander Cherepanov  <cherepan@mccme.ru>
+
+       PR binutils/17512
+       * coffgen.c (_bfd_coff_read_string_table): Test allocation of
+       string table before clearing the first few bytes.
+
+2014-11-21  Terry Guo  <terry.guo@arm.com>
+
+       * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support FPv5.
+
+2014-11-20  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (group_sections): Init stub14_group_size from
+       --stub-group-size parameter divided by 1024.
+
+2014-11-20  Alan Modra  <amodra@gmail.com>
+
+       * elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
+       alignment calculation.
+
+2014-11-20  Terry Guo  <terry.guo@arm.com>
+
+       * elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd
+       hasn't attribute section.
+
+2014-11-20  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
+
+2014-11-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/17618
+       * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
+       PC-relative offset overflow in PLT entry.
+
+2014-11-18  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * peXXIgen.c (pe_print_pdata): Fail if the section's virtual size
+       is larger than its real size.
+       (rsrc_print_section): Fix off-by-one error checking for overflow.
+       * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind
+       sections.
+
+2014-11-18  Igor Zamyatin  <igor.zamyatin@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
+       for -z bndplt.
+
+2014-11-14  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17597
+       * opncls.c (bfd_get_debug_link_info): Avoid reading off the end of
+       the section.
+       (bfd_get_alt_debug_link_info): Likewise.
+
+2014-11-14  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * ieee.c (ieee_archive_p) Skip processing if no bytes are read at
+       all.
+       (ieee_object_p): Likewise.
+
+2014-11-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * coffcode.h (coff_slurp_line_table): Add cast to unsigned int.
+
+2014-11-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * coffcode.h (coff_pointerize_aux_hook): Fix a typo.
+
+2014-11-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/17598
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Treat
+       R_X86_64_GOTPLT64 the same as R_X86_64_GOT64.
+       (elf_x86_64_relocate_section): Likewise.
+
+2014-11-13  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/17512
+       * coffcode.h (coff_ptr_struct): Add is_sym field.
+       (coff_new_section_hook): Set the is_sym field.
+       (coff_pointerize_aux_hook): Check the is_sym field.
+       (coff_print_aux): Likewise.
+       (coff_compute_section_file_positions): Likewise.
+       (coff_write_object_contents): Likewise.
+       (coff_slurp_line_table): Likewise.
+       (coff_slurp_symbol_table): Likewise.
+       (CALC_ADDEND): Likewise.
+       * coffgen.c (coff_renumber_symbols): Likewise.
+       (coff_mangle_symbols): Likewise.
+       (coff_fix_symbol_name): Likewise.
+       (coff_write_symbol): Likewise.
+       (coff_write_alien_symbol): Likewise.
+       (coff_write_native_symbol): Likewise.
+       (coff_write_symbols): Likewise.
+       (coff_write_linenumbers): Likewise.
+       (coff_pointerize_aux): Likewise.
+       (coff_get_normalized_symtab): Likewise.
+       (coff_get_symbol_info): Likewise.
+       (bfd_coff_get_syment): Likewise.
+       (bfd_coff_get_auxent): Likewise.
+       (coff_print_symbol): Likewise.
+       (coff_find_nearest_line_with_names): Likewise.
+       (bfd_coff_set_symbol_class): Likewise.
+       (coff_make_empty_symbol): Set the is_sym field.
+       (coff_bfd_make_debug_symbol): Likewise.
+       * peicode.h (pe_ILF_make_a_symbol): Likewise.
+       * libcoff.h: Regenerate.
+       * libcoff-in.h: Regenerate.
+
 2014-11-12  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/17512
This page took 0.026625 seconds and 4 git commands to generate.