aboutsummaryrefslogtreecommitdiff
path: root/binutils/ChangeLog
AgeCommit message (Collapse)AuthorFilesLines
2024-01-15Update version number and regenerate configure filesNick Clifton1-0/+5
2024-01-15Add markers for 2.42 branchNick Clifton1-0/+4
2024-01-04Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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-04Fix two buglets in .debug_names dumpingTom Tromey1-0/+5
While working on gdb's .debug_names writer, I found a couple of small bugs in binutils .debug_names dumping. First, the DWARF spec (section 6.1.1.4.6 Name Table) says: These two arrays are indexed starting at 1, [...] I think it is clearer for binutils to follow this, particularly because DW_IDX_parent refers to this number. Second, I think the handling of an empty hash table is slightly wrong. Currently the dumping code assumes there is always an array of hashes. However, section 6.1.1.4.5 Hash Lookup Table says: The optional hash lookup table immediately follows the list of type signatures. and then: The hash lookup table is actually two separate arrays: an array of buckets, followed immediately by an array of hashes. My reading of this is that the hash table as a whole is optional, and so the hashes will not exist in this case. (This also makes sense because the hashes are not useful without the buckets anyway.) This patch fixes both of these problems. FWIW I have some gdb patches in progress that change gdb both to omit the hash table and to use DW_IDX_parent. 2023-12-04 Tom Tromey <tom@tromey.com> * dwarf.c (display_debug_names): Handle empty .debug_names hash table. Name entries start at 1.
2023-11-15Finalized intl-update patchesArsen Arsenovi?1-0/+7
* 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-14Improve objdump's handling of compressed sections.Nick Clifton1-0/+24
PR 31062 * objdump.c (decompressed_dumps): New local variable. (usage): Mention the -z/--decompress option. (long_options): Add --decompress. (dump_section_header): Add "COMPRESSED" to the Flags field of any compressed section. (dump_section): Warn users when dumping a compressed section. (display_any_bfd): Decompress the section if decompressed_dumps is true. (main): Handle the -z/--decompress option. * NEWS: Mention the new feature. * doc/binutils.texi: Document the new feature. * testsuite/binutils-all/objdump.s: Update expected output. * testsuite/binutils-all/objdump.exp: Add test of -Z -s. * testsuite/binutils-all/objdump.Zs: New file. * readelf.c (maybe_expand_or_relocate_section): New function. Contains common code found in dump functions. Adds a note message if a compressed section is not being decompressed. (dump_section_as_strings): Use new function. (dump_section_as_bytes): Likewise.
2023-11-10bfd, binutils: add gfx11 amdgpu architecturesSimon Marchi1-0/+5
Teach bfd and readelf about some recent gfx11 architectures. This code is taken from the rocgdb 5.7.x branch [1]. [1] https://github.com/rocm-Developer-Tools/rocgdb/tree/rocm-5.7.x bfd/ChangeLog: * archures.c (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * bfd-in2.h (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * cpu-amdgcn.c (arch_info_struct): Add entries for bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102. binutils/ChangeLog: * readelf.c (decode_AMDGPU_machine_flags): Handle gfx1100, gfx1101, gfx1102. include/ChangeLog: * elf/amdgpu.h (EF_AMDGPU_MACH_AMDGCN_GFX1100, EF_AMDGPU_MACH_AMDGCN_GFX1101, EF_AMDGPU_MACH_AMDGCN_GFX1102): New. Change-Id: I95a8a62942e359781a1c9fa2079950fbcf2a78b8 Co-Authored-By: Laurent Morichetti <laurent.morichetti@amd.com> Cc: Lancelot Six <lancelot.six@amd.com>
2023-11-10readelf..debug-dump=loc displays bogus base addressesVsevolod Alekseyev1-0/+6
PR 30880 * dwarf.c (read_and_display_attr_value): Fix loclist handling. (display_loclists_list): Likewise.
2023-10-24[readelf] Handle unknown name of main in .gdb_index sectionTom de Vries1-0/+4
When compiling hello world and adding a v9 .gdb-index section: ... $ gcc -g hello.c $ gdb-add-index a.out ... readelf shows it as: ... Shortcut table: Language of main: unknown: 0 Name of main: ^A ... The documentation of gdb says about the "Name of main" that: ... This value must be ignored if the value for the language of main is zero. ... Implement this approach in display_gdb_index, such that we have instead: ... Shortcut table: Language of main: unknown: 0 Name of main: <unknown> ... Tested on x86_64-linux. Approved-By: Jan Beulich <jbeulich@suse.com>
2023-10-10[readelf] Handle .gdb_index section version 9Tom de Vries1-0/+6
Add the abilitity to print a v9 .gdb_index section. The v9 section contains an extra table, which is printed as follows: ... Shortcut table: Language of main: Fortran 95 Name of main: contains_keyword ... [ For the example, I used the exec of gdb test-case gdb.fortran/nested-funcs-2-exp when running the test-case with target board cc-with-gdb-index. ] Tested on x86_64-linux. Approved-By: Nick Clifton <nickc@redhat.com>
2023-10-05Fix: addr2line testsuite fails when targeting PowerPC 64 big-endian with ↵A. Wilcox1-0/+6
ELFv2 ABI PR 30916 * testsuite/binutils-all/addr2line.exp: Do not use PowerPC specific options when working with a MUSL target.
2023-10-03Fix: readelf..info misreports DW_FORM_loclistx, DW_FORM_rnglistxVsevolod Alekseyev1-0/+8
PR 29267 * dwarf.c (fetch_indexed_value): Delete. (fetch_indexed_offset): Correct base address calculation. (read_and_display_attr_value): Replace uses of fetch_indexed_value with fetch_indexed_offset.
2023-09-28Add support to readelf for the PT_OPENBSD_NOBTCFI segment type.Frederic Cambus1-0/+5
2023-09-26Fix a snafu in the new tests for reproducible archives that assumed a umask ↵Nick Clifton1-0/+5
of 22.
2023-09-25Fix readelf's display of dwarf v5 range listsVsevolod Alekseyev1-0/+14
PR 30792 * dwarf.h (struct debug_info): Remove range_versions field. * dwarf.c (fetch_indexed_offset): New function. (read_and_display_attr_value): Use it for DW_FORM_rnglistx. Remove code to initialise range_versions. (skip_attribute): New function. (read_bases): Read and reccord all range and address bases in a CU. (process_debug_info): Call read_bases. (display_debug_rnglists): Rename to display_debug_rnglists_unit_header and only display the range list header information. (display_debug_ranges): Adjust.
2023-09-05readelf: Add option to display the names of sections referenced by symbols.Nick Clifton1-0/+25
PR 30684 * readelf.c (extra_sym_info): New variable. (section_name_valid): Also check for filedata being NULL. (section_name_print): Delete. (section_index_real): New function. Returns true if the given section index references a real section. (print_symbol): Rename to print_sumbol_name. (printable_section_name): Use a rotating array of static buffers for the return string. (printable_section_name_from_index): Merge code from dump_relocations and get_symbol_index_type into here. (long_option_values): Add OPTION_NO_EXTRA_SYM_INFO. (options): Add "extra-sym-info" and "no-extra-sym-info". (usage): Mention new options. (parse_args): Parse new options. (get_symbol_index_type): Delete. (print_dynamic_symbol_size): Rename to print_symbol_size. (print_dynamic_symbol): Rename to print_symbol. (print_symbol_table_heading): New function. (process_symbol_table): Use new function. * doc/binutils.texi: Document the new option. * NEWS: Mention the new feature.
2023-08-23Correct PR number in previous deltaNick Clifton1-1/+1
2023-08-23readelf/objdump: Handle DWARF info with mixed types of range section.Nick Clifton1-0/+10
PR 30791 * dwarf.h (debug_info): Add range_versions field. * dwarf.c (read_and_display_attr_value): When recording a range arribute also ecord the dwarf version number. (is_range_list_for_this_section): New function. (display_debug_ranges): Only show debug ranges whose version is suitable for the secction being displayed.
2023-08-02Revert "2.41 Release sources"Sam James1-3/+22
This reverts commit 675b9d612cc59446e84e2c6d89b45500cb603a8d. See https://sourceware.org/pipermail/binutils/2023-August/128761.html.
2023-08-022.41 Release sourcesbinutils-2_41-releaseNick Clifton1-22/+3
2023-07-30bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flagsJose E. Marchesi1-0/+5
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-24objcopy embeds the current time and ignores SOURCE_DATE_EPOCH making the ↵Johannes Schauer Marin Rodrigues1-0/+5
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-09PR30592 objcopy: allow --set-section-flags to add or remove SHF_X86_64_LARGEFangrui Song1-0/+14
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-03Change version number to 2.41.50 and regenerate filesNick Clifton1-0/+6
2023-07-03Add markers for the 2.41 branchNick Clifton1-0/+4
2023-06-30strings: Improve code to detect excessively large minimum string lengths.Nick Clifton1-0/+7
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 Clifton1-0/+6
excessively lerge minimum string length. PR 30595 * strings.c (main): Check for an excessively large minimum string length.
2023-06-21Prune linker warnings about an executable stack being created with the -z ↵Nick Clifton1-0/+5
execstack option. * testsuite/lib/binutils-common.exp (prune_warnings_extra): Prune warnings about -z execstack creating an executable stack.
2023-05-30Improve header information displayed with objdump -P for PE binaries.Nick Clifton1-0/+11
* od-pe.c (targ_info): New array. (get_target_specific_info): New function. (decode_machine_number): Retire. Use get_target_specific_info instead. (is_pe_object_magic): Likewise. (dump_pe_file_header): Display more information. Rework layout to be similar to that from 'objdump -p'. Add code to handle larger than normnal AOUT headers.
2023-05-30Add support for an ARMMAGIC value of 0xa00 to the PE dumper.Nick Clifton1-0/+5
2023-05-26Enhance objdump's --private option so that it can display the contents of PE ↵Nick Clifton1-0/+17
format files. * od-pe.c: New file: Dumps fields in PE format headers. * configure.ac (od_vectors): Add objdump_private_desc_pe for PE format targets. (od_files): Add od-pe for PE format targets. * configure: Regenerate. * Makefile.am (CFILES): Add od-pe.c (EXTRA_objdump_SOURCE): Likewise. * Makefile.in: Generate. * NEWS: Mention the new feature. * doc/binutils.texi: Document the new support. * objdump.c (wide_output): Change from local to global. * objdump.h (wide_output): Prototype. (objdump_private_desc_pe): Prototype. * testsuite/binutils-all/objdump.exp: Add a test of the new feature.
2023-05-09Correct a spelling mistake in the binutils README file.Enze Li1-0/+4
2023-05-02Remove Dimity Diky as MSP430 maintainer.Nick Clifton1-0/+4
2023-04-20Add a SECURITY.txt file describing the GNU Binutils' project's stance on ↵Nick Clifton1-0/+4
security related bugs.
2023-04-19Fix: readelf: loc_offset XX too bigNick Clifton1-1/+8
PR 30355 * dwarf.c (read_and_display_attr_value): Correctly handle DW_loclistx attributes that index a version 5 .debug_loclists section.
2023-04-17Make the .rsrc section read only.Nick Clifton1-0/+6
PR 30142 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable. * rescoff.c (write_coff_file): Add the SEC_READONLY flag to the .rsrc section.
2023-04-11Replace an assertion in the dwarf code with a warning message.Nick Clifton1-0/+4
PR 30327 * dwarf.c (read_and_display_attr_value): Warn if the number of views is greater than the number of locations.
2023-04-11Fix an attempt to allocate an excessive amount of memory when parsing a ↵Nick Clifton1-0/+4
corrupt DWARF file. PR 30313 * dwarf.c (display_debug_lines_decoded): Check for an overlarge number of files or directories.
2023-04-11Fix a potential illegal memory access when displaying corrupt DWARF information.Nick Clifton1-0/+4
PR 30312 * dwarf.c (prealloc_cu_tu_list): Always allocate at least one entry.
2023-04-11Fix an attempt to allocate an overlarge amount of memory when decoding a ↵Nick Clifton1-0/+6
corrupt ELF format file. PR 30311 * readelf.c (uncompress_section_contents): Check for a suspiciously large uncompressed size.
2023-03-30Fix an illegal memory access triggered by parsing corrupt DWARF info.Nick Clifton1-0/+6
PR 30284 * dwarf.c (read_and_display_attr_value): Detect and ignore negative base values.
2023-03-23Add support to readelf for the PT_OPENBSD_MUTABLE segment type.Frederic Cambus1-0/+5
binutils * readelf.c (get_segment_type): Handle PT_OPENBSD_MUTABLE segment type. include * elf/common.h (PT_OPENBSD_MUTABLE): Define.
2023-03-14Prevent an over large memory allocation in readelf when parsing a corrupt ↵Nick Clifton1-0/+6
DWARF file. PR 30227 * dwarf.c (process_cu_tu_index): Prevent excessive memory allocation when nused is large and ncols is zero.
2023-02-09Add full display feature to dwarf-mode.elTom Tromey1-0/+8
I've found that I often use dwarf-mode with relatively small test files. In this situation, it's handy to be able to expand all the DWARF, rather than moving to each "..." separately and using C-u C-m. This patch implements this feature. It also makes a couple of other minor changes: * I removed a stale FIXME from dwarf-mode. In practice I find I often use "g" to restore the buffer to a pristine state; checking the file mtime would work against this. * I tightened the regexp in dwarf-insert-substructure. This prevents the C-m binding from trying to re-read a DIE which has already been expanded. * Finally, I've bumped the dwarf-mode version number so that this version can easily be installed using package.el. 2023-02-09 Tom Tromey <tromey@adacore.com> * dwarf-mode.el: Bump version to 1.8. (dwarf-insert-substructure): Tighten regexp. (dwarf-refresh-all): New defun. (dwarf-mode-map): Bind "A" to dwarf-refresh-all. (dwarf-mode): Remove old FIXME.
2023-02-07Fix documentation of the 'n' symbol type displayed by nm.Nick Clifton1-0/+6
PR 30080 * doc/binutils.texi (nm): Update description of the 'n' symbol type.
2023-01-31Updated Swedish translation for the binutils sub-directoryNick Clifton1-0/+4
2023-01-23Updated Swedish translation for the binutils sub-directoryNick Clifton1-0/+4
2023-01-18Speed up objcopy's note merging.Nick Clifton1-0/+6
PR 29993 * objcopy.c (merge_gnu_build_notes): Remember the last non-deleted note in order to speed up the scan for matching notes.
2023-01-16Updated translations for the gas and binutils sub-directoriesNick Clifton1-0/+4
2023-01-09Updated transaltions for the gprof and binutils sub-directoriesNick Clifton1-0/+5