aboutsummaryrefslogtreecommitdiff
path: root/binutils
AgeCommit message (Collapse)AuthorFilesLines
2024-10-04dlltool fixes for commit 68bbe1183379Alan Modra1-4/+5
For some reason, dlltool supports mcore-elf input files. * dlltool.c (filter_symbols): Drop symbols with NULL names. (identify_member_contains_symname): Don't consider symbols with NULL names.
2024-10-04MAINTAINERS: move M R Swami Reddy to Past MaintainersJan Beulich1-2/+1
He/she cannot be reached at the given address anymore, and the name is apparently too common to identify the person to attempt to establish another contact. Sadly this orphans the CR16 and CRx ports.
2024-10-04MAINTAINERS: move Matt Thomas to Past MaintainersJan Beulich1-2/+1
Matt cannot be reached at the @netbsd.org address anymore, and I was unable to find another one, even with the help of the NetBSD community (where his resigning was announced over 4 years ago [1]). [1] http://mail-index.netbsd.org/netbsd-announce/2020/05/07/msg000314.html
2024-10-03Enable dlltool --leading-underscore for targets other than x86Alan Modra2-57/+7
This also makes the dlltool tests run more PE targets, finding that sh-pe dlltool reports "Machine 'sh' not supported". I guess no one cares about that. PR19459 * dlltool.c (asm_prefix): Remove "mach" parameter. Return leading_underscore independent of machine. (ASM_PREFIX): Adjust. * testsuite/binutils-all/dlltool.exp: Run on any target satisfying is_pecoff_format for which dlltool is built. Revert commit 0398b8d6c86a. Remove target_xfail.
2024-10-03dlltool leading_underscoreAlan Modra1-42/+25
This patch tidies dlltool code dealing with adding a leading underscore to generated symbol names. There should be no functional change here, but there could be if we ever have a bfd target with symbol_leading_char something other than '_' or 0. * dlltool.c (leading_underscore): Change from an int to a char*. Update all uses. If neither --leading-underscore or --no=leading-underscore is given, set leading_underscore to a string with first char returned by bfd_get_target_info as the target's symbol underscoring.
2024-10-03nm: don't try to print line numbers for symbols without namesAlan Modra1-3/+3
It doesn't make much sense trying to print line numbers for what are usually broken symbols, and there is a possibility of a segfault if we pass strcmp a NULL.
2024-10-01Re: dlltool: file name too longAlan Modra1-36/+22
Allow for "snnnnn.o" suffix when testing against NAME_MAX, and tidy TMP_STUB handling by overwriting a prior nnnnn.o string rather than copying the entire name. * dlltool.c (TMP_STUB): Add "nnnnn.o" to format. (make_one_lib_file): Localise variables. Don't copy TMP_STUB, overwrite suffix instead. (gen_lib_file): Similarly. (main): Allow for max suffix when testing against NAME_MAX.
2024-09-28Move uses_elf_em to ld-lib.expAlan Modra1-21/+0
and add a missing entry from uses_genelf. binutils/ * testsuite/lib/binutils-common.exp (uses_elf_em): Delete. ld/ * testsuite/lib/ld-lib.exp (uses_genelf): Add moxie-*-moxiebox. (uses_elf_em): New.
2024-09-24binutils testsuite: canonicalize subtest names in debuginfod.expFrank Ch. Eigler1-6/+6
Previous code included the full $srcdir pathnames in the individual subtest PASS/FAIL names, which makes it difficult to compute comparisons or regressions between test runs on different machines. This version switches to the basename only, which are common. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2024-08-29get_type_abbrev_from_form tidyAlan Modra1-25/+19
* dwarf.c (get_type_abbrev_from_form): Make uvalue param a uint64_t. Localise variables. Don't bother clearing *data_return and *addrev_num_return for a NULL return value.
2024-08-28dlltool: file name too longJiaying Song1-5/+3
During the execution of the command: i686-w64-mingw32-dlltool --input-def $def_filepath --output-delaylib $filepath --dllname qemu.exe An error occurred: i686-w64-mingw32-dlltool: failed to open temporary head file: ..._w64_mingw32_nativesdk_qemu_8_2_2_build_plugins_libqemu_plugin_api_a_h.s Due to the path length exceeding the Linux system's file name length limit (NAME_MAX=255), the temporary file name generated by the i686-w64-mingw32-dlltool command becomes too long to open. To address this, a new temporary file name prefix is generated using tmp_prefix = prefix_encode ("d", getpid()), ensuring that the file name does not exceed the system's length limit. Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com> Reviewed-by: Alan Modra <amodra@gmail.com>
2024-08-28dlltool.c formattingAlan Modra1-223/+226
Mostly whitespace fixes, some removal of excess parens.
2024-08-19Remove Walter Lee as maintainer for Tile Gx and Tile ProNick Clifton1-2/+1
2024-08-17Update release readme after making 2.43.1 releaseNick Clifton1-20/+40
2024-08-13PR32072 dlltool.c initializer-string is too longAlan Modra1-58/+9
PR 32072 * dlltool.c: Delete unneeded forward function declaraions. Make buffers used by dlltmp static. (prefix_encode): Avoid warning. Use stpcpy.
2024-08-04Update release-README after completing the 2.43 release.Nick Clifton1-20/+18
2024-08-02Updated Bulgarian translation for the binutils/ directoryNick Clifton1-2596/+3328
2024-08-02Fix typo in --help output of the strings program.Aapo Rantalainen1-2/+2
PR 31940
2024-08-01skip_attr_bytes assertion (data) <= (end) failAlan Modra1-1/+4
get_type_abbrev_from_form is lax in not limiting data for a uleb to the current CU, because DW_FORM_ref_addr allows access to other CU's data. This can lead to an assertion fail when skipping or reading attributes in get_type_signedness. * dwarf.c (get_type_abbrev_from_form): Limit uleb data to map end for ref_addr, cu_end otherwise.
2024-07-29Updated translations for the bfd, binutils, gas, ld and opcodes directoriesNick Clifton4-7653/+8656
2024-07-29PR 31728 testcasesPali Rohár1-2/+21
2024-07-26microMIPS: Add MT ASE instruction set supportYunQiang Su4-0/+1273
Add the MT ASE instruction operand types and encodings to the microMIPS opcode table and enable the assembly of these instructions in GAS from MIPSr2 onwards. Update the binutils and GAS testsuites accordingly. References: "MIPS Architecture for Programmers, Volume IV-f: The MIPS MT Module for the microMIPS32 Architecture", MIPS Technologies, Inc., Document Number: MD00768, Revision 1.12, July 16, 2013 Co-Authored-By: Maciej W. Rozycki <macro@redhat.com>
2024-07-26Fix "Untranslated plural in readelf.c"Nick Clifton1-9/+10
PR 32002
2024-07-23Improve objdump's display of PE header information.Pali Roh?r1-24/+69
PR 31953
2024-07-20Correct version for binutils 2.43 NEWS entries.H.J. Lu1-1/+1
Change 2.42 to 2.43 for binutils 2.43 NEWS entries. binutils/ * NEWS: Change 2.42 to 2.43 for 2.43 NEWS entries. ld/ * NEWS: Change 2.42 to 2.43 for 2.43 NEWS entries. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-07-20Update after creating 2.43 branchNick Clifton1-18/+12
2024-07-20Change version to 2.43.50Nick Clifton3-1887/+2121
2024-07-20Add markers for 2.43 branch/releaseNick Clifton3-0/+7
2024-07-20Re: binutils: Add a test for strip with build notesAlan Modra2-6/+7
The new test wasn't being run, and failed due to relocations against .gnu.build.attributes being stripped by default strip behaviour. We probably should be keeping these relocations, but I haven't made that change here. BTW, the new test fails on ia64-hpux but that's just a repeat of the existing note-5 fail. PR 31999 * testsuite/binutils-all/strip-16.d: strip with --strip-unneeded and --merge-notes. * testsuite/binutils-all/objcopy.exp: Run the new test. Sort other strip tests.
2024-07-19binutils: Add a test for strip with build notesH.J. Lu1-0/+11
Add a test for strip with build notes. PR binutils/31999 * testsuite/binutils-all/strip-16.d: New. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-07-20PR31999 strip [.gnu.build.attributes]: failedAlan Modra1-0/+1
PR 31999 * objcopy.c (merge_gnu_build_notes): Always set *new_size.
2024-07-19MIPS/opcodes: Mark MT thread context move assembly idioms as aliasesMaciej W. Rozycki3-0/+1270
A number of instructions in the regular MIPS opcode table are assembly idioms for the MT thread context move MFTR and MTTR instructions, so mark them as aliases accordingly. Add suitable test cases, which also cover the PAUSE assembly idiom.
2024-07-11gprofng: add release notes for 2.43Vladimir Mezentsev1-0/+7
ChangeLog 2024-07-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * binutils/NEWS (gprofng): Add release notes for 2.43
2024-07-06Re: LoongArch: Add DT_RELR supportAlan Modra1-2/+2
Fix commit d89ecf33ab testsuite breakage. * testsuite/lib/binutils-common.exp (supports_dt_relr): Correct.
2024-07-06objcopy bfd_map_over_sections and global statusAlan Modra2-144/+140
This patch started life as a relatively simple change to fix some unimportant objcopy memory leaks, but expanded into a larger patch when I was annoyed by the awkwardness of passing data when using bfd_map_over_sections. A simple loop over sections is much more convenient, and we really don't need the abstraction layer. Sections in a list isn't going to disappear any time soon. The patch also removes use of the global "status" variable by all but the top-level functions called from main. * objcopy.c (filter_symbols): Return success as a bool. Pass symcount as a pointer, updated on return. (merge_gnu_build_notes): Similarly return a bool and add newsize param with updated smaller section size. (setup_bfd_headers): Return bool success rather than setting "status" on failure. (setup_section): Likewise. (copy_relocations_in_section, copy_section): Likewise, and adjust params. (mark_symbols_used_in_relocations): Likewise, and free memory on failure path. Don't call bfd_fatal. (get_sections): Delete function. (copy_object): Don't use bfd_map_over_sections, instead use a loop allowing easy detection of failure status. Free memory on error paths. (copy_archive): Return bool success rather than setting "status" on failure. (copy_file): Set "status" here. * testsuite/binutils-all/strip-13.d: Adjust to suit.
2024-07-05LoongArch: Add DT_RELR supportXi Ruoyao1-0/+1
The logic is same as a71d87680110 ("aarch64: Add DT_RELR support"). As LoongArch does not have -z dynamic-undefined-weak, we don't need to consider UNDEFWEAK_NO_DYNAMIC_RELOC. The linker relaxation adds another layer of complexity. When we delete bytes in a section during relaxation, we need to fix up the offset in the to-be-packed relative relocations against this section. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2024-07-01MAINTAINERS: Update my e-mail addressClaudiu Zissulescu1-1/+1
Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
2024-07-01PR31941 objcopy --globalize-symbolAlan Modra1-0/+1
I think FILE symbols are special, and I can't see why anyone would want them to be made global. The fact that no one has reported this bug since commit 7b4a0685e80a in 2005 supports that claim. PR 31941 * objcopy.c (filter_symbols): Don't allow BSF_FILE symbols to be made global.
2024-07-01objcopy: Allow making symbol global and weak on same invocationMarcus Nilsson3-15/+27
Previously objcopy had to be run twice in order to make a local symbol weak, first once to globalize it, and once again to mark it as weak. * objcopy.c (filter_symbols): Weaken symbols after making local/global changes. * testsuite/binutils-all/symbols-5.d, * testsuite/binutils-all/symbols-5.s: New test.
2024-06-30Assertion `(data) <= (end)' failed in read_basesAlan Modra1-24/+29
* dwarf.c (skip_attribute): Don't increment data past end. Use SKIP_{S,U}LEB rather than READ_{S,U}LEB.
2024-06-27Set BFD_DECOMPRESS when reading build-id debuglinkH.J. Lu2-4/+9
We should set BFD_DECOMPRESS to decompress sections unless dumping the section contents when reading build-id debuglink. PR binutils/31925 * objdump.c (open_debug_file): Set BFD_DECOMPRESS to decompress sections unless dumping the section contents. * testsuite/binutils-all/objdump.exp (test_build_id_debuglink): Add a compress option. Run test_build_id_debuglink with none and zlib. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-06-27Improve comments describing the Import Directory TablePali Roh?r1-3/+10
PR 31728
2024-06-26Revert: 35fd2ddeb1d90f1750401cfb6d01fe055656b88dNick Clifton2-6/+17
PR 20814
2024-06-25aarch64: Add DT_RELR tests for ILP32 ABISzabolcs Nagy1-1/+1
2024-06-24Updated Spanish translations for the bfd and binutils sub-directoriesNick Clifton1-3900/+7392
2024-06-20Revert "Remove LIBINTL_DEP"Alan Modra3-46/+53
This reverts commit e874cbd3879843a83e4bcc4b54cd7107387b1df6. The patch was wrong. LIBINTL_DEP is needed with an in-tree gettext.
2024-06-20Remove LIBINTL_DEPAlan Modra3-53/+46
The intl directory in the source no longer exists. LIBINTL_DEP is thus always empty. Remove references to it. config/ * gettext-sister.m4: Don't AC_SUBST LIBINTL_DEP. bfd/ * Makefile.in: Regenerate. * configure: Regenerate. binutils/ * Makefile.am (*_DEPENDENCIES): Remove LIBINTL_DEP. * Makefile.in: Regenerate. * configure: Regenerate. gas/ * Makefile.am (as_new_DEPENDENCIES): Remove LIBINTL_DEP. * Makefile.in: Regenerate. * configure: Regenerate. gdb/ * Makefile.in (INTL_DEPS): Don't set or reference. * configure: Regenerate. gdbserver/ * Makefile.in (INTL_DEPS): Don't set or reference. gdbsupport/ * Makefile.in: Regenerate. * configure: Regenerate. gold/ * Makefile.am (deps_var): Remove LIBINTL_DEP. (incremental_dump_DEPENDENCIES, dwp_DEPENDENCIES): Likewise. * Makefile.in: Regenerate. * configure: Regenerate. * testsuite/Makefile.am (DEPENDENCIES): Remove LIBINTL_DEP. * testsuite/Makefile.in: Regenerate. gprof/ * Makefile.am (gprof_DEPENDENCIES): Remove LIBINTL_DEP. * Makefile.in: Regenerate. * configure: Regenerate. ld/ * Makefile.am (ld_new_DEPENDENCIES): Remove LIBINTL_DEP. * Makefile.in: Regenerate. * configure: Regenerate. libctf/ * Makefile.in: Regenerate. * configure: Regenerate. opcodes/ * configure.ac (BUILD_LIBS): Remove LIBINTL. (BUILD_LIB_DEPS): Remove LIBINTL_DEP. * Makefile.in: Regenerate. * configure: Regenerate.
2024-06-18readelf: rename recently added testsuite filesJan Beulich3-2/+2
Files named *.0 are somewhat odd for testsuite expectations. Rename the one such file to *.r with a suitable base name suffix, and have its sibling follow suit in this latter regard.
2024-06-17binutils/testsuite: Add a helper for relative path constructionMaciej W. Rozycki1-0/+32
Implement a helper to construct a relative path between two locations in the filesystem, for example to make a path from the source to the object directory for the case where a tool has been set up to look at a given path and there is a need to point it elsewhere, but an absolute path will not work. The helper works on normalized paths internally, so the result is correct even in the presence of symlinks as intermediate path components. So given "/path/to/src/gas/testsuite/gas/all" as the FROM argument and then "/path/to/obj/gas/testsuite/tmpdir/none.s" as the TO argument the helper will return "../../../../../obj/gas/testsuite/tmpdir/none.s" in the absence of symlinks.
2024-06-17PR31898 bug in processing DW_RLE_startx_endxAlan Modra1-4/+4
PR 31898 * dwarf.c (display_debug_rnglists_list): Correct fetch of "end" indexed address. Remove excess parens.