PR23652, Use symbols from debug bfd for _bfd_elf_find_function
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index d13d9695ff0243e1b507e02612818059b24a7307..4a0852e577d314ab19d762c625d52e2916c0dbc8 100644 (file)
@@ -1,3 +1,142 @@
+2019-11-27  Alan Modra  <amodra@gmail.com>
+
+       PR 23652
+       * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
+       (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
+       _bfd_elf_find_function.  Call _bfd_elf_find_function in cases
+       where _bfd_elf_find_nearest_line would do so.
+       * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
+       for dwarf2.
+       * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.  Tidy.
+       * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
+       (elf_backend_maybe_function_sym): Define.
+       (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
+       (bfd_elf32_find_nearest_line): Don't define.
+       * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
+       (elf_backend_maybe_function_sym): Define.
+       (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
+       (bfd_elfNN_find_nearest_line): Don't define.
+
+2019-11-27  Alan Modra  <amodra@gmail.com>
+
+       * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
+       (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
+       by two before applying to insn.  Correct overflow test.
+       * coff-sh.c (sh_reloc): Likewise.
+
+2019-11-26  Nick Clifton  <nickc@redhat.com>
+
+       * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
+       negative relocated value.
+       * coff-sh.c (sh_reloc): Likewise.
+
+2019-11-25  Alan Modra  <amodra@gmail.com>
+
+       * archures.c (bfd_octets_per_byte): Tail call
+       bfd_arch_mach_octets_per_byte.
+       * coff-arm.c (OCTETS_PER_BYTE): Define.
+       (coff_arm_reloc): Introduce new "octets" temp.  Use OCTETS_PER_BYTE
+       with section.  Correct "addr".  Remove ATTRIBUTE_UNUSED.
+       * coff-i386.c (coff_i386_reloc): Similarly.
+       * coff-mips.c (mips_reflo_reloc): Similarly.
+       * coff-x86_64.c (coff_amd64_reloc): Similarly.
+       * elf32-msp430.c (OCTETS_PER_BYTE): Define.
+       (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
+       * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
+       * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
+       * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
+       * elf32-s12z.c (opru18_reloc): Similarly.
+       * elf32-sh.c (sh_elf_reloc): Similarly.
+       * elf32-spu.c (spu_elf_rel9): Similarly.
+       * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
+       * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
+       (ppc64_elf_toc64_reloc): Similarly.
+       * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
+       * cofflink.c (_bfd_coff_link_input_bfd),
+       (_bfd_coff_reloc_link_order): Likewise.
+       * elf.c (_bfd_elf_section_offset): Likewise.
+       * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
+       (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
+       (bfd_elf_final_link): Likewise.
+       * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
+       to set SEC_ELF_OCTETS.
+       * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
+       (bfd_install_relocation): Likewise.
+       (_bfd_final_link_relocate): Don't recalculate octets.
+       * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
+       "octets" temp.
+       * bfd-in2.h: Regenerate.
+
+2019-11-25  Christian Eggers  <ceggers@gmx.de>
+
+       * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
+       * archures.c (bfd_octets_per_byte): New parameter sec.
+       If section is not NULL and SEC_ELF_OCTETS is set, one octet es
+       returned [ELF targets only].
+       * bfd.c (bfd_get_section_limit): Provide section parameter to
+       bfd_octets_per_byte.
+       * bfd-in2.h: regenerate.
+       * binary.c (binary_set_section_contents): Move call to
+       bfd_octets_per_byte into section loop. Provide section parameter
+       to bfd_octets_per_byte.
+       * coff-arm.c (coff_arm_reloc): Provide section parameter
+       to bfd_octets_per_byte.
+       * coff-i386.c (coff_i386_reloc): likewise.
+       * coff-mips.c (mips_reflo_reloc): likewise.
+       * coff-x86_64.c (coff_amd64_reloc): likewise.
+       * cofflink.c (_bfd_coff_link_input_bfd): likewise.
+       (_bfd_coff_reloc_link_order): likewise.
+       * elf.c (_bfd_elf_section_offset): likewise.
+       (_bfd_elf_make_section_from_shdr): likewise.
+       Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
+       .debug*, .zdebug* and .note.gnu*.
+       * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
+       to bfd_octets_per_byte.
+       * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
+       * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
+       * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
+       * elf32-s12z.c (opru18_reloc): likewise.
+       * elf32-sh.c (sh_elf_reloc): likewise.
+       * elf32-spu.c (spu_elf_rel9): likewise.
+       * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
+       * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
+       (ppc64_elf_addr16_ha_reloc): likewise.
+       (ppc64_elf_toc64_reloc): likewise.
+       * elflink.c (bfd_elf_final_link): likewise.
+       (bfd_elf_perform_complex_relocation): likewise.
+       (elf_fixup_link_order): likewise.
+       (elf_link_input_bfd): likewise.
+       (elf_link_sort_relocs): likewise.
+       (elf_reloc_link_order): likewise.
+       (resolve_section): likewise.
+       * linker.c (_bfd_generic_reloc_link_order): likewise.
+       (bfd_generic_define_common_symbol): likewise.
+       (default_data_link_order): likewise.
+       (default_indirect_link_order): likewise.
+       * srec.c (srec_set_section_contents): likewise.
+       (srec_write_section): likewise.
+       * syms.c (_bfd_stab_section_find_nearest_line): likewise.
+       * reloc.c (_bfd_final_link_relocate): likewise.
+       (bfd_generic_get_relocated_section_contents): likewise.
+       (bfd_install_relocation): likewise.
+       For section which have SEC_ELF_OCTETS set, multiply output_base
+       and output_offset with bfd_octets_per_byte.
+       (bfd_perform_relocation): likewise.
+
+2019-11-21  Alan Modra  <amodra@gmail.com>
+
+       * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
+       BFDs that have not been loaded.
+
+2019-11-19  Alan Modra  <amodra@gmail.com>
+
+       PR 25197
+       * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
+       u.syment.n_value does point at another C_FILE sym and not into
+       some auxent that happens to look like a C_FILE.  Properly check
+       for integer overflow and avoid possible pointer wrap-around.
+       Simplify pr17512 checks.
+
 2019-11-19  Alan Modra  <amodra@gmail.com>
 
        PR 25200
This page took 0.024451 seconds and 4 git commands to generate.