aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2023-01-14Fix snafu in version number. Regenerate filesbinutils-2_40Nick Clifton3-12/+12
2023-01-14Set development and experimental to false. Update version number to 2.40. ↵Nick Clifton5-32/+36
Add release markers. Regenerate files
2023-01-14Automatic date update in version.inGDB Administrator1-1/+1
2023-01-13Updated Romainian translation for the bfd sub-directoryNick Clifton2-2742/+2820
2023-01-13Automatic date update in version.inGDB Administrator1-1/+1
2023-01-12ARM: Fix ld bloat introduced between binutils-2.38 and 2.39Hans-Peter Nilsson1-4/+0
Since commit 9833b7757d24, "PR28824, relro security issues", ELF_MAXPAGESIZE matters much more, with regards to layout of the linked file. That commit fixed an actual bug, but also exposes a problem for targets were that value is too high. For example, for ARM(32, a.k.a. "Aarch32") specifically bfd_arch_arm, it's set to 64 KiB, making all Linux(/GNU) targets pay an extra amount of up to 60 KiB of bloat in DSO:s and executables. This matters when there are many such files, and where storage is expensive. It's *mostly* bloat when using a Linux kernel, as ARM(32) is a good example of an target where ELF_MAXPAGESIZE is set to an extreme value for an obscure corner-case. The ARM (32-bit) kernel has 4 KiB pages, has had that value forever, and can't be configured to any other value. The use-case is IIUC "Aarch32" emulation on an "Aarch64" (arm64) kernel, but not just that, but a setup where the Linux page-size is configured to something other than the *default* 4 KiB. Not sure there actually any such systems in use, again with both Aarch32 compatibility support and a non-4KiB pagesize, with all the warnings in the kernel config and requiring the "EXPERT" level set on. So, let's do like x86-64 in a2267dbfc9e1 "x86-64: Use only one default max-page-size" and set ELF_MAXPAGESIZE to 4096. bfd: * elf32-arm.c (ELF_MAXPAGESIZE): Always set to 0x1000. (cherry picked from commit 1a26a53a0dee39106ba58fcb15496c5f13074652)
2023-01-12Automatic date update in version.inGDB Administrator1-1/+1
2023-01-11Fix a potential illegal memory access in the BFD library when parsing a ↵Nick Clifton2-1/+7
corrupt DWARF file. PR 29988 * dwarf2.c (read_indexed_address): Fix check for an out of range offset.
2023-01-11Automatic date update in version.inGDB Administrator1-1/+1
2023-01-10IBM zSystems: Fix offset relative to static TLSStefan Schulze Frielinghaus2-4/+4
For local exec TLS relocations of the form foo@NTPOFF+x the addend was ignored. bfd/ChangeLog: * elf32-s390.c (elf_s390_relocate_section): Honor addend for R_390_TLS_LE32. * elf64-s390.c (elf_s390_relocate_section): Honor addend for R_390_TLS_LE64. ld/ChangeLog: * testsuite/ld-s390/reloctlsle-1.d: New test. * testsuite/ld-s390/reloctlsle-1.s: New test. (cherry picked from commit aefebe82dc89711384b85329daa48d04c1d3a45b)
2023-01-10Automatic date update in version.inGDB Administrator1-1/+1
2023-01-09Fix PR18841 ifunc relocation orderingChristophe Lyon1-0/+29
In order to get the ifunc relocs properly sorted the correct class needs to be returned. The code mimics what has been done for AArch64. Fixes: FAIL: Run pr18841 with libpr18841b.so FAIL: Run pr18841 with libpr18841c.so FAIL: Run pr18841 with libpr18841bn.so (-z now) FAIL: Run pr18841 with libpr18841cn.so (-z now) bfd/ PR ld/18841 * elf32-arm.c (elf32_arm_reloc_type_class): Return reloc_class_ifunc for ifunc symbols. ld/testsuite/ * ld-arm/ifunc-12.rd: Update relocations order. * ld-arm/ifunc-3.rd: Likewise. * ld-arm/ifunc-4.rd: Likewise.
2023-01-09Automatic date update in version.inGDB Administrator1-1/+1
2023-01-08Automatic date update in version.inGDB Administrator1-1/+1
2023-01-07Automatic date update in version.inGDB Administrator1-1/+1
2023-01-06Updated Bulgarian and Russian translations for LD and BFD respectivelyNick Clifton2-1763/+2183
2023-01-06Automatic date update in version.inGDB Administrator1-1/+1
2023-01-05Automatic date update in version.inGDB Administrator1-1/+1
2023-01-04Update some more copyright year rangesAlan Modra6-6/+6
These files disappear in commit 3002e78a7d3d but are still on the branch.
2023-01-04Update year range in copyright notice of binutils filesAlan Modra430-435/+435
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2023-01-04Automatic date update in version.inGDB Administrator1-1/+1
2023-01-03Updated translations for various languages and sub-directoriesNick Clifton3-2805/+3034
2023-01-03Automatic date update in version.inGDB Administrator1-1/+1
2023-01-02Automatic date update in version.inGDB Administrator1-1/+1
2022-12-31Update version number and regenerate filesNick Clifton3-1439/+1498
2022-12-31Add markers for 2.40 branchNick Clifton1-0/+4
2022-12-31Automatic date update in version.inGDB Administrator1-1/+1
2022-12-30Automatic date update in version.inGDB Administrator1-1/+1
2022-12-29Automatic date update in version.inGDB Administrator1-1/+1
2022-12-28Automatic date update in version.inGDB Administrator1-1/+1
2022-12-27x86-64: Allocate input section memory if neededH.J. Lu1-2/+23
When --no-keep-memory is used, the input section memory may not be cached. Allocate input section memory for -z pack-relative-relocs if needed. bfd/ PR ld/29939 * elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Allocate input section memory if needed. ld/ PR ld/29939 * testsuite/ld-elf/dt-relr-2i.d: New test.
2022-12-27Automatic date update in version.inGDB Administrator1-1/+1
2022-12-26bfd/dwarf2.c: allow use of DWARF5 directory entry 0Alan Modra1-13/+10
I think the test for table->files[file].dir being non-zero is wrong for DWARF5 where index zero is allowed and is the current directory of the compilation. Most times this will be covered by the use of table->comp_dir (from DW_AT_comp_dir) in concat_filename but the point of putting the current dir in .debug_line was so the section could stand alone without .debug_info. Also, there is no need to check for table->dirs non-NULL, the table->num_dirs test is sufficient. * dwarf2.c (concat_filename): Correct and simplify tests of directory index.
2022-12-26Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurdFlavio Cruz1-0/+5
2022-12-26Automatic date update in version.inGDB Administrator1-1/+1
2022-12-25Automatic date update in version.inGDB Administrator1-1/+1
2022-12-24Automatic date update in version.inGDB Administrator1-1/+1
2022-12-23Fix illegal memory access parsing corrupt DWARF information.Nick Clifton2-1/+8
PR 29936 * dwarf2.c (concat_filename): Fix check for a directory index off the end of the directory table.
2022-12-23RISC-V: Relax the order checking for the architecture stringNelson Chu1-135/+75
* riscv-toolchain-conventions, PR, https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/14 Issue, https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/11 * Refer to the commit afc41ffb, RISC-V: Reorder the prefixed extensions which are out of order. In the past we only allow to reorder the prefixed extensions. But according to the PR 14 in the riscv-toolchain-convention, we can also relax the order checking to allow the whole extensions be written out of orders, including the single standard extensions and the prefixed multi-letter extensions. Just that we still need to follow the following rules as usual, 1. prefixed extensions need to be seperated with `_'. 2. prefixed extensions need complete <major>.<minor> version if set. Please see the details in the march-ok-reorder gas testcase. Passed the riscv-gnu-toolchain regressions. bfd/ * elfxx-riscv.c (enum riscv_prefix_ext_class): Changed RV_ISA_CLASS_UNKNOWN to RV_ISA_CLASS_SINGLE, since everything that does not belong to the multi-keyword will possible be a single extension for the current parser. (parse_config): Likewise. (riscv_get_prefix_class): Likewise. (riscv_compare_subsets): Likewise. (riscv_parse_std_ext): Removed, and merged with riscv_parse_prefixed_ext into riscv_parse_extensions. (riscv_parse_prefixed_ext): Likewise. (riscv_parse_subset): Only need to call riscv_parse_extensions to parse both single standard and prefixed extensions. gas/ * testsuite/gas/riscv/march-fail-order-std.d: Removed since the relaxed order checking. * testsuite/gas/riscv/march-fail-order-std.l: Likewise. * testsuite/gas/riscv/march-fail-order-x-std.d: Likewise. * testsuite/gas/riscv/march-fail-order-z-std.d: Likewise. * testsuite/gas/riscv/march-fail-order-zx-std.l: Likewise. * testsuite/gas/riscv/march-fail-unknown-std.l: Updated. * testsuite/gas/riscv/march-ok-reorder.d: New testcase.
2022-12-23Automatic date update in version.inGDB Administrator1-1/+1
2022-12-22Automatic date update in version.inGDB Administrator1-1/+1
2022-12-22PR29925, Memory leak in find_abstract_instanceAlan Modra1-12/+19
The testcase in the PR had a variable with both DW_AT_decl_file and DW_AT_specification, where the DW_AT_specification also specified DW_AT_decl_file. This leads to a memory leak as the file name is malloced and duplicates are not expected. I've also changed find_abstract_instance to not use a temp for "name", because that can result in a change in behaviour from the usual last of duplicate attributes wins. PR 29925 * dwarf2.c (find_abstract_instance): Delete "name" variable. Free *filename_ptr before assigning new file name. (scan_unit_for_symbols): Similarly free func->file and var->file before assigning.
2022-12-21Updated Romanian translation for the BFD sub-directory.Nick Clifton2-1970/+2073
2022-12-21enable-non-contiguous-regions warningsAlan Modra11-52/+19
The warning about discarded sections in elf_link_input_bfd doesn't belong there since the code is dealing with symbols. Multiple symbols in a discarded section will result in multiple identical warnings about the section. Move the warning to a new function in ldlang.c. The patch also tidies the warning quoting of section and file names, consistently using `%pA' and `%pB'. I'm no stickler for one style of section and file name quoting, but they ought to be consistent within a warning, eg. see the first one fixed in ldlang.c, and when a warning is emitted for multiple targets they all ought to use exactly the same format string to reduce translation work. elf64-ppc.c loses the build_one_stub errors since we won't get there before hitting the fatal errors in size_one_stub. bfd/ * elflink.c (elf_link_input_bfd): Don't warn here about discarded sections. * elf32-arm.c (arm_build_one_stub): Use consistent style in --enable-non-contiguous-regions error. * elf32-csky.c (csky_build_one_stub): Likewise. * elf32-hppa.c (hppa_build_one_stub): Likewise. * elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise. * elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise. * elf32-metag.c (metag_build_one_stub): Likewise. * elf32-nios2.c (nios2_build_one_stub): Likewise. * elfnn-aarch64.c (aarch64_build_one_stub): Likewise. * xcofflink.c (xcoff_build_one_stub): Likewise. * elf64-ppc.c (ppc_size_one_stub): Likewise. (ppc_build_one_stub): Delete dead code. ld/ * ldlang.c (lang_add_section): Use consistent style in --enable-non-contiguous-regions warnings. (size_input_section): Likewise. (warn_non_contiguous_discards): New function. (lang_process): Call it. * testsuite/ld-arm/non-contiguous-arm.d: Update. * testsuite/ld-arm/non-contiguous-arm4.d: Update. * testsuite/ld-arm/non-contiguous-arm7.d: Add --enable-non-contiguous-regions-warnings. * testsuite/ld-arm/non-contiguous-arm7.err: New. * testsuite/ld-powerpc/non-contiguous-powerpc.d: Update. * testsuite/ld-powerpc/non-contiguous-powerpc64.d: Update.
2022-12-21PR29922, SHT_NOBITS section avoids section size sanity checkAlan Modra1-3/+9
PR 29922 * dwarf2.c (find_debug_info): Ignore sections without SEC_HAS_CONTENTS.
2022-12-21Automatic date update in version.inGDB Administrator1-1/+1
2022-12-20bfd: Discard symbol regardless of warning flagTorbjörn SVENSSON1-5/+5
The discard of symbols should be performed whether the warning for the discard is enabled or not. Without this patch, ld would segfault in bfd_section_removed_from_list, called in the if-statement right after this block, as the argument isec->output_section can be NULL. Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
2022-12-20PR29915, bfdio.c does not compile with mingw.org's MinGWAlan Modra4-6/+22
PR 29915 * configure.ac: Add AC_CHECK_DECLS test ___lc_codepage_func. * configure: Regenerate. * config.in: Regenerate. * bfdio.c (___lc_codepage_func): Move declaration to.. (_bfd_real_fopen): ..here, and use !HAVE_DECL____LC_CODEPAGE_FUNC.
2022-12-20Automatic date update in version.inGDB Administrator1-1/+1
2022-12-19Automatic date update in version.inGDB Administrator1-1/+1