aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2021-09-28Automatic date update in version.inGDB Administrator1-1/+1
2021-09-27configure: regenerate in all projects that use libtool.m4Nick Alcock2-45/+50
(including sim/, which has no changelog.) bfd/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. binutils/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gas/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. gprof/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. ld/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. libctf/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. * Makefile.in: Regenerate. opcodes/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate. zlib/ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> * configure: Regenerate.
2021-09-27Automatic date update in version.inGDB Administrator1-1/+1
2021-09-26Automatic date update in version.inGDB Administrator1-1/+1
2021-09-25PR28346, segfault attempting to disassemble raw binaryAlan Modra1-1/+2
Don't attempt to access elf_section_data for non-ELF sections. PR 28346 * elf32-xtensa.c (xtensa_read_table_entries): Return zero entries for non-ELF.
2021-09-25Automatic date update in version.inGDB Administrator1-1/+1
2021-09-24Automatic date update in version.inGDB Administrator1-1/+1
2021-09-23Automatic date update in version.inGDB Administrator1-1/+1
2021-09-22Automatic date update in version.inGDB Administrator1-1/+1
2021-09-21Automatic date update in version.inGDB Administrator1-1/+1
2021-09-20Automatic date update in version.inGDB Administrator1-1/+1
2021-09-19elf: Don't set version info on unversioned symbolsH.J. Lu1-1/+2
Don't set version info on unversioned symbols when seeing a hidden versioned symbol after an unversioned definition and the default versioned symbol. bfd/ PR ld/28348 * elflink.c (elf_link_add_object_symbols): Don't set version info on unversioned symbols. ld/ PR ld/28348 * testsuite/ld-elf/pr28348.rd: New file. * testsuite/ld-elf/pr28348.t: Likewise. * testsuite/ld-elf/pr28348a.c: Likewise. * testsuite/ld-elf/pr28348b.c: Likewise. * testsuite/ld-elf/pr28348c.c: Likewise. * testsuite/ld-elf/shared.exp: Run PR ld/28348 tests.
2021-09-19Automatic date update in version.inGDB Administrator1-1/+1
2021-09-18Automatic date update in version.inGDB Administrator1-1/+1
2021-09-17RISC-V: Merged extension string tables and their version tables into one.Nelson Chu3-137/+228
There are two main reasons for this patch, * In the past we had two extension tables, one is used to record all supported extensions in bfd/elfxx-riscv.c, another is used to get the default extension versions in gas/config/tc-riscv.c. It is hard to maintain lots of tables in different files, but in fact we can merge them into just one table. Therefore, we now define many riscv_supported_std* tables, which record names and versions for all supported extensions. We not only use these tables to initialize the riscv_ext_order, but also use them to get the default versions of extensions, and decide if the extensions should be enbaled by default. * We add a new filed `default_enable' for the riscv_supported_std* tables, to decide if the extension should be enabled by default. For now if the `default_enable' field of the extension is set to EXT_DEFAULT, then we should enable the extension when the -march and elf architecture attributes are not set. In the future, I suppose the `default_enable' can be set to lots of EXT_<VENDOR>, each vendor can decide to open which extensions, when the target triple of vendor is chosen. The elf/linux regression tests of riscv-gnu-toolchain are passed. bfd/ * elfnn-riscv.c (cpu-riscv.h): Removed sine it is included in bfd/elfxx-riscv.h. (riscv_merge_std_ext): Updated since the field of rpe is changed. * elfxx-riscv.c (cpu-riscv.h): Removed. (riscv_implicit_subsets): Added implicit extensions for g. (struct riscv_supported_ext): Used to be riscv_ext_version. Moved from gas/config/tc-riscv.c, and added new field `default_enable' to decide if the extension should be enabled by default. (EXT_DEFAULT): Defined for `default_enable' field. (riscv_supported_std_ext): It used to return the supported standard architecture string, but now we move ext_version_table from gas/config/tc-riscv.c to here, and rename it to riscv_supported_std_ext. Currently we not only use the table to initialize riscv_ext_order, but also get the default versions of extensions, and decide if the extensions should be enbaled by default. (riscv_supported_std_z_ext): Likewise, but is used for z* extensions. (riscv_supported_std_s_ext): Likewise, but is used for s* extensions. (riscv_supported_std_h_ext): Likewise, but is used for h* extensions. (riscv_supported_std_zxm_ext): Likewise, but is used for zxm* extensions. (riscv_all_supported_ext): Includes all supported extension tables. (riscv_known_prefixed_ext): Updated. (riscv_valid_prefixed_ext): Updated. (riscv_init_ext_order): Init the riscv_ext_order table according to riscv_supported_std_ext. (riscv_get_default_ext_version): Moved from gas/config/tc-riscv.c. Get the versions of extensions from riscv_supported_std* tables. (riscv_parse_add_subset): Updated. (riscv_parse_std_ext): Updated. (riscv_set_default_arch): Set the default subset list according to the default_enable field of riscv_supported_*ext tables. (riscv_parse_subset): If the input ARCH is NULL, then we call riscv_set_default_arch to set the default subset list. * elfxx-riscv.h (cpu-riscv.h): Included. (riscv_parse_subset_t): Removed get_default_version field, and added isa_spec field to replace it. (extern riscv_supported_std_ext): Removed. gas/ * (bfd/cpu-riscv.h): Removed. (struct riscv_ext_version): Renamed and moved to bfd/elfxx-riscv.c. (ext_version_table): Likewise. (riscv_get_default_ext_version): Likewise. (ext_version_hash): Removed. (init_ext_version_hash): Removed. (riscv_set_arch): Updated since the field of rps is changed. Besides, report error when the architecture string is empty. (riscv_after_parse_args): Updated.
2021-09-17Automatic date update in version.inGDB Administrator1-1/+1
2021-09-16Automatic date update in version.inGDB Administrator1-1/+1
2021-09-15bfd: fix incorrect type used in sizeofAndrew Burgess2-1/+6
Noticed in passing that we used 'sizeof (char **)' when calculating the size of a list of 'char *' pointers. Of course, this isn't really going to make a difference anywhere, but we may as well be correct. There should be no user visible changes after this commit. bfd/ChangeLog: * archures.c (bfd_arch_list): Use 'char *' instead of 'char **' when calculating space for a string list.
2021-09-15[bfd] Ensure unique printable names for bfd archsTom de Vries3-5/+3
Remove duplicate entry in bfd_ft32_arch and bfd_rx_arch. Fix printable name for bfd_mach_n1: "nh1" -> "n1". PR 28336 * cpu-ft32.c (arch_info_struct): Remove "ft32" entry. * cpu-rx.c (arch_info_struct): Remove "rx" entry. * cpu-nds32.c (bfd_nds32_arch): Fix printable name for bfd_mach_n1 entry.
2021-09-15PR28328, dlltool iceAlan Modra1-1/+1
PR 28328 * archive.c (bfd_ar_hdr_from_filesystem): Don't use bfd_set_input_error here, our caller will do that.
2021-09-15Automatic date update in version.inGDB Administrator1-1/+1
2021-09-14arc: Fix potential invalid pointer access when fixing got symbols.Claudiu Zissulescu2-37/+66
When statically linking, it can arrive to an undefined weak symbol of which its value cannot be determined. However, we are having pieces of code which doesn't take this situation into account, leading to access a structure which may not be initialized. Fix this situation and add a test. bfd/ xxxx-xx-xx Cupertino Miranda <cmiranda@synopsys.com> Claudiu Zissulescu <claziss@synopsys.com> * arc-got.h (arc_static_sym_data): New structure. (get_static_sym_data): New function. (relocate_fix_got_relocs_for_got_info): Move the computation fo symbol value and section to above introduced function, and use this new function. ld/testsuite/ xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com> * ld-arc/got-weak.d: New file. * ld-arc/got-weak.s: Likewise. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com> fix
2021-09-14Automatic date update in version.inGDB Administrator1-1/+1
2021-09-13Re: Deprecate a.out support for NetBSD targetsAlan Modra1-1/+2
* config.bfd: Correct m68-*-*bsd* obsolete target match.
2021-09-13Automatic date update in version.inGDB Administrator1-1/+1
2021-09-12Automatic date update in version.inGDB Administrator1-1/+1
2021-09-11Automatic date update in version.inGDB Administrator1-1/+1
2021-09-10PowerPC, sanity check r_offset in relocate_sectionAlan Modra1-357/+442
* elf32-ppc.c (offset_in_range): New function. (ppc_elf_vle_split16): Sanity check r_offset before accessing section contents. Return status. (ppc_elf_relocate_section): Sanity check r_offset before accessing section contents. Don't segfault on NULL howto.
2021-09-10Automatic date update in version.inGDB Administrator1-1/+1
2021-09-09Automatic date update in version.inGDB Administrator1-1/+1
2021-09-08PowerPC64, sanity check r_offset in relocate_sectionAlan Modra1-49/+119
This hardens the powerpc64 linker code transformations. * elf64-ppc.c (is_8byte_reloc, offset_in_range): New functions. (ppc64_elf_relocate_section): Sanity check r_offset before accessing section contents for various code transformations.
2021-09-08PowerPC64: Avoid useless work on R_PPC64_TPREL34Alan Modra1-1/+3
_bfd_elf_ppc_at_tprel_transform doesn't handle prefix instructions, and I'm not inclined to implement code editing for them. * elf64-ppc.c (ppc64_elf_relocate_section): Don't attempt tprel transform for R_PPC64_TPREL34.
2021-09-08Automatic date update in version.inGDB Administrator1-1/+1
2021-09-07Revert: [AArch64] MTE corefile supportLuis Machado2-19/+9
bfd * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types. include * elf/common.h (NT_MEMTAG): New constant. (NT_MEMTAG_TYPE_AARCH_MTE): New constant.
2021-09-07Fix an illegal memory access triggered by an atempt to disassemble a corrupt ↵Nick Clifton3-1/+6
xtensa binary. PR 28305 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range reloc.
2021-09-07Fix illegal memory access triggered by an attempt to disassemble a corrupt ↵Nick Clifton2-0/+13
RISC-V binary. PR 28303 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of range relocs.
2021-09-07PR28307, segfault in ppc64_elf_toc64_relocAlan Modra2-5/+27
Adds missing bfd_reloc_offset_in_range checks to various relocation special_functions. PR 28307 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Range check reloc offset. * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc): Likewise. (ppc64_elf_toc64_reloc, ppc64_elf_prefix_reloc): Likewise.
2021-09-07Automatic date update in version.inGDB Administrator1-1/+1
2021-09-06Fix an illegal memory access triggered by disassembling corrupt s390x binaries.Nick Clifton1-1/+3
PR 28304 * elfxx-score7.c (score_elf_gprel15_reloc): If there is no output bfd treat the reloc as undefined.
2021-09-06Automatic date update in version.inGDB Administrator1-1/+1
2021-09-05Automatic date update in version.inGDB Administrator1-1/+1
2021-09-04Automatic date update in version.inGDB Administrator1-1/+1
2021-09-03ubsan: alpha: member access within null pointerAlan Modra1-1/+2
* elf64-alpha.c (elf64_alpha_relax_with_lituse): Avoid UB.
2021-09-03Automatic date update in version.inGDB Administrator1-1/+1
2021-09-02Add support for the haiku operating system. These are the os support ↵Alexander von Gluck IV2-1/+35
patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.
2021-09-02SHT_SYMTAB_SHNDX handlingAlan Modra3-30/+13
.symtab_shndx section contents is an array, one entry for each symbol in .symtab, present when the number of symbols exceeds a little less than 64k. Since the mapping is 1-1 with symbols there is no need to keep both dest_index and destshndx_index in elf_sym_strtab. Instead, just make sure that the shndx pointers to the swap functions are kept NULL when .symtab_shndx does not exist. Also, strtabcount in the linker's elf hash table is incremented in lock-step with the output symcount, so that can disappear too.
2021-09-02PTR_ADD and NPTR_ADD for bfd.hAlan Modra4-25/+38
This defines a couple of macros used to avoid ubsan complaints about calculations involving NULL pointers. PTR_ADD should be used in the case where it is known that the offset is always zero with a NULL pointer, and you'd like to know if a non-zero offset is ever used. NPTR_ADD should be rarely used, but is defined for cases where a non-zero offset is expected and should be ignored if the pointer is NULL. bfd/ * bfd-in.h (PTR_ADD, NPTR_ADD): Define. * bfd-in2.h: Regenerate. * elf-eh-frame.c (adjust_eh_frame_local_symbols): Avoid NULL pointer calculations. * elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise. (bfd_elf_add_dt_needed_tag, elf_finalize_dynstr): Likewise. (elf_link_add_object_symbols, elf_link_input_bfd): Likewise. (bfd_elf_final_link, bfd_elf_gc_record_vtinherit): Likewise. binutils/ * objdump.c (disassemble_section): Use PTR_ADD for rel_ppend.
2021-09-02Automatic date update in version.inGDB Administrator1-1/+1
2021-09-01Automatic date update in version.inGDB Administrator1-1/+1
2021-08-31Automatic date update in version.inGDB Administrator1-1/+1