Commit Graph

15615 Commits

Author SHA1 Message Date
GDB Administrator b921626516 Automatic date update in version.in 2019-11-28 00:00:20 +00:00
Alan Modra 7f3bf38453 PR23652, Use symbols from debug bfd for _bfd_elf_find_function properly
There were a number of problems with the previous patch.  Firstly,
_bfd_dwarf2_stash_syms didn't do anything when the original file had
dynamic symbols, and secondly, info found by the symbol search didn't
make it out of _bfd_elf_find_nearest_line except in the case of DWARF
functions without external linkage.

	PR 23652
	* dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
	matching section.
	(_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
	returning info from the symbol table.  Do the _bfd_elf_find_function
	search also when !found.  Call _bfd_dwarf2_stash_syms regardless of
	symbols.
	* elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
	result of 1 only.
	* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
	* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
	* libbfd.h: Regenerate.
2019-11-27 19:10:11 +10:30
Alan Modra e76790600a PR23652, Use symbols from debug bfd for _bfd_elf_find_function
Sometimes DWARF info for a function is incomplete, and the function
can be retrieved by examining symbols.  However, when separate debug
files are used it may be that the original file is completely
stripped of symbols.  This patch teaches BFD to look at symbols from
the debug file in that case.

The patch also removes arm_elf_find_function, instead implementing
elf_backend_maybe_function_sym.  arm_elf_find_function was written
before the generic _bfd_elf_find_function called maybe_function_sym.
aarch64 copied arm, so that file gets the same treatment.  There is
some chance this will speed up arm and aarch64 lookup of function/line.

	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 12:06:29 +10:30
Alan Modra 96e2dbda08 Correct R_SH_IND12W handling
Using bfd_vma for insn is to avoid having to worry about sign
propagation in expressions involving insn and sym_value when bfd_vma
is not the same as unsigned long.

	* 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-27 11:58:17 +10:30
GDB Administrator 855bae2c96 Automatic date update in version.in 2019-11-27 00:00:30 +00:00
Nick Clifton 239b426b11 Fix comparison operations in SH code that trigger warning in clang.
* 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-26 14:06:12 +00:00
GDB Administrator 4297119364 Automatic date update in version.in 2019-11-26 00:00:19 +00:00
Alan Modra bb2942085c Pass section when available to bfd_octets_per_byte
and other tidies.  I think it's better to default to passing the
section to bfd_octets_per_byte, even in cases where we know it won't
make a difference.

A number of the coff reloc functions used bfd_octets_per_byte wrongly,
not factoring it into the offset into the data buffer.  As it happens,
the targets using those files always had bfd_octets_per_byte equal to
one, so there wasn't any detectable wrong behaviour.  However, it is
wrong in the source and might cause trouble for anyone creating a new
target.  Besides fixing that, the patch also defines OCTETS_PER_BYTE
as one in target files where that is appropriate.

bfd/
	* 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.
ld/
	* ldexp.c (fold_name): Pass section to bfd_octets_per_byte.
	* ldlang.c (init_opb): Don't call bfd_arch_mach_octets_per_byte
	unnecessarily.
2019-11-25 14:32:19 +10:30
Christian Eggers 618265039f Introduce new section flag: SEC_ELF_OCTETS
All symbols, sizes and relocations in this section are octets instead of
bytes.  Required for DWARF debug sections as DWARF information is
organized in octets, not bytes.

bfd/
	* 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.
include/
	* coff/ti.h (GET_SCNHDR_SIZE, PUT_SCNHDR_SIZE, GET_SCN_SCNLEN),
	(PUT_SCN_SCNLEN): Adjust bfd_octets_per_byte calls.
binutils/
	* objdump.c (disassemble_data): Provide section parameter to
	bfd_octets_per_byte.
	(dump_section): likewise
	(dump_section_header): likewise. Show SEC_ELF_OCTETS flag if set.
gas/
	* as.h: Define SEC_OCTETS as SEC_ELF_OCTETS if OBJ_ELF.
	* dwarf2dbg.c: (dwarf2_finish): Set section flag SEC_OCTETS for
	.debug_line, .debug_info, .debug_abbrev, .debug_aranges, .debug_str
	and .debug_ranges sections.
	* write.c (maybe_generate_build_notes): Set section flag
	SEC_OCTETS for .gnu.build.attributes section.
	* frags.c (frag_now_fix): Don't divide by OCTETS_PER_BYTE if
	SEC_OCTETS is set.
	* symbols.c (resolve_symbol_value): Likewise.
ld/
	* ldexp.c (fold_name): Provide section parameter to
	bfd_octets_per_byte.
	* ldlang (init_opb): New argument s. Set opb_shift to 0 if
	SEC_ELF_OCTETS for the current section is set.
	(print_input_section): Pass current section to init_opb.
	(print_data_statement,print_reloc_statement,
	print_padding_statement): Likewise.
	(lang_check_section_addresses): Call init_opb for each
	section.
	(lang_size_sections_1,lang_size_sections_1,
	lang_do_assignments_1): Likewise.
	(lang_process): Pass NULL to init_opb.
2019-11-25 14:32:19 +10:30
GDB Administrator b5470a3c4a Automatic date update in version.in 2019-11-25 00:00:35 +00:00
GDB Administrator 48d4af36c5 Automatic date update in version.in 2019-11-24 00:00:56 +00:00
GDB Administrator 4719dcea61 Automatic date update in version.in 2019-11-23 00:00:23 +00:00
GDB Administrator c90569d301 Automatic date update in version.in 2019-11-22 00:00:14 +00:00
Alan Modra 73d5efd7e1 ARM cmse_scan segfault
This code in elf_link_add_object_symbols:

      ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed);
      if (ret < 0)
	goto error_return;

      /* If we have already included this dynamic object in the
	 link, just ignore it.  There is no reason to include a
	 particular dynamic object more than once.  */
      if (ret > 0)
	return TRUE;

prevents a shared library from being loaded twice by ensuring that any
library soname doesn't match the soname of one already loaded.  This
happens before sym_hashes are allocated, which leaves sym_hashes NULL.

cmse_scan looks at library symbols, and when attempting to look up a
global symbol will segfault if sym_hashes is zero.

	* elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
	BFDs that have not been loaded.
2019-11-21 21:08:30 +10:30
GDB Administrator b13e475ed2 Automatic date update in version.in 2019-11-21 00:00:23 +00:00
GDB Administrator fa4dea2445 Automatic date update in version.in 2019-11-20 00:00:29 +00:00
Alan Modra f14080d440 PR25197, assertion fail coffgen.c
The testcase in this PR triggered "BFD_ASSERT (p2->is_sym)" by
sneakily generating a C_FILE sym whose value pointed into auxents.
The fix then is in the last changed line of this patch, to check
p->is_sym as well as p->u.syment.n_sclass.  The other changes fix
various overflow checks that weren't as solid as they could be.

	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 12:31:22 +10:30
GDB Administrator 58bd3702d7 Automatic date update in version.in 2019-11-19 00:00:21 +00:00
Alan Modra 94698d0198 PR25200, SIGSEGV in _bfd_elf_validate_reloc
PR 25200
	* reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
	* elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
2019-11-19 07:35:05 +10:30
Alan Modra ed7e9d0bda elf_backend_init_file_header
This patch renames elf_backend_post_process_headers and moves the
prep_headers code into the new function.  Naming the backend functions
elf_backend_init_file_header and elf_backend_modify_headers makes it
clear which function is called first.

	* elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
	Rename from elf_backend_post_process_headers.
	(_bfd_elf_post_process_headers): Delete.
	(_bfd_elf_init_file_header): Declare.
	* elf.c (_bfd_elf_compute_section_file_positions): Call new function
	in place of prep_headers and elf_backend_post_process_headers.
	(_bfd_elf_init_file_header): Renamed from prep_headers with
	updated args and made global.  Delete dead code.
	(_bfd_elf_post_process_headers): Delete.
	* elf32-arm.c (elf32_arm_init_file_header): Rename from
	elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
	Return status.
	(elf_backend_init_file_header): Define.
	(elf_backend_post_process_headers): Don't define.
	* elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
	* elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
	* elf32-metag.c (elf_metag_init_file_header): Similarly.
	* elf32-spu.c (spu_elf_init_file_header
	* elf32-visium.c (visium_elf_init_file_header
	* elf64-alpha.c (elf64_alpha_fbsd_init_file_header
	* elf64-hppa.c (elf64_hppa_init_file_header
	* elf64-ia64-vms.c (elf64_vms_init_file_header
	* elfnn-aarch64.c (elfNN_aarch64_init_file_header
	* elfnn-ia64.c (elfNN_hpux_init_file_header
	* elfxx-mips.c (_bfd_mips_init_file_header
	* elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
	(_bfd_mips_init_file_header): Declare.
	(elf_backend_post_process_headers): Delete.
	(elf_backend_init_file_header): Define.
	* elfxx-target.h (elf_backend_post_process_headers): Delete.
	(elf_backend_init_file_header): Define and use.
	* elf32-m68hc12.c (elf_backend_init_file_header): Define.
	(elf_backend_post_process_headers): Don't define.
	* elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
	(elf32_m68hc11_init_file_header): Declare.
	* elf32-ppc.c (elf_backend_post_process_headers): Remove
	unnecessary undef.
2019-11-18 22:06:09 +10:30
Alan Modra 6d6c25c8ea elf_backend_modify_headers
This patch renames elf_backend_modify_program_headers and moves the
elf.c code tweaking the ELF file header for -pie -Ttext-segment to a
new function, _bfd_elf_modify_headers, which then becomes the default
elf_backed_modify_headers and is called from any other target
elf_backed_modify_headers.

	* elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
	Rename from elf_backend_modify_program_headers.
	(_bfd_elf_modify_headers): Declare.
	* elf.c (assign_file_positions_except_relocs): Set
	elf_program_header_size.  Always call elf_backend_modify_headers.
	Extract code modifying file header..
	(_bfd_elf_modify_headers): ..to here.  New function.
	* elf32-arm.c (elf_backend_modify_headers): Renamed from
	elf_backend_modify_program_headers.
	* elf32-i386.c: Similarly.
	* elf64-x86-64.c: Similarly.
	* elfxx-target.h: Similarly.  Default elf_backend_modify_headers
	to _bfd_elf_modify_headers.
	* elf-nacl.h (nacl_modify_headers): Rename from
	nacl_modify_program_headers.
	* elf-nacl.c (nacl_modify_headers): Rename from
	nacl_modify_program_headers and call _bfd_elf_modify_headers.
	* elf32-rx.c (elf32_rx_modify_headers): Similarly.
	* elf32-spu.c (spu_elf_modify_headers): Similarly.
	* elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
	* elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
2019-11-18 22:06:09 +10:30
Alan Modra 9aea1e3137 PR25196, abort in rewrite_elf_program_header
This patch introduces a new "sorry, cannot handle this file" bfd error
status.  The idea is to use this error in cases where bfd hasn't found
a bfd_bad_value error, ie. an input file or set of options that are
invalid, but rather an input file that is simply too difficult to
process.  Typically this might happen with fuzzed object files such as
the one in the PR, a wildly improbable core file.  Some things are
just not worth wasting time over to fix "properly".

	PR 25196
	* bfd.c (bfd_error_type): Add bfd_error_sorry.
	(bfd_errmsgs): Likewise.
	* elf.c (rewrite_elf_program_header): Don't abort on confused
	lma/alignment.  Replace bfd_error_bad_value with bfd_error_sorry.
	(_bfd_elf_validate_reloc): Use bfd_error_sorry.
	(_bfd_elf_final_write_processing): Likewise.
	* bfd-in2.h: Regenerate.
2019-11-18 22:06:09 +10:30
GDB Administrator f1e8bd2dd2 Automatic date update in version.in 2019-11-18 00:00:27 +00:00
GDB Administrator 4774aabeab Automatic date update in version.in 2019-11-17 00:01:15 +00:00
GDB Administrator 3bd1621de0 Automatic date update in version.in 2019-11-16 00:00:17 +00:00
GDB Administrator 45e774e921 Automatic date update in version.in 2019-11-15 00:00:24 +00:00
GDB Administrator 7a13ef8500 Automatic date update in version.in 2019-11-14 00:00:21 +00:00
GDB Administrator 31175a0d71 Automatic date update in version.in 2019-11-13 00:00:20 +00:00
Jim Wilson c6261a00c3 RISC-V: Fix ld relax failure with calls and align directives.
Make _bfd_riscv_relax_call handle section alignment padding same as
the _bfd_riscv_relax_lui and _bfd_riscv_relax_pc functions already
do.  Use the max section alignment if section boundaries are crossed,
otherwise the alignment of the containing section.

	bfd/
	PR 25181
	* elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
	foff.  If sym_sec->output_section and sec->output_section are the same
	and not *ABS* then set max_alignment to that section's alignment.

	ld/
	PR 25181
	* testsuite/ld-riscv-elf/call-relax-0.s: New file.
	* testsuite/ld-riscv-elf/call-relax-1.s: New file.
	* testsuite/ld-riscv-elf/call-relax-2.s: New file.
	* testsuite/ld-riscv-elf/call-relax-3.s: New file.
	* testsuite/ld-riscv-elf/call-relax.d: New test.
	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run call-relax test.

Change-Id: Iaf65cee52345abf1955f36e8e72c4f6cc0db8d9a
2019-11-12 15:53:22 -08:00
GDB Administrator aa16be3993 Automatic date update in version.in 2019-11-12 00:00:28 +00:00
GDB Administrator b7a3015b1a Automatic date update in version.in 2019-11-11 00:00:24 +00:00
GDB Administrator 0a5e0a43cf Automatic date update in version.in 2019-11-10 00:01:10 +00:00
GDB Administrator f309f1d655 Automatic date update in version.in 2019-11-09 00:00:20 +00:00
GDB Administrator 4bdc3b18c7 Automatic date update in version.in 2019-11-08 00:00:14 +00:00
Alan Modra 595d3787e9 Remove CR16C support
I think it is past time to remove CR16C support.  CR16C was added in
2004, and only for ld.  gas and binutils support is lacking, and there
have been no commits to bfd/elf32-cr16c.c other than warning fixes or
global maintainers making changes to all targets.  I see no maintainer
listed for CR16C, and no commits from anyone at NSC supporting the
target.  Furthermore, at the time the CR16 support was added in 2007,
config.sub was changed upstream to no longer recognise cr16c as a
valid cpu.  That means the CR16C ld support is only available as a
secondary target by configuring with, for example,
--enable-targets=all or --enable-targets=cr16c-unknown-elf.  No
testing of the CR16C target is possible.

include/
	* elf/cr16c.h: Delete.
bfd/
	* cpu-cr16c.c: Delete.
	* elf32-cr16c.c: Delete.
	* Makefile.am,
	* archures.c,
	* config.bfd,
	* configure.ac,
	* reloc.c,
	* targets.c: Remove cr16c support.
	* Makefile.in,
	* bfd-in2.h,
	* configure,
	* libbfd.h,
	* po/SRC-POTFILES.in: Regenerate.
ld/
	* emulparams/elf32cr16c.sh: Delete.
	* scripttempl/elf32cr16c.sc: Delete.
	* Makefile.am,
	* configure.tgt: Remove cr16c support.
	* NEWS: Mention removal of cr16c.
	* Makefile.in,
	* po/BLD-POTFILES.in: Regenerate.
2019-11-07 20:09:20 +10:30
GDB Administrator d70fc6126f Automatic date update in version.in 2019-11-07 00:00:32 +00:00
GDB Administrator 8e71a6e725 Automatic date update in version.in 2019-11-06 00:00:41 +00:00
Tim R?hsen 3a70f7e8e3 Fix memory allocation and release problems in the bfd documentation processor.
* doc/chew.c (add_to_definition): Use correct type when
	calculating size of array reallocation.
	(nextword): Always initialise the word return parameter.
	(compile): Check return value of nextword().
2019-11-05 16:03:07 +00:00
GDB Administrator 73ddaae155 Automatic date update in version.in 2019-11-05 00:00:18 +00:00
GDB Administrator 5e874de30b Automatic date update in version.in 2019-11-04 00:00:16 +00:00
GDB Administrator 10d2e6b9c9 Automatic date update in version.in 2019-11-03 00:01:13 +00:00
GDB Administrator a1dc3a23d0 Automatic date update in version.in 2019-11-02 00:00:15 +00:00
GDB Administrator d0d6922c68 Automatic date update in version.in 2019-11-01 00:00:27 +00:00
GDB Administrator c7e49b689b Automatic date update in version.in 2019-10-31 00:00:22 +00:00
Keith Seitz 864619bb2e Add the ability to the BFD library to read build-ids from core flies.
* elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
	New field.
	(_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
	New functions.
	(elf_read_notes): Add declaration.
	* elf.c (elf_read_notes): Move elf-bfd.h.
	(_bfd_elf_core_find_build_id): New function.
	(bfd_section_from_phdr): Scan core file PT_LOAD segments for
	build-id if none is known.
	(elf_parse_notes): For core files, scan for notes.
	* elfcore.h (elf_core_file_matches_executable_p): If both
	BFDs have identical build-ids, then they match.
	(_bfd_elf_core_find_build_id): New function.
	* elfxx-target.h (elf_backend_core_find_build_id): Define.
	(elfNN_bed): Add elf_backend_core_find_build_id.
2019-10-30 12:23:16 +00:00
GDB Administrator 74fb338f46 Automatic date update in version.in 2019-10-30 00:01:25 +00:00
Andrew Eikum 70cf683455 When copying pe format files, copy the dos_message array, rather than re-initiialising it.
* libcoff-in.h (struct pe_tdata): Add dos_message field.
	* libcoff.h: Regenerate.
	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
	dos_message field rather than initialising it.
	(_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
	field.
	* peicode.h (pe_mkobject): Initialise the dos_message field.
	(pe_mkobject_hook): Copy the dos_message field.
	(pe_bfd_object_p): Copy the dos_message field.
2019-10-29 17:07:03 +00:00
GDB Administrator d7b510baa8 Automatic date update in version.in 2019-10-29 00:00:34 +00:00
GDB Administrator 12c3e9173e Automatic date update in version.in 2019-10-28 00:00:43 +00:00
GDB Administrator e9c999a28f Automatic date update in version.in 2019-10-27 00:02:01 +00:00