summaryrefslogtreecommitdiff
path: root/ld/ChangeLog
AgeCommit message (Collapse)Author
2024-01-15Change version to 2.42.50 and regenerate filesNick Clifton
2024-01-15Add markers for 2.42 branchNick Clifton
2024-01-04Update year range in copyright notice of binutils filesAlan Modra
Adds two new external authors to etc/update-copyright.py to cover bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then updates copyright messages as follows: 1) Update cgen/utils.scm emitted copyrights. 2) Run "etc/update-copyright.py --this-year" with an extra external author I haven't committed, 'Kalray SA.', to cover gas testsuite files (which should have their copyright message removed). 3) Build with --enable-maintainer-mode --enable-cgen-maint=yes. 4) Check out */po/*.pot which we don't update frequently.
2023-12-21ld: Add lib32 directories for 32-bit emulation on FreeBSD/amd64Rainer Orth
GNU ld currently fails to link 32-bit executables on FreeBSD/amd64 when the linked libraries have dependencies on shared objects themselves: $ gcc -m32 -o ei ei.c -lexecinfo /var/gcc/binutils/amd64/lib/gcc/amd64-pc-freebsd14.0/13.2.0/../../../../amd64-pc-freebsd14.0/bin/ld: warning: libelf.so.2, needed by /usr/lib/../lib32/libexecinfo.so, not found (try using -rpath or -rpath-link) /var/gcc/binutils/amd64/lib/gcc/amd64-pc-freebsd14.0/13.2.0/../../../../amd64-pc-freebsd14.0/bin/ld: /usr/lib/../lib32/libexecinfo.so: undefined reference to `elf_begin@R1.0' [...] Fixed by handling FreeBSD/amd64 like Linux/x86. Tested on amd64-pc-freebsd14.0.
2023-12-12Support rodata in flash for more AVR devicesGeorg-Johann Lay
PR 31124 * Makefile.am (ALL_EMULATION_SOURCES): Add eavrxmega2_flmap.c and eavrxmega4_flmap.c. * Makefile.in: Regenerate. * configure.tgt: Add eavrxmega2_flmap and eavrxmega4_flmap to avr's targ_extra_emuls list. * emulparams/avrxmega2.sh (MAYBE_FLMAP): Define. * emulparams/avrxmega2_flmap.sh: New file. * emulparams/avrxmega4.sh (MAYBE_FLMAP): Define. * emulparams/avrxmega4_flmap.sh: New file. * scripttempl/avr.sc: Add support for HAVE_FLMAP.
2023-11-28libiberty, ld: Use x86 HW optimized sha1Jakub Jelinek
The following patch attempts to use x86 SHA ISA if available to speed up in my testing about 2.5x sha1 build-id processing (in my case on AMD Ryzen 5 3600) while producing the same result. I believe AArch64 has similar HW acceleration for SHA1, perhaps it could be added similarly. Note, seems lld uses BLAKE3 rather than md5/sha1. I think it would be a bad idea to lie to users, if they choose --buildid=sha1, we should be using SHA1, not some other checksum, but perhaps we could add some other --buildid= styles and perhaps make one of the new the default. Tested on x86_64-linux, both on Intel i9-7960X (which doesn't have sha_ni ISA support) without/with the patch and on AMD Ryzen 5 3600 (which does have it) without/with the patch. 2023-11-28 Jakub Jelinek <jakub@redhat.com> include/ * sha1.h (sha1_process_bytes_fn): New typedef. (sha1_choose_process_bytes): Declare. libiberty/ * configure.ac (HAVE_X86_SHA1_HW_SUPPORT): New check. * sha1.c: If HAVE_X86_SHA1_HW_SUPPORT is defined, include x86intrin.h and cpuid.h. (sha1_hw_process_bytes, sha1_hw_process_block, sha1_choose_process_bytes): New functions. * config.in: Regenerated. * configure: Regenerated. ld/ * ldbuildid.c (generate_build_id): Use sha1_choose_process_bytes () instead of &sha1_process_bytes.
2023-11-28New Romanian translation for ldNick Clifton
2023-11-21Fix: symbols eliminated by --gc-sections still trigger warnings for ↵Nick Clifton
gnu.warning.SYM PR 31067 * linker.c (_bfd_generic_link_add_one_symbol): When issuing a warning message, also display a message about the warning not being affected by garbage colleciton. * ld.texi (Special Sections): New entry in the linker manual. Describes how the .gnu.warning and .gnu.warning.SYM sections behave.
2023-11-15Finalized intl-update patchesArsen Arsenovi?
* intl: Remove directory. Replaced with out-of-tree GNU gettext. * .gitignore: Add '/gettext*'. * configure.ac (host_libs): Replace intl with gettext. (hbaseargs, bbaseargs, baseargs): Split baseargs into {h,b}baseargs. (skip_barg): New flag. Skips appending current flag to bbaseargs. <library exemptions>: Exempt --with-libintl-{type,prefix} from target and build machine argument passing. * configure: Regenerate. * Makefile.def (host_modules): Replace intl module with gettext module. (configure-ld): Depend on configure-gettext. * Makefile.in: Regenerate. * src-release.sh: Remove references to the intl/ directory.
2023-11-14Fix another linker command line option that was not being recognised in its ↵Nick Clifton
long form. PR 28910 * lexsup.c (ld_options): Ensure that the --mri-script option is correctly recognised.
2023-11-13GNU-ld: ARM: Issues when trying to set target output architectureNick Clifton
PR 28910 * lexsup.c (ld_options): Ensure that the --format option is correctly recognised.
2023-11-13Fix redundant space typo in linker documentation.Chung-Ju Wu
2023-11-10Add ability to change linker warning messages into errors when reporting ↵Nick Clifton
executable stacks and/or executable segments. include * bfdlink.h (struct bfd_link_info): Update descriptions of the 'execstack', 'noexecstack' and 'warn_execstack' fields. Add 'error_exectack' and 'warn_is_error_for_rwx_segments' fields. bfd * elf.c (assign_file_positions_except_relocs): Turn warnings about executable segments into errors if so requested. * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about executable stacks into errors if so requested. ld * ldlex.h (enum option_values): Add OPTION_ERROR_EXECSTACK, OPTION_NO_ERROR_EXECSTACK, OPTION_WARN_EXECSTACK_OBJECTS, OPTION_ERROR_RWX_SEGMENTS and OPTION_NO_ERROR_RWX_SEGMENTS. (struct ld_option): Add new long options. (parse_args): Parse new long options. (elf_static_list_options): Display the new options. * ld.texi: Document the new command line options. * configure.ac (error-execstack): New configuration option. (error-rwx-segments): New configuration option. * emultempl/elf.em (_before_parse): Initialse the new linkinfo fields. * NEWS: Mention the new features. * config.in: Regenerate. * configure: Regenerate. * testsuite/ld-elf/commonpage2.d: Disable errors for RWX segments and/or executable stacks. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/header.d: Likewise. * testsuite/ld-elf/loadaddr1.d: Likewise. * testsuite/ld-elf/loadaddr2.d: Likewise. * testsuite/ld-elf/maxpage4.d: Likewise. * testsuite/ld-elf/nobits-1.d: Likewise. * testsuite/ld-elf/note-1.d: Likewise. * testsuite/ld-elf/orphan-10.d: Likewise. * testsuite/ld-elf/orphan-11.d: Likewise. * testsuite/ld-elf/orphan-12.d: Likewise. * testsuite/ld-elf/orphan-5.d: Likewise. * testsuite/ld-elf/orphan-7.d: Likewise. * testsuite/ld-elf/orphan-8.d: Likewise. * testsuite/ld-elf/orphan-9.d: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.d: Likewise. * testsuite/ld-elf/pr19539.d: Likewise. * testsuite/ld-elf/pr26256-1a.d: Likewise. * testsuite/ld-elf/pr26907.d: Likewise. * testsuite/ld-elf/pr28597.d: Likewise. * testsuite/ld-elf/retain2.d: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elf/size-1.d: Likewise. * testsuite/ld-elf/textaddr7.d: Likewise. * testsuite/ld-elf/warn1.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/ld-i386/discarded1.d: Likewise. * testsuite/ld-i386/pr19175.d: Likewise. * testsuite/ld-i386/pr19539.d: Likewise. * testsuite/ld-i386/pr23189.d: Likewise. * testsuite/ld-plugin/lto-3r.d: Likewise. * testsuite/ld-plugin/lto-5r.d: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-powerpc/ppc476-shared.d: Likewise. * testsuite/ld-powerpc/ppc476-shared2.d: Likewise. * testsuite/ld-powerpc/pr28827-2.d: Likewise. * testsuite/ld-s390/s390.exp: Likewise. * testsuite/ld-scripts/align2a.d: Likewise. * testsuite/ld-scripts/align2b.d: Likewise. * testsuite/ld-scripts/align5.d: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-scripts/defined2.d: Likewise. * testsuite/ld-scripts/defined3.d: Likewise. * testsuite/ld-scripts/defined5.d: Likewise. * testsuite/ld-scripts/pr14962.d: Likewise. * testsuite/ld-scripts/pr18963.d: Likewise. * testsuite/ld-scripts/pr20302.d: Likewise. * testsuite/ld-scripts/print-memory-usage.exp: Likewise. * testsuite/ld-scripts/rgn-at1.d: Likewise. * testsuite/ld-scripts/rgn-at10.d: Likewise. * testsuite/ld-scripts/rgn-at4.d: Likewise. * testsuite/ld-scripts/rgn-at6.d: Likewise. * testsuite/ld-scripts/rgn-at8.d: Likewise. * testsuite/ld-scripts/rgn-at9.d: Likewise. * testsuite/ld-scripts/rgn-over1.d: Likewise. * testsuite/ld-scripts/rgn-over2.d: Likewise. * testsuite/ld-scripts/rgn-over4.d: Likewise. * testsuite/ld-scripts/rgn-over5.d: Likewise. * testsuite/ld-scripts/rgn-over6.d: Likewise. * testsuite/ld-scripts/script.exp: Likewise. * testsuite/ld-scripts/sizeof.exp: Likewise. * testsuite/ld-scripts/sort-file.d: Likewise. * testsuite/ld-x86-64/discarded1.d: Likewise. * testsuite/ld-x86-64/pr19175.d: Likewise. * testsuite/ld-x86-64/pr19539a.d: Likewise. * testsuite/ld-x86-64/pr19539b.d: Likewise. * testsuite/ld-x86-64/pr23189.d: Likewise.
2023-11-07Revert "ld x86_64 tests: Accept x86-64-v3 as a needed ISA"Jan Beulich
This reverts commit bf77f42f6708d8b5ba92336d876042826d8d29c1. It wrongly altered testcase expectations; the issue will need taking care of differently.
2023-11-06ld: =fillexp different behaviors for hexidecimal literalNick Clifton
PR 30865 * ld.texi: Update description of the FILL command. * testsuite/ld-scripts/fill2.d: New test. * testsuite/ld-scripts/fill2.t: New test source. * testsuite/ld-scripts/data.exp: Run the new test.
2023-11-02ld x86_64 tests: Accept x86-64-v3 as a needed ISANick Clifton
* testsuite/ld-x86-64/property-3.r: Update regexp to allow for targets which support x86-64-v3. * testsuite/ld-x86-64/property-4.r: Likewise. * testsuite/ld-x86-64/property-5.r: Likewise.
2023-11-01ld: Support input section description keyword: REVERSENick Clifton
PR 27565 * ldlex.l: Add REVERSE. * ldgram.y: Allow REVERSE to be used wherever a sorting command can be used. * ld.h (struct wildcard_spec): Add 'reversed' field. * ldlang.h (lang_wild_statement_struct): Add 'filenames_reversed' field. * ldlang.c (compare_sections): Add reversed parameter. (wild_sort): Reverse the comparison if requested. (print_wild_statement): Handle the reversed field. * ld.texi: Document the new feature. * NEWS: Mention the new feature. * testsuite/ld-scripts/sort-file-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-file-reversed-1.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.t: New test source. * testsuite/ld-scripts/sort-file-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-1.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.t: New test source. * testsuite/ld-scripts/sort-sections-reversed-2.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.d: New test driver. * testsuite/ld-scripts/sort-sections-reversed-3.t: New test source.
2023-10-30New Georgian translation for the ld sub-directoryNick Clifton
2023-10-19ld: fix typo in ld.texi metdata->metadataJose E. Marchesi
2023-10-16Fix: GNU-ld: ARM: Issues when trying to set target output architectureNick Clifton
PR 28910 * lexsup.c (ld_options): Require that the --architecture option is given exactly two dashes, so that it does not become confused with the -a option.
2023-10-09Fix: Null pointer dereference in ldlex.lNick Clifton
PR 30951 * ldlex.l (yy_input): Check for YY_CURRENT_BUFFER being NULL.
2023-10-09Fix: A potential null_pointer_deference bugNick Clifton
PR 30954 * ldlang.c (map_input_to_output_sections): Check that os is non NULL before using it.
2023-10-05Fix: ld: Test case pr28158 fails on x86_64-linux-musl when index is > 19A. Wilcox
PR 30905 * testsuite/ld-elf/pr28158.rd: Adjust regexp to allow for section indicies larger than 9.
2023-10-05Fix: ld testsuite: glibc-specific DT_RELR tests should not be run on musl ↵A. Wilcox
systems PR 30917 * testsuite/ld-elf/dt-relr.exp: Skip for MUSL targets.
2023-10-05Fix: ld testsuite: non-PIC shared tests fail on powerpc-linux-muslA. Wilcox
PR 30918 * testsuite/ld-shared/shared.exp: Add XFAILs for tests that fail with the MUSL library.
2023-10-05Fix: ld testsuite: Thumb PLT and GOT tests should be skipped on musl armhf ↵A. Wilcox
targets PR 30923 * testsuite/ld-arm/thumb-plt-got.d: Skip test for configurations using the MUSL library. * testsuite/ld-arm/thumb-plt.d: Likewise.
2023-10-05Fix: ld testsuite: pr22001-1 test segfaults on musl/x86A. Wilcox
PR 30925 PR 22001 * testsuite/ld-i386/i386.exp: Skip the pr22001 test with TEXTREL relocations enabled on configurations using the MUSL library.
2023-10-05Fix: ld testsuite: 'Version' pattern grabs 'Version5 EABI', breaking test on ↵A. Wilcox
arm-linux-musleabihf PR 30924 * testsuite/ld-elfvers/vers.exp (objdump_emptyverstuff): Handle EABI version information in objdump's output.
2023-10-02Use bfd_get_current_time in places where it is suitableNick Clifton
2023-09-27Fix: Output section type does not been applied to section forced output by ↵Hsinyuan Xavier
`. = .` assignment PR 30875 * ldlang.c (get_os_init_flag): New function. (exp_init_os, map_input_to_output_sections): Use it.
2023-08-02Revert "2.41 Release sources"Sam James
This reverts commit 675b9d612cc59446e84e2c6d89b45500cb603a8d. See https://sourceware.org/pipermail/binutils/2023-August/128761.html.
2023-08-022.41 Release sourcesNick Clifton
2023-07-24objcopy embeds the current time and ignores SOURCE_DATE_EPOCH making the ↵Johannes Schauer Marin Rodrigues
output unreproducible. bfd * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a timestamp, use the value held in the SOURCE_DATE_EPOCH environment variable, if it is defined. binutils * doc/binutils.texi (objcopy): Document change in behaviour of objcopy's --preserve-dates command line option. ld * pe-dll.c (fill_edata): If inserting a timestamp, use the value held in the SOURCE_DATE_EPOCH environment variable, if it is defined. * ld.texi (--insert-timestamp): Document change in behaviour.
2023-07-03Change version number to 2.41.50 and regenerate filesNick Clifton
2023-07-03Add markers for the 2.41 branchNick Clifton
2023-06-28Stop the linker's --dependency-file option from including temporary lto files.Nick Clifton
PR 30568 * ldfile.c (ldfile_try_open_bfd): Do not track lto generated temporary files.
2023-06-21For test for PR 29072 when the linker is configured with ↵Nick Clifton
--enable-default-execstack=no. PR 29072 * testsuite/ld-elf/elf.exp (target_defaults_to_execstack): Always return false for linkers configured with the --enable-default-execstack=no option.
2023-06-14Add --remap-inputs option to the BFD linker.Nick Clifton
PR 30374 * ldfile.c (struct input_remap): New structure. (ldfile_add_remap): New function. (ldfile_remap_input_free): New function. (ldfile_add_remap_file): New function. (ldfile_possibly_remap_input): New function. (ldfile_print_input_remaps): New function. * ldfile.h: Add prototypes for new functions. * ldlang.c (new_afile): Call ldfile_possibly_remap_input. (lang_finish): Call ldfile_remap_input_free. (lang_map): Call ldfile_print_input_remaps. * ldlex.h (OPTION_REMAP_INPUTS, OPTION_REMAP_INPUTS_FILE): Define. * lexsup.c (ld_options): Add --remap-inputs-file and --remap-inputs. (parse_args): Handle new options. * NEWS: Mention the new feature. * ld.texi: Document the new options. * testsuite/ld-misc/input-remap.exp: New test driver. * testsuite/ld-misc/remaps.r: New file: Expected linker output. * testsuite/ld-misc/remaps.txt: New file. Input remaps file.
2023-06-07Add extra linker warning message about discrepancies between normal and ↵Nick Clifton
common symbols. PR 30499 bfd * elflink.c (elf_link_add_object_symbols): Add a message indicating that alignment and size discrepancies between the definition of common symbols and normal symbols are serious and should be investigated. ld * testsuite/ld-elfcomm/elfcomm.exp: Update regexps to match new output from the linker.
2023-05-17Decorated symbols in import libs (BUG 30421)Luca Bacci
PR 30421 * cofflink.c (_decoration_hash_newfunc): New function. (_bfd_coff_link_hash_table_init): Call it. * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash field. (struct decoration_hash_entry): Declare. (_decoration_hash_newfunc): Prototype. * libcoff.h: Regenerate. * emultempl/pe.em (set_decoration): New function. (pe_fixup_stdcalls): Call the new function. * emultempl/pep.em (set_decoration): New function. (pep_fixup_stdcalls): Call the new function. * pe-dll.c (make_one): Check for decoated symbols.
2023-05-16Document how to use the linker to create a resource only DLL.Nick Clifton
PR 30359 * ld.texi (WIN32): Document how to create a resource only DLL.
2023-05-16-Ur option documentationNick Clifton
* ld.texi (-Ur): Clarify the actions of this option.
2023-05-10Add linker option to include local symbols in the linker map.Nick Clifton
PR 16566 * ldlang.c (ld_is_local_symbol): New function. (print_input_section): Add code to display local symbols in the section. * ldlex.h (enum option_values): Add OPTION_PRINT_MAP_LOCALS and OPTION_PRINT_MAP_LOCALS. * lexsup.c (ld_options[]): Add entries for --print-map-locals and --no-print-map-locals. * NEWS: Mention the new feature. * ld.h (struct ld_config_type): Add print_map_locals field. * ld.texi: Document the new command line option. * testsuite/ld-scripts/sizeof.s: Add a local symbol. * testsuite/ld-scripts/map-locals.d: New test control file. * testsuite/ld-scripts/map-address.exp: Run the new test.
2023-05-04Stop the linker from loosing the entry point for COFF/PE code when compiling ↵Nick Clifton
with LTO enabled. PR 30300 * emultempl/pep.em (set_entry_point): Add an undefined reference to the entry point if it has been constructed heuristically. * emultempl/pe.em (set_entry_point): Likewise.
2023-05-04ld: pru: Place exception-handling sections correctlyDimitar Dimitrov
* scripttempl/pru.sc (OUTPUT_SECTION_ALIGN): New helper variable to place at end of DMEM output sections. (.data): Use the helper variable. (.eh_frame): New output section. (.gnu_extab): Ditto. (.gcc_except_table): Ditto. (.resource_table): Use the helper variable.
2023-04-27Add support for %x and %lx formats to the linker's vinfo() function.Nick Clifton
2023-04-18Symbols with GOT relocatios do not fix adjustbalemengqinggang
gas * config/tc-loongarch.c (loongarch_fix_adjustable): Symbols with GOT relocatios do not fix adjustbale. * testsuite/gas/loongarch/macro_op_large_abs.d: Regenerated. * testsuite/gas/loongarch/macro_op_large_pc.d: Regenerated. ld * testsuite/ld-loongarch-elf/macro_op.d: Regenerated. -
2023-04-17Add support for the .gnu.sgstubs section to the linker for ARM/ELF based ↵Nick Clifton
targets. PR 30354 * emulparams/armelf.sh (OTHER_PLT_SECTIONS): Define in order to handle the .gnu.sgstubs section.
2023-04-13arc: Update ARC specific linker tests.Claudiu Zissulescu
All the tests are designed for a little-endian ARC system. Thus, update the arc predicate in arc.exp, improve the matching pattern for linker relaxation test, and add linker scripts to nps-1x tests. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2023-04-12Fix typos in the linker's documentation of the ↵Nick Clifton
--enable-non-contiguous-regions option.