aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-10-08Revert "Don't return "(null)" from bfd_elf_sym_name"Alan Modra6-24/+24
This reverts commit 68bbe118337939aa0b52e007a7415c8a157579a1.
2024-10-08Revert "bfd_elf_sym_name_raw"Alan Modra4-21/+10
This reverts commit 265757dc6e4d011a1b33ef1b3bfcd7f100f12f64.
2024-10-08Revert "get_synthetic_symtab fixes for commit 68bbe1183379"Alan Modra6-158/+132
This reverts commit 0c13ac533e59589793ee6c8045cff98663f3ea85.
2024-10-08Revert "is_target_special_symbol fixes for commit 68bbe1183379"Alan Modra3-13/+3
This reverts commit 6e40f9bb31be2f3656df97a1fcba4d6a30081e24.
2024-10-08Revert "dlltool fixes for commit 68bbe1183379"Alan Modra1-5/+4
This reverts commit 06116013f80e474800cfb122924bc2a6f060606a.
2024-10-08Revert "elf.c and elflink.c fixes for commit 68bbe1183379"Alan Modra2-26/+16
This reverts commit 389fdfbe0d2aca0af1431ddf34704534dacc48c8.
2024-10-08Revert "objcopy fixes for commit 68bbe1183379"Alan Modra1-11/+5
This reverts commit ef166f451fbc2c7b251a251ab23cd35b36c5ee23.
2024-10-08RISC-V: Fix implicit dependency of Zabha and ZacasXiao Zeng2-4/+4
1 Zabha depends on Zaamo: <https://github.com/riscv/riscv-isa-manual/blob/main/src/zabha.adoc> 2 Zacas depends on Zaamo: <https://github.com/riscv/riscv-isa-manual/blob/main/src/zacas.adoc> bfd/ChangeLog: * elfxx-riscv.c: Zabha and Zacas implicitly depend on Zaamo. gas/ChangeLog: * testsuite/gas/riscv/imply.d: Updated. Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
2024-10-07gprofng: add hardware counters for Neoverse-N1 and Ampere-1 processorsVladimir Mezentsev4-0/+649
gprofng/ChangeLog 2024-10-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>. * common/hwc_cpus.h: New constant for Neoverse-N1 and Ampere-1. * common/hwctable.c: Add the hwc table for Neoverse-N1 and Ampere-1. * src/hwc_arm_ampere_1.h: New file with hwc table for Ampere-1. * src/hwc_arm_neoverse_n1.h: New file with hwc table for Neoverse-N1.
2024-10-08Automatic date update in version.inGDB Administrator1-1/+1
2024-10-07m68k: Support for jump visualization in disassemblyAndreas Schwab1-0/+27
opcodes/ * m68k-dis.c (m68k_opcode_to_insn_type): Define. (match_insn_m68k): Call it to set insn_type. (print_insn_arg) [case 'B']: Set branch target address. (print_insn_m68k): Set insn_info_valid.
2024-10-07[gdb/testsuite] Fix gdb.python/py-inferior.exp with -fsanitize=threadTom de Vries2-2/+4
With a gdb build with -fsanitize=thread, and test-case gdb.python/py-inferior.exp I run into: ... (gdb) python gdb.selected_inferior().read_memory (0, 0xffffffffffffffff)^M ERROR: ThreadSanitizer: requested allocation size 0xffffffffffffffff exceeds \ maximum supported size of 0x10000000000^M ... There's already a workaround for this using ASAN_OPTIONS, and apparently the same is needed for TSAN_OPTIONS. Add the allocator_may_return_null=1 workaround also in TSAN_OPTIONS. Likewise in gdb.dap/memory.exp. Tested on x86_64-linux.
2024-10-07Automatic date update in version.inGDB Administrator1-1/+1
2024-10-06gdb/m2: add builtin procedure function ADRGaius Mulley3-1/+41
This patch introduces ADR to the Modula-2 language interface. It return the address of the parameter supplied. The patch also contains a dejagnu test for ADR. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2024-10-06gdb/MAINTAINERS: update my email addressGaius Mulley1-1/+1
Sync the maintainers file with my new email address.
2024-10-06[gdb] Rerun spellcheck.shTom de Vries1-2/+2
Fix the following common misspellings: ... completetion -> completion inital -> initial ...
2024-10-06[gdb] Fix more common misspellingsTom de Vries10-10/+10
Fix the following common misspellings: ... addres -> address, adders behavour -> behavior, behaviour intented -> intended, indented ther -> there, their, the throught -> thought, through, throughout ... Tested on x86_64-linux.
2024-10-06[gdb] Fix common misspellingsTom de Vries112-176/+176
Fix the following common misspellings: ... accidently -> accidentally additonal -> additional addresing -> addressing adress -> address agaisnt -> against albiet -> albeit arbitary -> arbitrary artifical -> artificial auxillary -> auxiliary auxilliary -> auxiliary bcak -> back begining -> beginning cannonical -> canonical compatiblity -> compatibility completetion -> completion diferent -> different emited -> emitted emiting -> emitting emmitted -> emitted everytime -> every time excercise -> exercise existance -> existence fucntion -> function funtion -> function guarentee -> guarantee htis -> this immediatly -> immediately layed -> laid noone -> no one occurances -> occurrences occured -> occurred originaly -> originally preceeded -> preceded preceeds -> precedes propogate -> propagate publically -> publicly refering -> referring substract -> subtract substracting -> subtracting substraction -> subtraction taht -> that targetting -> targeting teh -> the thier -> their thru -> through transfered -> transferred transfering -> transferring upto -> up to vincinity -> vicinity whcih -> which whereever -> wherever wierd -> weird withing -> within writen -> written wtih -> with doesnt -> doesn't ... Tested on x86_64-linux.
2024-10-06[gdb/contrib] Add spellcheck.shTom de Vries1-0/+287
I came across a table containing common misspellings [1], and wrote a script to detect and correct these misspellings. The table also contains entries that have alternatives, like this: ... addres->address, adders ... and for those the script prints a TODO instead. The script downloads the webpage containing the table, extracts the table and caches it in .git/wikipedia-common-misspellings.txt to prevent downloading it over and over again. Example usage: ... $ gdb/contrib/spellcheck.sh gdb* ... ChangeLog files are silently skipped. Checked with shellcheck. Tested on x86_64-linux, by running it on the gdb* dirs on doing a build and test run. The results of running it are in the two following patches. Reviewed-By: Andrew Burgess <aburgess@redhat.com> Approved-By: Tom Tromey <tom@tromey.com> [1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2024-10-06Automatic date update in version.inGDB Administrator1-1/+1
2024-10-05objcopy fixes for commit 68bbe1183379Alan Modra1-5/+11
* objcopy.c (is_specified_symbol): Handle NULL name. (filter_symbols): Drop syms with a NULL name.
2024-10-05elf.c and elflink.c fixes for commit 68bbe1183379Alan Modra2-16/+26
Plus some tidies to swap_out_syms. * elf.c (swap_out_syms): Handle NULL sym name. Use correct type for return of _bfd_elf_strtab_add. Simplify. * elflink.c (bfd_elf_match_symbols_in_sections): Handle NULL sym name.
2024-10-05Automatic date update in version.inGDB Administrator1-1/+1
2024-10-04gdb segv in elfread.c:elf_rel_plt_readAlan Modra1-0/+2
After commit 68bbe1183379, ELF symbols read via bfd_canonicalize_symtab and similar functions which have bad st_name fields will have NULL in the name rather than "(null)". gdb.base/bfd-errors.exp deliberately creates a faulty shared library with st_name pointing outside of .dynsym for some symbols, and thus now results in NULL symbol names. This triggers a segv on string_buffer.assign(name). Fix that.
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-04is_target_special_symbol fixes for commit 68bbe1183379Alan Modra3-3/+13
* elf.c (_bfd_elf_is_local_label_name): Don't segv on NULL name. * elf32-v850.c (v850_elf_is_local_label_name): Likewise. * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Likewise.
2024-10-04get_synthetic_symtab fixes for commit 68bbe1183379Alan Modra6-132/+158
Given that relocation symbol name can now be NULL for ELF, adjust various get_synthetic_symtab routines so they don't segfault. * elf.c (_bfd_elf_get_synthetic_symtab): Cope with sym->name possibly being NULL. * elf32-arm.c (elf32_arm_get_synthetic_symtab): Likewise. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise. * elfxx-mips.c (_bfd_mips_elf_get_synthetic_symtab): Likewise. * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2024-10-04bfd_elf_sym_name_rawAlan Modra4-10/+21
Many uses of bfd_elf_sym_name report errors. They ought to not return a NULL, as was the case prior to commit 68bbe1183379. Introduce a new function for cases where we'd like to know there is a problem with a symbol st_name. * elf-bfd.h (bfd_elf_sym_name_raw): Declare. * elf.c (bfd_elf_sym_name_raw): New function. (bfd_elf_sym_name): Revert to behaviour prior to 68bbe1183379, but returning "<null>" rather than "(null)" for st_name errors. (group_signature): Use bfd_elf_sym_name_raw. * elfcode.h (elf_slurp_symbol_table): Likewise. * elf32-i386.c (elf_i386_scan_relocs): Whitespace.
2024-10-04gas: hide emulation struct format_ops instances when not neededJan Beulich7-114/+131
Most targets don't even support emulations, so this data (and certain functions) are entirely dead code for them.
2024-10-04x86: prune OBJ_MAYBE_... usesJan Beulich3-169/+113
With the removal of emulations, OBJ_MAYBE_... can no longer be defined. Tidy code wherever they're used, which also includes the dropping of most IS_ELF and uses and checks of OUTPUT_FLAVOR. Where touching such constructs anyway, also drop TE_PEP checks when used together with TE_PE ones (the former implies the latter).
2024-10-04x86: drop largely defunct gas emulationsJan Beulich10-185/+2
Both ELF and COFF have various sub-flavors, each of which would then require its own emulation: Right now when configuring a COFF/PE secondary target (with perhaps an ELF primary one), one gets plain COFF emulation rather than COFF/PE one. As such a multitude of emulations would be unwieldy (and likely fragile) drop gas emulations altogether instead.
2024-10-04include: de-duplicate i386.h and x86_64.hJan Beulich4-73/+62
Move common definitions to a new x86.h, thus allowing gas'es obj-coff.h to include just that, getting rid of a TE_PEP compile-time dependency.
2024-10-04gas: drop generate_asm_lineno emulation hookJan Beulich5-14/+0
It's not wired up, so can't be used.
2024-10-04gas: don't use COFF-specific SF_SET_LOCAL() directly from read.cJan Beulich8-3/+23
Make this a proper obj-format hook instead.
2024-10-04gas/dw2gencfi: correct .sframe section conditionalJan Beulich1-6/+5
While originally this was in preparation of a subsequent change making SUPPORT_FRAME_LINKONCE potentially dependent on a global variable, the construct appears unlikely to have been correct in the first place: The variable would have been passed reliably uninitialized when SUPPORT_FRAME_LINKONCE is build-time true. While there correct indentation of the parameters passed to get_cfi_seg().
2024-10-04gas: put emul decls in emul.hJan Beulich3-5/+5
The individual struct emulation instances shouldn't be declared in a .c file; it and the producers of the symbols want to both see the declarations, so declarations and definitions don't go out of sync. Move these declarations to emul.h. While there also adjust the conditional around this_format: That symbol is never #define-d anywhere, and it's needed only when USE_EMULATIONS is defined. (Really, when obj-multi isn't in use, it also is effectively only ever written to.)
2024-10-04gas: drop unused fields from struct emulationJan Beulich9-76/+0
Neither .match not .bfd_name appear to ever have been used in the last about 25 years. Purge them.
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-04Automatic date update in version.inGDB Administrator1-1/+1
2024-10-03gdb-dap: disable events when deleting breakpointsoltolm1-3/+3
when I disable a breakpoint in VS Code the breakpoint is removed instead. I compared the behavior to lldb-dap and disabled events when removing a breakpoint. Now it is possible to disable and enable breakpoints in VS Code.
2024-10-03bfd: fix unnecessary bfd.info regenAlexey Izbyshev2-2/+2
When building from an unmodified release tarball, a REGEN_TEXI invocation is supposed to create a symlink to the .texi file in the source directory and discard the newly generated .tmp file. However, after commit bd32be01c997 ("bfd: merge doc subdir up a level") it creates the symlink at the wrong level, and then a .texi with a fresh timestamp, which in turn forces bfd.info regeneration. This breaks builds in environments without makeinfo program. Fix this by creating the symlink at the level of the target stamp. Fixes: bd32be01c997 ("bfd: merge doc subdir up a level") Signed-off-by: Alexey Izbyshev <izbyshev@ispras.ru>
2024-10-03peicode.h formattingAlan Modra1-69/+76
Fix some overlong line, comment block style, whitespace issues.
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-03Don't return "(null)" from bfd_elf_sym_nameAlan Modra6-24/+24
A NULL return from bfd_elf_string_from_elf_section indicates an error. That shouldn't be masked by bfd_elf_sym_name but rather passed up to callers such as group_signature. If we want to print "(null)" then that should be done at a higher level. That's what this patch does, except that I chose to print "<null>" instead, like readelf. If we see "(null)" we're probably passing a NULL to printf. I haven't changed aoutx.h or pdp11.c print_symbol functions because they already handle NULL names by omitting the name. I also haven't changed mach-o.c, mmo.c, som.c, srec.c, tekhex.c, vms-alpha.c and wasm-module.c print_symbol function because it looks like they will never have NULL symbol names. bfd/ * elf.c (bfd_elf_sym_name): Don't turn a NULL name into a pointer to "(null)". (bfd_elf_print_symbol): Print "<null>" for NULL symbol names. * coffgen.c (coff_print_symbol): Likewise. * ecoff.c (_bfd_ecoff_print_symbol): Likewise. * pef.c (bfd_pef_print_symbol): Likewise. * syms.c (bfd_symbol_info): Return "<null>" in symbol_info.name if symbol name is NULL. ld/ * ldlang.c (ld_is_local_symbol): Don't check for "(null)" symbol name.
2024-10-03Automatic date update in version.inGDB Administrator1-1/+1
2024-10-02gprofng: fix a problem with hardware event countersRuud van der Pas1-325/+441
Fix a bug where an experiment with hardware event counter data causes the source and disassembly files not to be generated. No longer suppress zero valued metrics and change the name of the man page in a warning message. Adapt line lengths to not exceed 79. gprofng/ChangeLog 2024-09-24 Ruud van der Pas <ruud.vanderpas@oracle.com> PR 32193 PR 32199 PR 32201 * gp-display-html/gp-display-html.in: Implement all the above changes.
2024-10-02gdb: more file name stylingAndrew Burgess4-23/+41
While looking at the recent line number styling commit I noticed a few places where we could add more file name styling. So lets do that. Approved-By: Tom Tromey <tom@tromey.com>