Commit Graph

121141 Commits

Author SHA1 Message Date
Nick Clifton
870f1f1da5 Rename 'binutils' to 'binutils_with_gold'. Rename 'bin_no_gold' to 'binutils'. Add 'gold' 2025-02-04 11:50:02 +00:00
Tom de Vries
b8b7b2d038 [gdb/testsuite] Fix gdb.base/list-dot-nodebug.exp on openSUSE
On openSUSE Leap 15.6 with test-case gdb.base/list-dot-nodebug.exp I run into:
...
(gdb) list .^M
warning: 1      ../sysdeps/x86_64/crtn.S: No such file or directory^M
(gdb) FAIL: $exp: debug=none: print before start
...

The intent of the debug=none case is to generate an executable with no debug
info.  However, we have quite a few CUs with debug info:
...
$ readelf -wi outputs/gdb.base/list-dot-nodebug/list-dot-nodebug-none \
    | egrep -c " @ "
431
...

This is because this code:
...
  gdb_gnu_strip_debug $executable no-debuglink
...
uses $executable, and the variable is set here:
...
	set executable ${testfile}-none
...
which sets it to "list-dot-nodebug-none" and consequently
gdb_gnu_strip_debug cannot find it.

Fix this by using "[standard_output_file $executable]" instead.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>

PR testsuite/31721
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31721
2025-02-04 10:34:39 +01:00
Tom de Vries
9cc62187b4 [gdb/tui] Remove stale title when showing "No Source Available"
When running test-case gdb.tui/main.exp, the last command discards the
executable file and symbol table:
...
(gdb) file
No executable file now.
Discard symbol table from `main'? (y or n) [answered Y; input not from terminal]
No symbol file now.
(gdb)
...
and we end up with this source window:
...
+-tui-layout.c----------------------------------------------------------------+
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                           [ No Source Available ]                           |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
+-----------------------------------------------------------------------------+
...

The source window title shouldn't be showing tui-layout.c.  It's the source
file containing function main for the executable that was just discarded.

Fix this by clearing the title in tui_source_window::erase_source_content.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
2025-02-04 10:21:28 +01:00
H.J. Lu
bc61d5916a elf: Store __ehdr_start hash in elf_link_hash_table
Since

commit 97da0e2677
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 12 23:42:23 2022 +1030

    tweak __ehdr_start visibility and flags for check_relocs

creates __ehdr_start hash in lang_symbol_tweaks, store __ehdr_start hash
in elf_link_hash_table so that we just need to lookup it up only once.

bfd/

	* elf-bfd.h (elf_link_hash_table): Add hehdr_start.
	* elf.c (assign_file_positions_for_load_sections): Use
	hehdr_start.

ld/

	* ldelf.c (ldelf_before_allocation): Use hehdr_start for
	__ehdr_start hash.
	* ldlang.c (lang_symbol_tweaks): Store hehdr_start hash in
	hehdr_start.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-02-04 13:02:58 +08:00
H.J. Lu
13bc088de0 elflink.c: Replace bed->dynamic_sec_flags with flags
Since at the function entry, there is

  flags = bed->dynamic_sec_flags;

we can replace bed->dynamic_sec_flags with flags.

	* elflink.c (_bfd_elf_create_got_section): Replace
	bed->dynamic_sec_flags with flags.
	(_bfd_elf_link_create_dynamic_sections): Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-02-04 13:01:24 +08:00
Simon Marchi
0bd340d670 pre-commit autoupdate
Run `pre-commit autoupdate`.

This picks up a fresh Black version from 2025, and with it comes a small
but welcome formatting change.

There is a new version of isort as well, but no formatting change there.

Change-Id: Ie654a9c14c3a4096893011082668efb57c166fa4
2025-02-03 21:15:27 -05:00
GDB Administrator
bf5e5514bd Automatic date update in version.in 2025-02-04 00:00:14 +00:00
Tom de Vries
96420f87f8 [gdb/syscalls] Sync with strace v6.13
After syncing with strace v6.13 using:
...
$ update-linux-defaults.sh ~/upstream/strace.git
...
we have a few new entries in linux-defaults.xml.in:
...
  <syscall name="getxattrat" groups="descriptor,file"/>
  <syscall name="listxattrat" groups="descriptor,file"/>
  <syscall name="removexattrat" groups="descriptor,file"/>
  <syscall name="setxattrat" groups="descriptor,file"/>
...

Regenerate most *-linux.xml.in files using:
...
$ ./update-linux-from-src.sh ~/upstream/linux-stable.git
...
updating the copyright years, and do so manually for the remaining two.

Then regenerate *-linux.xml using make, propagating the groups changes and
copyright years.

Tested on x86_64-linux.

Approved-By: Andrew Burgess <aburgess@redhat.com>
2025-02-03 15:01:39 +01:00
Jan Beulich
0cb1f0def3 Z8k: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of an
open-coded check in adjacent code.
2025-02-03 12:29:40 +01:00
Jan Beulich
716680bc55 Z80: use is_whitespace()
Replace an open-coded check and convert ISSPACE() uses.
2025-02-03 12:29:29 +01:00
Jan Beulich
52ea980d00 Xtensa: use is_whitespace()
Convert an open-coded check.
2025-02-03 12:29:10 +01:00
Jan Beulich
0dfd4cfe82 xgate: use is_whitespace()
Convert an open-coded check.
2025-02-03 12:28:58 +01:00
Jan Beulich
a2a25404ae x86: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:28:46 +01:00
Jan Beulich
62489f8b52 wasm32: use is_whitespace()
Convert an open-coded check.
2025-02-03 12:28:22 +01:00
Jan Beulich
e6efb10bd1 Visium: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert an open-coded check.
2025-02-03 12:26:00 +01:00
Jan Beulich
0001a731ef VAX: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:25:50 +01:00
Jan Beulich
05b64c8657 v850: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of a kind-of-open-
coded check in adjacent code.
2025-02-03 12:25:41 +01:00
Jan Beulich
bf0e6c6cd5 C6x: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert an ISSPACE() use. At the same time use
is_end_of_stmt() instead of open-coded checks in adjacent code.
2025-02-03 12:25:28 +01:00
Jan Beulich
74ac8f7acc C54x: use is_whitespace()
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of open-coded checks in adjacent code. The function also needs using in
next_line_shows_parallel().
2025-02-03 12:25:10 +01:00
Jan Beulich
87f56f9149 C4x: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of
kind-of-open-coded checks in adjacent code.
2025-02-03 12:25:01 +01:00
Jan Beulich
429b58ab66 C30: use is_whitespace()
Convert an open-coded check.
2025-02-03 12:24:48 +01:00
Jan Beulich
5e194d8567 spu: use is_whitespace()
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of a kind-of-open-coded check in adjacent code.
2025-02-03 12:22:33 +01:00
Jan Beulich
52da676aa8 Sparc: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:22:23 +01:00
Jan Beulich
f483688fd0 SH: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as an
ISSPACE() use. At the same time use is_end_of_stmt() instead of
(kind-of-)open-coded checks in adjacent code.
2025-02-03 12:22:10 +01:00
Jan Beulich
48ca138aa5 Score: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:21:46 +01:00
Jan Beulich
ea091addb3 S/390: use is_whitespace()
Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of kind-of-open-coded checks in adjacent code.
2025-02-03 12:21:29 +01:00
Jan Beulich
e5792f3e77 s12z: use is_whitespace()
Convert open-coded checks. At the same time use is_end_of_stmt() instead
of open-coded checks in adjacent code. This then also fixes the prior
use of a wrong cast for an array index: Plain char may, after all, be
signed.
2025-02-03 12:21:08 +01:00
Jan Beulich
f983b224f8 rx: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of an open-coded
check in adjacent code.
2025-02-03 12:19:26 +01:00
Jan Beulich
2dd0370c43 rl78: use is_whitespace()
Replace open-coded checks and convert ISSPACE() uses. At the same time
use is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03 12:19:17 +01:00
Jan Beulich
49343ef904 RISC-V: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Switch places already checking for tabs to use the
macro, too.
2025-02-03 12:19:05 +01:00
Jan Beulich
0a4e0f2a78 pru: use is_whitespace()
Convert open-coded checks as well as an ISSPACE() use.
2025-02-03 12:18:53 +01:00
Jan Beulich
2f7cfc9eb2 PPC: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over. At the same time
use is_end_of_stmt() instead of an open-coded nul char check.
2025-02-03 12:18:34 +01:00
Jan Beulich
3b9fde6be7 PicoJava: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE(). At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03 12:18:20 +01:00
Jan Beulich
ca5580284f PDP11: use is_whitespace()
Convert open-coded checks.
2025-02-03 12:18:07 +01:00
Jan Beulich
7ea01e2546 NS32k: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:16:01 +01:00
Jan Beulich
1ac26e9f7a nds32: use is_whitespace()
Convert ISSPACE() uses.
2025-02-03 12:15:48 +01:00
Jan Beulich
a72e1e0528 msp430: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of open-coded checking in code needing touching
anyway.
2025-02-03 12:15:35 +01:00
Jan Beulich
54a042323d Moxie: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code. While
at it also drop a redundant whitespace skipping loop.
2025-02-03 12:15:21 +01:00
Jan Beulich
8216a29a06 mn10300: use is_whitespace()
Convert open-coded checks as well as ISSPACE() uses. At the same time
use is_end_of_stmt() instead of kind-of-open-coded checks in adjacent
code.
2025-02-03 12:15:07 +01:00
Jan Beulich
61c81ade8b mn10200: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of kind-of-open-
coded checks in adjacent code.
2025-02-03 12:14:56 +01:00
Jan Beulich
112cf77b18 MIPS: use is_whitespace()
... for consistency of recognition of what is deemed whitespace.

At the same time use is_end_of_stmt() instead of an open-coded nul char
check, and check for statement end in the first place in
parse_relocation().
2025-02-03 12:07:21 +01:00
Jan Beulich
49bf877703 MicroBlaze: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03 12:07:09 +01:00
Jan Beulich
d274b29e92 metag: use is_whitespace()
Replace the custom is_whitespace_char().
2025-02-03 12:06:57 +01:00
Jan Beulich
50f9bcde56 M*Core: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.
2025-02-03 12:06:43 +01:00
Jan Beulich
75e0098900 M68k: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.
2025-02-03 12:06:34 +01:00
Jan Beulich
dc76625f4c M68HC1x: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of an
open-coded check in adjacent code.
2025-02-03 12:06:21 +01:00
Jan Beulich
dd8b083aeb m32r: use is_whitespace()
Convert a lonely ISSPACE().
2025-02-03 12:06:06 +01:00
Jan Beulich
a6fe260642 m32c: use is_whitespace()
Convert open-coded checks as well as the sole ISBLANK() use throughout
the gas/ tree.
2025-02-03 12:05:55 +01:00
Jan Beulich
239331e4a9 LoongArch: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).
2025-02-03 12:05:33 +01:00
Jan Beulich
4d3ebda16d kvx: use is_whitespace()
Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.
2025-02-03 12:03:07 +01:00