aboutsummaryrefslogtreecommitdiff
path: root/binutils
AgeCommit message (Collapse)AuthorFilesLines
2023-08-022.41 Release sourcesbinutils-2_41-releaseNick Clifton14-466/+359
2023-08-02Don't declare xmalloc or xrealloc in bucomm.hAlan Modra3-6/+2
It's better to include the proper header, which has declarations with various attributes. Commit 096aefc040 in 1994 introduced this wart. * bucomm.h (xmalloc, xrealloc): Delete declaration. * od-macho.c: Include libiberty.h. * od-xcoff.c: Include libiberty.h.
2023-08-01Fix "--only-keep-debug for ELF relocatables" binutils test for compilers ↵Nick Clifton1-1/+6
which add .debug_macro sections to object files. PR 30699 * binutils/testsuite/binutils-all/objcopy.exp (keep_debug_symbols_for_elf_relocatable): Do not add sections containing the string "debug_" to the list of non-debug sections.
2023-08-01Add note to check that all changes have been pushed before creating the ↵Nick Clifton1-1/+5
source tarballs
2023-07-30bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flagsJose E. Marchesi2-0/+11
This patch adds support for EF_BPF_CPUVER bits in the ELF machine-dependent header flags. These bits encode the BPF CPU version for which the object file has been compiled for. The BPF assembler is updated so it annotates the object files it generates with these bits. The BPF disassembler is updated so it honors EF_BPF_CPUVER to use the appropriate ISA version if the user didn't specify an explicit ISA version in the command line. Note that a value of zero in EF_BPF_CPUVER is interpreted by the disassembler as "use the later supported version" (the BPF CPU versions start with v1.) The readelf utility is updated to pretty print EF_BPF_CPUVER when it prints out the ELF header: $ readelf -h a.out ELF Header: ... Flags: 0x4, CPU Version: 4 Tested in bpf-unknown-none. include/ChangeLog: 2023-07-30 Jose E. Marchesi <jose.marchesi@oracle.com> * elf/bpf.h (EF_BPF_CPUVER): Define. * opcode/bpf.h (BPF_XBPF): Change from 0xf to 0xff so it fits in EF_BPF_CPUVER. binutils/ChangeLog: 2023-07-30 Jose E. Marchesi <jose.marchesi@oracle.com> * readelf.c (get_machine_flags): Recognize and pretty print BPF machine flags. opcodes/ChangeLog: 2023-07-30 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf-dis.c: Initialize asm_bpf_version to -1. (print_insn_bpf): Set BPF ISA version from the cpu version ELF header flags if no explicit version set in the command line. * disassemble.c (disassemble_init_for_target): Remove unused code. gas/ChangeLog: 2023-07-30 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-bpf.h (elf_tc_final_processing): Define. * config/tc-bpf.c (bpf_elf_final_processing): New function.
2023-07-30Update how to make a release document after the 2.41 releaseNick Clifton1-12/+17
2023-07-28MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targetsYunQiang Su6-9/+20
Make the n64 ABI the default for 64-bit Linux targets specified with `-gnuabi64' suffix included in the target triplet, for configurations such as the Debian mips64el and mips64r6el ports. Adjust testsuite configuration accordingly. There are the following regressions with the new target triplet: mips64-linux-gnuabi64 +FAIL: readelf -S bintest mips64-linux-gnuabi64 +FAIL: MIPS reloc estimation 1 mips64el-linux-gnuabi64 +FAIL: readelf -S bintest mips64el-linux-gnuabi64 +FAIL: MIPS reloc estimation 1 The `readelf' issue comes from a difference in section headers produced that the `binutils/testsuite/binutils-all/readelf.s-64' pattern template does not match. While there has been a precedent it does not appear to me that there is a clear advantage from adding more and more variations to the template rather than forking the existing template into multiple ones for a more exact match. So this is best deferred to a separate discussion. The MIPS reloc estimation issue is an actual bug in `objdump', which discards a number of trailing entries from output here for n64 composed relocations: DYNAMIC RELOCATION RECORDS OFFSET TYPE VALUE 0000000000000000 R_MIPS_NONE *ABS* 0000000000000000 R_MIPS_NONE *ABS* and consequently `ld/testsuite/ld-mips-elf/reloc-estimate-1.d' does not match even though ELF output produced is correct according to `readelf': Relocation section '.rel.dyn' at offset 0x10400 contains 2 entries: Offset Info Type Sym. Value Sym. Name 000000000000 000000000000 R_MIPS_NONE Type2: R_MIPS_NONE Type3: R_MIPS_NONE 000000010000 000300001203 R_MIPS_REL32 0000000000010010 foo@@V2 Type2: R_MIPS_64 Type3: R_MIPS_NONE As a genuine bug this has to be handled separately. Co-Authored by: Maciej W. Rozycki <macro@orcam.me.uk> bfd/ * config.bfd: Add `mips64*el-*-linux*-gnuabi64' and `mips64*-*-linux*-gnuabi64' targets. binutils/ * testsuite/binutils-all/mips/mips.exp: Handle `*-*-*-gnuabi64' targets. * testsuite/binutils-all/objcopy.exp: Handle `mips64*-*-*-gnuabi64' targets. * testsuite/binutils-all/remove-relocs-01.d: Likewise. * testsuite/binutils-all/remove-relocs-04.d: Likewise. * testsuite/binutils-all/remove-relocs-05.d: Likewise. * testsuite/binutils-all/remove-relocs-06.d: Likewise. gas/ * configure.ac: Handle `mips64*-linux-gnuabi64' targets. * configure: Regenerate. * testsuite/gas/mips/compact-eh-eb-7.d: Handle `mips64*-*-*-gnuabi64' targets. * testsuite/gas/mips/compact-eh-el-7.d: Likewise. ld/ * configure.tgt: Add `mips64*el-*-linux-gnuabi64' and `mips64*-*-linux-gnuabi64' targets. * testsuite/ld-undefined/undefined.exp: Handle `mips64*-*-*-gnuabi64' targets. * testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise. * testsuite/ld-mips-elf/compact-eh6.d: Likewise. * testsuite/ld-mips-elf/mips-elf.exp: Handle `*-*-*-gnuabi64' targets.
2023-07-28testsuite: Handle composed R_MIPS_NONE relocationsYunQiang Su1-0/+2
MIPS n64 ABI has a peculiarity where all relocations are composed of three, with subsequent relocation types set to R_MIPS_NONE if further calculation is not required. Example output produced by `readelf' and `objdump' for such relocations is: Offset Info Type Sym. Value Sym. Name + Addend 000000000000 000800000002 R_MIPS_32 0000000000000000 foo + 0 Type2: R_MIPS_NONE Type3: R_MIPS_NONE and: OFFSET TYPE VALUE 0000000000000000 R_MIPS_32 foo 0000000000000000 R_MIPS_NONE *ABS* 0000000000000000 R_MIPS_NONE *ABS* respectively. The presence of these extra R_MIPS_NONE entries is not relevant for generic or even some MIPS tests, so optionally match them with the respective dump patterns, also discarding `xfail' annotation for MIPS/OpenBSD targets from gas/elf/missing-build-notes.d, removing these regressions: mips64-openbsd -FAIL: readelf -r bintest mips64-openbsd -FAIL: forward expression mips64-openbsd -FAIL: assignment tests mips64-openbsd -FAIL: gas/all/none mips64-openbsd -XFAIL: gas/elf/missing-build-notes mips64-openbsd -FAIL: macro test 2 mips64-openbsd -FAIL: macro irp mips64-openbsd -FAIL: macro rept mips64-openbsd -FAIL: nested irp/irpc/rept mips64-openbsd -FAIL: macro vararg mips64-openbsd -FAIL: mips jalx mips64-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue mips64el-openbsd -FAIL: readelf -r bintest mips64el-openbsd -FAIL: forward expression mips64el-openbsd -FAIL: assignment tests mips64el-openbsd -FAIL: gas/all/none mips64el-openbsd -XFAIL: gas/elf/missing-build-notes mips64el-openbsd -FAIL: macro test 2 mips64el-openbsd -FAIL: macro irp mips64el-openbsd -FAIL: macro rept mips64el-openbsd -FAIL: nested irp/irpc/rept mips64el-openbsd -FAIL: macro vararg mips64el-openbsd -FAIL: mips jalx mips64el-openbsd -FAIL: ST Microelectronics Loongson-2F workarounds of Jump Instruction issue Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk> binutils/ * testsuite/binutils-all/readelf.r-64: Optionally match extra R_MIPS_NONE pairs. gas/ * testsuite/gas/all/assign.d: Optionally match extra R_MIPS_NONE pairs. * testsuite/gas/all/fwdexp.d: Likewise. * testsuite/gas/all/none.d: Likewise. * testsuite/gas/macros/irp.d: Likewise. * testsuite/gas/macros/repeat.d: Likewise. * testsuite/gas/macros/rept.d: Likewise. * testsuite/gas/macros/test2.d: Likewise. * testsuite/gas/macros/vararg.d: Likewise. * testsuite/gas/mips/compact-eh-eb-1.d: Likewise. * testsuite/gas/mips/compact-eh-eb-2.d: Likewise. * testsuite/gas/mips/compact-eh-eb-3.d: Likewise. * testsuite/gas/mips/compact-eh-eb-4.d: Likewise. * testsuite/gas/mips/compact-eh-eb-5.d: Likewise. * testsuite/gas/mips/compact-eh-eb-6.d: Likewise. * testsuite/gas/mips/compact-eh-el-1.d: Likewise. * testsuite/gas/mips/compact-eh-el-2.d: Likewise. * testsuite/gas/mips/compact-eh-el-3.d: Likewise. * testsuite/gas/mips/compact-eh-el-4.d: Likewise. * testsuite/gas/mips/compact-eh-el-5.d: Likewise. * testsuite/gas/mips/compact-eh-el-6.d: Likewise. * testsuite/gas/mips/loongson-2f-3.d: Likewise. * testsuite/gas/mips/mips-jalx.d: Likewise. * testsuite/gas/elf/missing-build-notes.d: Likewise. Remove the `xfail' tag. ld/ * testsuite/ld-mips-elf/reloc-estimate-1.d: Optionally match extra R_MIPS_NONE pairs.
2023-07-28testsuite: Also discard the `.MIPS.options' sectionYunQiang Su1-1/+1
Also discard the `.MIPS.options' section, used with n64 MIPS binaries, along with similar other MIPS sections (`.reginfo', `.MIPS.abiflags') not relevant for the test cases concerned, fixing these regressions: mips64-openbsd -FAIL: ld-elf/group3a mips64-openbsd -FAIL: ld-elf/group3b mips64-openbsd -FAIL: Place orphan sections (map file check) mips64-openbsd -FAIL: ld-elf/orphan-region mips64-openbsd -FAIL: ld-elf/orphan mips64-openbsd -FAIL: overlay size (map file check) mips64-openbsd -FAIL: overlay size mips64el-openbsd -FAIL: ld-elf/group3a mips64el-openbsd -FAIL: ld-elf/group3b mips64el-openbsd -FAIL: Place orphan sections (map file check) mips64el-openbsd -FAIL: ld-elf/orphan-region mips64el-openbsd -FAIL: ld-elf/orphan mips64el-openbsd -FAIL: overlay size (map file check) mips64el-openbsd -FAIL: overlay size Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk> binutils/ * testsuite/binutils-all/strip-3.d: Add `-R .MIPS.options' to the `strip' tag. ld/ * testsuite/ld-elf/group.ld: Also discard `.MIPS.options'. * testsuite/ld-elf/orphan-region.ld: Likewise. * testsuite/ld-elf/orphan.ld: Likewise. * testsuite/ld-mips-elf/got-page-1.ld: Likewise. * testsuite/ld-scripts/overlay-size.t: Likewise.
2023-07-28Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI"Maciej W. Rozycki1-1/+0
This reverts commit 32f1c80375ebe8ad25d9805ee5889f0006c51e59. It had two unrelated changes lumped together, one of which changed the meaning of the `mipsisa64*-*-linux*' target triplets, which was not properly evaluated.
2023-07-28coff/pe/xcoff and --extract-symbolsAlan Modra1-7/+19
This fixes failure of the "extract symbols" test for rs6000, where --extract-symbols generates a non-zero sized .text. By the look of coffcode.h the same problem might occur for coff/pe too, but doesn't happen to trigger a test failure. bfd/ * coffcode.h (coff_compute_section_file_positions): Don't adjust size of !SEC_LOAD sections. binutils/ * objcopy.c (setup_section): Clear SEC_LOAD for --extract-symbol.
2023-07-24objcopy embeds the current time and ignores SOURCE_DATE_EPOCH making the ↵Johannes Schauer Marin Rodrigues2-0/+10
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-19Tidy binutils configureAlan Modra2-252/+240
Separate out some of the defines from the block handling windows support, so they don't get lost. Delete an unused variable.
2023-07-19Build all the objdump extensions with --enable-targets=allAlan Modra3-11/+14
Only the xcoff and pe extensions were enabled. Build the lot, and fix some more printf format problems when the host is 32-bit. * configure.ac (od_vectors): Set up for --enable-targets=all. * configure: Regenerate. * od-elf32_avr.c (elf32_avr_dump_mem_usage): Correct format specifier vs. arg mismatch. (elf32_avr_dump_avr_prop): Likewise.
2023-07-18Updated Swedish translation for the binutils subdirectoryNick Clifton1-2076/+2586
2023-07-14More tidies to objcopy archive handlingAlan Modra1-28/+32
This makes sure copy_archive exits with ibfd and obfd closed. Error paths didn't do that, leading to memory leaks. None of this matters very much. * objcopy.c (copy_archive): bfd_close ibfd and obfd on error return paths. Remove braces around "list" free. (copy_file): Don't close invalid file descriptor.
2023-07-12Re: Keeping track of rs6000-coff archive element pointersAlan Modra1-1/+7
bfd/ * coff-rs6000.c (add_range): Revise comment, noting possible fail. (_bfd_xcoff_openr_next_archived_file): Start with clean ranges. binutils/ * bfdtest1.c: Enhance to catch errors on second scan.
2023-07-09PR30592 objcopy: allow --set-section-flags to add or remove SHF_X86_64_LARGEFangrui Song9-10/+102
For example, objcopy --set-section-flags .data=alloc,large will add SHF_X86_64_LARGE to the .data section. Omitting "large" will drop the SHF_X86_64_LARGE flag. The bfd_section flag is named generically, SEC_ELF_LARGE, in case other processors want to follow SHF_X86_64_LARGE. SEC_ELF_LARGE has the same value as SEC_TIC54X_BLOCK used by coff. bfd/ * section.c: Define SEC_ELF_LARGE. * bfd-in2.h: Regenerate. * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, elf_x86_64_copy_private_section_data): New. binutils/ * NEWS: Mention the new feature for objcopy. * doc/binutils.texi: Mention "large". * objcopy.c (parse_flags): Parse "large". (check_new_section_flags): Error if "large" is used with a non-x86-64 ELF target. * testsuite/binutils-all/x86-64/large-sections.d: New. * testsuite/binutils-all/x86-64/large-sections.s: New. * testsuite/binutils-all/x86-64/large-sections-i386.d: New. * testsuite/binutils-all/x86-64/large-sections-2.d: New. * testsuite/binutils-all/x86-64/large-sections-2-x32.d: New.
2023-07-07arc: Update/Add ARCv3 support.Claudiu Zissulescu1-2/+28
The ARC HS5x and ARC HS6x processors are based on the new ARCv3 ISA that implements a full range of 32-bit and 64-bit instructions. These processors feature a high-speed 10-stage, dual-issue pipeline that offers increased utilization of functional units with a limited increase in power and area. The HS5x processors feature a 32-bit pipeline that can execute all ARCv3 32-bit instructions, while the HS6x processors feature a full 64-bit pipeline and register file that can execute both 32-bit and 64-bit instructions. In addition, the ARC HS6x supports 64-bit virtual and 52-bit physical address spaces to enable direct addressing of current and future large memories, as well as 128-bit loads and stores for efficient data movement. This readelf patch updates/adds Synopsys ARCv3 machine name fileds and supported relocations. Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
2023-07-07Udated Freach and Romainian translations for various sub-directoriesNick Clifton1-2081/+2612
2023-07-07Minor updates to release readmeNick Clifton1-1/+15
2023-07-04Updated Ukranian, Romanian and German translations for various sub-directoriesNick Clifton2-4158/+5228
2023-07-03Update after creating 2.41 branchNick Clifton1-10/+10
2023-07-03Change version number to 2.41.50 and regenerate filesNick Clifton4-2082/+2580
2023-07-03Add markers for the 2.41 branchNick Clifton3-0/+7
2023-07-03binutils: NEWS: Announce LoongArch changes in the 2.41 cycleWANG Xuerui1-0/+14
binutils/ChangeLog: * NEWS: Mention LoongArch changes for 2.41. Signed-off-by: WANG Xuerui <git@xen0n.name>
2023-07-01binutils: NEWS: Announce new RISC-V vector crypto extensionsChristoph Müllner1-0/+2
This commit adds the recently added support of the RISC-V vector crypto extensions to the NEWS file. binutils/ChangeLog: * NEWS: Announce new RISC-V vector crypto extensions. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
2023-06-30binutils: NEWS: announce new RISC-V extensionsPhilipp Tomsich1-0/+7
We picked up support for a few new extensions over the last weeks (this may need further updating prior to the next release), list them in the NEWS file. binutils/ChangeLog: * binutils/NEWS: announce suuport for the new RISC-V extensions (Zicond, Zfa, XVentanaCondOps). Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
2023-06-30strings: Improve code to detect excessively large minimum string lengths.Nick Clifton2-18/+37
PR 30598 * strings.c (set_string_min): New function. (main): Use it. (print_unicode_stream): Calculate buffer size using a size_t.
2023-06-30Prevent an illegal memory access when running the strings program with an ↵Nick Clifton2-0/+12
excessively lerge minimum string length. PR 30595 * strings.c (main): Check for an excessively large minimum string length.
2023-06-29binutils/NEWS: announce SFrame version 2 as the new defaultIndu Bhagat1-0/+3
2023-06-29binutils: Add a --strip-section-headers testH.J. Lu2-0/+10
PR ld/25617 * testsuite/binutils-all/objcopy.exp: Run strip-section-headers-1. * testsuite/binutils-all/strip-section-headers-1.d: New file.
2023-06-29ELF: Discard non-alloc sections without section headerH.J. Lu1-1/+6
Discard non-alloc sections when section headers are stripped. bfd/ PR ld/25617 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Skip non-load sections without section header. (_bfd_elf_write_object_contents): Don't set the sh_name field without section header. Write out the .shstrtab section only if its sh_offset field isn't -1. binutils/ PR ld/25617 * objcopy.c (is_strip_section_1): Remove non-alloc sections for --strip-section-headers. ld/ PR ld/25617 * ldlang.c (lang_discard_section_p): Discard non-alloc sections if we are stripping section headers.
2023-06-29ELF: Strip section header in ELF objectsKaylee Blake3-2/+44
Section header isn't mandatory on ELF executable nor shared library. This patch adds a new linker option, -z nosectionheader, to omit ELF section header, a new objcopy and strip option, --strip-section-headers, to remove ELF section headers. bfd/ 2023-06-06 H.J. Lu <hongjiu.lu@intel.com> Kaylee Blake <klkblake@gmail.com> PR ld/25617 * bfd.c (BFD_NO_SECTION_HEADER): New. (BFD_FLAGS_SAVED): Add BFD_NO_SECTION_HEADER. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. * elfcode.h (elf_swap_ehdr_out): Omit section header with BFD_NO_SECTION_HEADER. (elf_write_shdrs_and_ehdr): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Add BFD_NO_SECTION_HEADER to object_flags. (TARGET_LITTLE_SYM): Likewise. * bfd-in2.h: Regenerated. binutils/ 2023-06-06 H.J. Lu <hongjiu.lu@intel.com> PR ld/25617 * NEWS: Mention --strip-section-headers for objcopy and strip. * objcopy.c (strip_section_headers): New. (command_line_switch): Add OPTION_STRIP_SECTION_HEADERS. (strip_options): Add --strip-section-headers. (copy_options): Likewise. (copy_usage): Add --strip-section-headers. (strip_usage): Likewise. (copy_object): Handle --strip-section-headers for ELF files. (strip_main): Handle OPTION_STRIP_SECTION_HEADERS. (copy_main): Likewise. * doc/binutils.texi: Document --strip-section-headers for objcopy and strip. ld/ 2023-06-06 H.J. Lu <hongjiu.lu@intel.com> Kaylee Blake <klkblake@gmail.com> PR ld/25617 * NEWS: Mention -z nosectionheader. * emultempl/elf.em: Support -z sectionheader and -z nosectionheader. * ld.h (ld_config_type): Add no_section_header. * ld.texi: Document -z sectionheader and -z nosectionheader. * ldlang.c (ldlang_open_output): Handle config.no_section_header. * lexsup.c (parse_args): Enable --strip-all with -z nosectionheader. Disallow -r with -z nosectionheader. (elf_static_list_options): Add -z sectionheader and -z nosectionheader.
2023-06-29Ignore --prefix-file-map compiler option whist running testsuite.Matthias Klose2-2/+2
2023-06-29ignore lto-wrapper warnings for lto builds.Matthias Klose1-0/+3
I see these warnings from time to time, when configuring a build with --enable-pgo-build=lto, I haven't yet found out why I see these sometime, and why not. E.g. https://gcc.gnu.org/PR109241. Just ignore these when they appear in test cases. lto-wrapper: warning: using serial compilation of N LTRANS jobs
2023-06-27binutils/NEWS: add note about upcoming libsframe changesIndu Bhagat1-0/+6
Some of these changes update the ABI in an incompatible way.
2023-06-27Add note about adding ChangeLog.git to src-release.shNick Clifton1-0/+8
2023-06-21Prune linker warnings about an executable stack being created with the -z ↵Nick Clifton2-2/+19
execstack option. * testsuite/lib/binutils-common.exp (prune_warnings_extra): Prune warnings about -z execstack creating an executable stack.
2023-06-15binutils/NEWS: Mention Sony Allegrex MIPS CPU supportMaciej W. Rozycki1-0/+5
Mention the addition of Sony Allegrex processor support to the MIPS port. binutils/ * NEWS: Mention Sony Allegrex MIPS CPU support.
2023-06-15Add MIPS Allegrex CPU as a MIPS2-based CPUDavid Guillen Fandos1-0/+1
The Allegrex CPU was created by Sony Interactive Entertainment to power their portable console, the PlayStation Portable. The pspdev organization maintains all sorts of tools to create software for said device including documentation. Signed-off-by: David Guillen Fandos <david@davidgf.net>
2023-06-15Revert "MIPS: fix r6 testsuites"Maciej W. Rozycki1-59/+16
This reverts commit ffc528aed56b9e2c171137da28690a9bb6861b0b. It was applied unapproved.
2023-06-15Revert "MIPS: fix -gnuabi64 testsuite"Maciej W. Rozycki9-32/+11
This reverts commit cb81e84c72933a7fad10b75b7e270d92d8d65251. It was applied unapproved.
2023-06-09readelf/objdump remember_state memory leaksAlan Modra1-5/+7
* dwarf.c (display_debug_frames <DW_CFA_restore_state>): Do free invalid remember_state.
2023-06-07objcopy memory leaks after errorsAlan Modra1-0/+5
These aren't important at all, but tidy them in case they obscure other more important leaks. * objcopy (copy_file): Close input bfd after errors.
2023-06-06Re: loongarch readelf supportAlan Modra1-1/+1
Commit 89c70cd358b8 apparently results in a bogus "value may be used uninitialized" warning with some combination of compiler and optimisation options. * readelf.c (target_specific_reloc_handling): Init value.
2023-06-05MIPS: fix -gnuabi64 testsuiteYunQiang Su9-11/+32
Test on: mips64-linux-gnuabi64 mips64el-linux-gnuabi64 mipsisa64-linux-gnuabi64 mipsisa64el-linux-gnuabi64 mipsisa64r2-linux-gnuabi64 mipsisa64r2el-linux-gnuabi64 mipsisa64r6-linux-gnuabi64 mipsisa64r6el-linux-gnuabi64
2023-06-05MIPS: fix r6 testsuitesYunQiang Su1-16/+59
Introduce run_dump_test_o32l run_dump_test_n32l run_dump_test_n64l Which use `-march=from-abi` for pre-R6 testcases, like micromips/mips16e etc. For cases doesn't use run_dump_test_*, we use -mips32r2 for micromips32 -mips1 for mips16-32 -march=from-abi for testcases to o32/n32/n64 both/all. Replace `addi` with `addiu` for some cases for both r6 and pre-R6. Introduce some new testcases for r6 with FPXX/FP64. Introduce new testcase: comdat-reloc-r6. Skip `default` in mips_arch_list_matching if triple is mipsisa*, due to: 1)it will cannot match mipsr6@*.d: since mips32rN/mips64rN will always be used, it won't be a problem. 2)some test think -march=mips64rN will alway true for mipsisa64rN, which is not true now. This patch fix testsuite for all r6-default gnu triples: mipsisa32r6-linux-gnu mipsisa32r6el-linux-gnu mips-img-linux-gnu mipsel-img-linux-gnu mipsisa64r6-linux-gnu mipsisa64r6el-linux-gnu
2023-06-03Re: loongarch readelf supportAlan Modra1-2/+3
Another segfault. * readelf.c (target_specific_reloc_handling): Sanity check loongarch reloc r_offset.
2023-06-02loongarch readelf supportAlan Modra1-29/+34
This fixes two buffer overflows found by fuzzers. * readelf.c (target_specific_reloc_handling): Sanity check loongarch reloc symbol index. Don't apply reloc after errors. Reduce translation work of "invalid symbol index" error message.