Mike Frysinger [Mon, 2 Jan 2023 19:38:01 +0000 (14:38 -0500)]
sim: common: move libcommon.a dep to ppc code
Rather than force this to be built ahead of time for all targets,
move the dep to the ppc code since it's the only user of it now.
Mike Frysinger [Mon, 2 Jan 2023 19:34:52 +0000 (14:34 -0500)]
sim: build: drop most recursive build deps
Now that we build these objects in the top dir & generate modules.c
there, we don't need to generate them all first -- we can let the
normal dependency graph take care of building things in parallel.
Mike Frysinger [Mon, 2 Jan 2023 19:15:02 +0000 (14:15 -0500)]
sim: common: move libcommon.a objects to sources
This simplifies the build logic and avoids an Automake bug where the
common_libcommon_a_OBJECTS variable isn't set in the arch libsim.a
DEPENDENCIES for targets that, alphabetically, come before "common".
We aren't affected by that bug with the current code, but as we move
things out of SIM_ALL_RECURSIVE_DEPS and rely on finer dependencies,
we will trip over it.
Mike Frysinger [Mon, 2 Jan 2023 05:08:56 +0000 (00:08 -0500)]
sim: igen: simplify build dep
Now that all ports (other than ppc) build in the top-level, we don't
need to mark the igen tool as a recursive dep. Each port depends on
the tool if it actually uses it, and ppc doesn't use it at all.
Mike Frysinger [Mon, 2 Jan 2023 05:06:34 +0000 (00:06 -0500)]
sim: common: simplify hw-config.h deps
Now that all ports (other than ppc) build in the top-level, we don't
need to expand all the hw-config.h targets as a recursive dep. Each
port depends on their respective header now, and the ppc port doesn't
use it at all.
Mike Frysinger [Mon, 2 Jan 2023 04:02:28 +0000 (23:02 -0500)]
sim: build: drop AM_MAKEFLAGS settings
We don't have any recursive builds anymore, so we can drop this logic.
GDB Administrator [Sun, 15 Jan 2023 00:00:45 +0000 (00:00 +0000)]
Automatic date update in version.in
Tom Tromey [Sat, 14 Jan 2023 19:42:30 +0000 (12:42 -0700)]
Pass internal gdb flags to --configuration invocations
The test suite uses the --configuration flag to feature-test gdb.
However, when I added this, I neglected to pass the internal gdbflags
to this, causing an error, which then caused failures in the test
suite (which would not be seen if you'd ever run "make install").
This patch fixes the bug. Tested by removing my install tree first,
to verify that I could reproduce the failure.
Nick Clifton [Sat, 14 Jan 2023 15:37:20 +0000 (15:37 +0000)]
Update how-to-make-a-release file now that the 2.40 release is out
GDB Administrator [Sat, 14 Jan 2023 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in
Mike Frysinger [Mon, 2 Jan 2023 03:58:35 +0000 (22:58 -0500)]
sim: build: delete Make-common.in logic
Now that all (other than ppc) build in the top-level, this logic is
unused, so punt it all.
Tom Tromey [Sun, 8 Jan 2023 19:42:29 +0000 (12:42 -0700)]
Rename to allow_tui_tests
This changes skip_tui_tests to invert the sense, and renames it to
allow_tui_tests. It also rewrites this function to use the output of
"gdb --configuration", and it adds a note about the state of the TUI
to that output.
Tom Tromey [Sun, 8 Jan 2023 19:01:33 +0000 (12:01 -0700)]
Rename to allow_guile_tests
This changes skip_guile_tests to invert the sense, and renames it to
allow_guile_tests. It also rewrites this proc to check the output of
"gdb --configuration", as was done for Python. Then it changes the
code to use "require" where possible.
Tom Tromey [Sun, 8 Jan 2023 18:54:47 +0000 (11:54 -0700)]
Rename to allow_hw_breakpoint_tests
This changes skip_hw_breakpoint_tests to invert the sense, and renames
it to allow_hw_breakpoint_tests. This also converts some tests to use
"require" -- I missed this particular check in the first series.
Tom Tromey [Sun, 8 Jan 2023 18:48:57 +0000 (11:48 -0700)]
Rename to allow_tsx_tests
This changes skip_tsx_tests to invert the sense, and renames it to
allow_tsx_tests.
Tom Tromey [Sun, 8 Jan 2023 18:47:51 +0000 (11:47 -0700)]
Rename to allow_shlib_tests
This changes skip_shlib_tests to invert the sense, and renames it to
allow_shlib_tests.
Tom Tromey [Sun, 8 Jan 2023 18:46:36 +0000 (11:46 -0700)]
Rename to allow_rust_tests
This changes skip_rust_tests to invert the sense, and renames it to
allow_rust_tests.
Tom Tromey [Sun, 8 Jan 2023 18:46:05 +0000 (11:46 -0700)]
Rename to allow_python_tests
This changes skip_python_tests to invert the sense, and renames it to
allow_python_tests.
Tom Tromey [Sun, 8 Jan 2023 18:43:09 +0000 (11:43 -0700)]
Rename to allow_perf_tests
This changes skip_perf_tests to invert the sense, and renames it to
allow_perf_tests.
Tom Tromey [Sun, 8 Jan 2023 18:42:26 +0000 (11:42 -0700)]
Rename to allow_opencl_tests
This changes skip_opencl_tests to invert the sense, and renames it to
allow_opencl_tests.
Tom Tromey [Sun, 8 Jan 2023 18:41:19 +0000 (11:41 -0700)]
Rename to allow_ifunc_tests
This changes skip_ifunc_tests to invert the sense, and renames it to
allow_ifunc_tests.
Tom Tromey [Sun, 8 Jan 2023 18:40:32 +0000 (11:40 -0700)]
Rename to allow_hw_watchpoint_tests
This changes skip_hw_watchpoint_tests to invert the sense, and renames
it to allow_hw_watchpoint_tests.
Tom Tromey [Sun, 8 Jan 2023 17:57:35 +0000 (10:57 -0700)]
Rename to allow_hw_watchpoint_multi_tests
This changes skip_hw_watchpoint_multi_tests to invert the sense, and
renames it to allow_hw_watchpoint_multi_tests.
Tom Tromey [Sun, 8 Jan 2023 17:55:43 +0000 (10:55 -0700)]
Rename to allow_hw_watchpoint_access_tests
This changes skip_hw_watchpoint_access_tests to invert the sense, and
renames it to allow_hw_watchpoint_access_tests.
Tom Tromey [Sun, 8 Jan 2023 17:54:46 +0000 (10:54 -0700)]
Rename to allow_go_tests
This changes skip_go_tests to invert the sense, and renames it to
allow_go_tests.
Tom Tromey [Sun, 8 Jan 2023 17:53:55 +0000 (10:53 -0700)]
Rename to allow_gdbserver_tests
This changes skip_gdbserver_tests to invert the sense, and renames it
to allow_gdbserver_tests.
Tom Tromey [Sun, 8 Jan 2023 17:52:25 +0000 (10:52 -0700)]
Rename to allow_fortran_tests
This changes skip_fortran_tests to invert the sense, and renames it to
allow_fortran_tests.
Tom Tromey [Sun, 8 Jan 2023 17:51:43 +0000 (10:51 -0700)]
Rename to allow_d_tests
This changes skip_d_tests to invert the sense, and renames it to
allow_d_tests.
Tom Tromey [Sun, 8 Jan 2023 17:50:41 +0000 (10:50 -0700)]
Rename to allow_dlmopen_tests
This changes skip_dlmopen_tests to invert the sense, and renames it to
allow_dlmopen_tests.
Tom Tromey [Sun, 8 Jan 2023 17:49:20 +0000 (10:49 -0700)]
Rename to allow_debuginfod_tests
This changes skip_debuginfod_tests to invert the sense, and renames it
to allow_debuginfod_tests.
Tom Tromey [Sun, 8 Jan 2023 17:48:33 +0000 (10:48 -0700)]
Rename to allow_ctf_tests
This changes skip_ctf_tests to invert the sense, and renames it to
allow_ctf_tests.
Tom Tromey [Sun, 8 Jan 2023 17:47:09 +0000 (10:47 -0700)]
Rename to allow_cplus_tests and allow_stl_tests
This changes skip_cplus_tests to invert the sense, and renames it to
allow_cplus_tests. This one also converts skip_stl_tests to
allow_stl_tests, as that was convenient to do at the same time.
Tom Tromey [Sun, 8 Jan 2023 17:44:15 +0000 (10:44 -0700)]
Rename to allow_btrace_tests
This changes skip_btrace_tests to invert the sense, and renames it to
allow_btrace_tests.
Tom Tromey [Sun, 8 Jan 2023 17:41:37 +0000 (10:41 -0700)]
Rename to allow_btrace_pt_tests
This changes skip_btrace_pt_tests to invert the sense, and renames it
to allow_btrace_pt_tests.
Tom Tromey [Sun, 8 Jan 2023 17:39:51 +0000 (10:39 -0700)]
Rename to allow_avx512fp16_tests
This changes skip_avx512fp16_tests to invert the sense, and renames it
to allow_avx512fp16_tests.
Tom Tromey [Sun, 8 Jan 2023 17:37:20 +0000 (10:37 -0700)]
Rename to allow_avx512bf16_tests
This changes skip_avx512bf16_tests to invert the sense, and renames it
to allow_avx512bf16_tests.
Tom Tromey [Sat, 7 Jan 2023 20:36:00 +0000 (13:36 -0700)]
Rename to allow_ada_tests
This changes skip_ada_tests to invert the sense, and renames it to
allow_ada_tests.
Tom Tromey [Sat, 7 Jan 2023 20:32:55 +0000 (13:32 -0700)]
Rename to allow_aarch64_sve_tests
This changes skip_aarch64_sve_tests to invert the sense, and renames
it to allow_aarch64_sve_tests.
Tom Tromey [Sat, 7 Jan 2023 18:48:45 +0000 (11:48 -0700)]
Rename to allow_xml_test
This changes gdb_skip_xml_test to invert the sense, and renames it to
allow_xml_test.
Tom Tromey [Sat, 7 Jan 2023 19:18:59 +0000 (12:18 -0700)]
Use "require" for Python tests
This changes various tests to use "require" for the Python feature.
Tom Tromey [Wed, 11 Jan 2023 23:52:38 +0000 (16:52 -0700)]
Fix latent bug in default_prompt_gdb_start
default_prompt_gdb_start mimics default_gdb_start, but does not set
the use_gdb_stub global. This caused one Python test to work only
because it used the ordinary gdb_start before later using
default_prompt_gdb_start.
This patch updates default_prompt_gdb_start to set this global as
well.
Tom Tromey [Sat, 7 Jan 2023 18:51:33 +0000 (11:51 -0700)]
Remove mi_skip_python_tests
mi_skip_python_tests was necessary because skip_python_tests used the
running gdb, and so needed to know what prompt to expect. Now that
skip_python_tests has been rewritten, mi_skip_python_tests is no
longer needed.
Tom Tromey [Sat, 7 Jan 2023 03:36:38 +0000 (20:36 -0700)]
Rewrite skip_python_tests
This rewrites skip_python_tests to examine the output of
"gdb --configuration". This is a bit nicer because it
does not require an already-running gdb.
Tom Tromey [Fri, 16 Dec 2022 00:58:40 +0000 (17:58 -0700)]
Use require gnat_runtime_has_debug_info
This changes some tests to use "require gnat_runtime_has_debug_info".
Tom Tromey [Fri, 16 Dec 2022 00:51:41 +0000 (17:51 -0700)]
Use require !skip_debuginfod_tests
This changes some tests to use "require !skip_debuginfod_tests".
Tom Tromey [Thu, 15 Dec 2022 23:51:08 +0000 (16:51 -0700)]
Use require using_fission
This changes some tests to use "require using_fission".
Tom Tromey [Thu, 15 Dec 2022 23:47:05 +0000 (16:47 -0700)]
Use require target_can_use_run_cmd
This changes some tests to use "require target_can_use_run_cmd".
Tom Tromey [Thu, 15 Dec 2022 23:45:27 +0000 (16:45 -0700)]
Use require !skip_opencl_tests
This changes some tests to use "require !skip_opencl_tests".
Tom Tromey [Thu, 15 Dec 2022 23:41:32 +0000 (16:41 -0700)]
Use require !skip_perf_tests
This changes some tests to use "require !skip_perf_tests".
Tom Tromey [Thu, 15 Dec 2022 23:15:13 +0000 (16:15 -0700)]
Use require gdb_trace_common_supports_arch
This changes some tests to use "require gdb_trace_common_supports_arch".
Tom Tromey [Thu, 15 Dec 2022 23:09:03 +0000 (16:09 -0700)]
Use require gdb_skip_xml_test
This changes some tests to use "require gdb_skip_xml_test".
Tom Tromey [Wed, 14 Dec 2022 23:42:16 +0000 (16:42 -0700)]
Use require !gdb_debug_enabled
This changes some tests to use "require !gdb_debug_enabled".
Tom Tromey [Wed, 14 Dec 2022 17:13:01 +0000 (10:13 -0700)]
Use require is_c_compiler_gcc
This changes some tests to use "require is_c_compiler_gcc".
Tom Tromey [Wed, 14 Dec 2022 17:11:33 +0000 (10:11 -0700)]
Use require !skip_shlib_tests
This changes some tests to use "require !skip_shlib_tests". This patch
cleans up a few spots that were missed in the earlier patch.
Tom Tromey [Wed, 14 Dec 2022 17:09:38 +0000 (10:09 -0700)]
Use require !skip_gdbserver_tests
This changes some tests to use "require !skip_gdbserver_tests".
Tom Tromey [Wed, 14 Dec 2022 17:08:00 +0000 (10:08 -0700)]
Use require isnative
This changes some tests to use "require isnative".
Tom Tromey [Wed, 14 Dec 2022 17:05:03 +0000 (10:05 -0700)]
Use require can_spawn_for_attach
This changes some tests to use "require can_spawn_for_attach".
Tom Tromey [Wed, 14 Dec 2022 17:02:49 +0000 (10:02 -0700)]
Use require !use_gdb_stub
This changes some tests to use "require !use_gdb_stub".
Tom Tromey [Wed, 14 Dec 2022 16:54:00 +0000 (09:54 -0700)]
Use require support_go_compile
This changes some tests to use "require support_go_compile".
Tom Tromey [Wed, 14 Dec 2022 16:52:45 +0000 (09:52 -0700)]
Use require supports_get_siginfo_type
This changes some tests to use "require supports_get_siginfo_type".
Tom Tromey [Wed, 14 Dec 2022 16:51:57 +0000 (09:51 -0700)]
Use require can_single_step_to_signal_handler
This changes some tests to use "require can_single_step_to_signal_handler".
Tom Tromey [Wed, 14 Dec 2022 16:50:51 +0000 (09:50 -0700)]
Use require is_elf_target
This changes some tests to use "require is_elf_target".
Tom Tromey [Wed, 14 Dec 2022 16:49:10 +0000 (09:49 -0700)]
Use require is_amd64_regs_target
This changes some tests to use "require is_amd64_regs_target".
Tom Tromey [Wed, 14 Dec 2022 16:48:09 +0000 (09:48 -0700)]
Use require is_aarch32_target
This changes some tests to use "require is_aarch32_target".
Tom Tromey [Wed, 14 Dec 2022 16:47:30 +0000 (09:47 -0700)]
Use require is_aarch64_target
This changes some tests to use "require is_aarch64_target".
Tom Tromey [Wed, 14 Dec 2022 16:45:31 +0000 (09:45 -0700)]
Use require support_displaced_stepping
This changes some tests to use "require support_displaced_stepping".
Tom Tromey [Wed, 14 Dec 2022 16:43:02 +0000 (09:43 -0700)]
Use require !skip_avx_*
This changes some tests to use "require" with !skip_avx_*.
Tom Tromey [Wed, 14 Dec 2022 16:42:37 +0000 (09:42 -0700)]
Use require !skip_btrace_tests
This changes some tests to use "require !skip_btrace_tests".
Tom Tromey [Wed, 14 Dec 2022 16:41:23 +0000 (09:41 -0700)]
Use require !skip_btrace_pt_tests
This changes some tests to use "require !skip_btrace_pt_tests" and
"require !skip_tsx_tests".
Tom Tromey [Wed, 14 Dec 2022 16:40:44 +0000 (09:40 -0700)]
Use require !skip_aarch64_sve_tests
This changes some tests to use "require !skip_aarch64_sve_tests".
Tom Tromey [Wed, 14 Dec 2022 16:39:54 +0000 (09:39 -0700)]
Use require !skip_ifunc_tests
This changes some tests to use "require !skip_ifunc_tests".
Tom Tromey [Wed, 14 Dec 2022 16:38:35 +0000 (09:38 -0700)]
Use require !skip_hw_watchpoint_tests
This changes some tests to use "require !skip_hw_watchpoint_tests".
Tom Tromey [Wed, 14 Dec 2022 16:33:00 +0000 (09:33 -0700)]
Use require !skip_ctf_tests
This changes some tests to use "require !skip_ctf_tests".
Tom Tromey [Tue, 13 Dec 2022 23:12:18 +0000 (16:12 -0700)]
Use require !skip_d_tests
This changes some tests to use "require !skip_d_tests".
Tom Tromey [Tue, 13 Dec 2022 23:11:58 +0000 (16:11 -0700)]
Use require !skip_go_tests
This changes some tests to use "require !skip_go_tests".
Tom Tromey [Tue, 13 Dec 2022 23:11:40 +0000 (16:11 -0700)]
Use require !skip_ada_tests
This changes some tests to use "require !skip_ada_tests".
Tom Tromey [Tue, 13 Dec 2022 23:10:09 +0000 (16:10 -0700)]
Use require !skip_fortran_tests
This changes some tests to use "require !skip_fortran_tests".
Tom Tromey [Tue, 13 Dec 2022 23:08:13 +0000 (16:08 -0700)]
Use require !skip_rust_tests
This changes some tests to use "require !skip_rust_tests".
Tom Tromey [Tue, 13 Dec 2022 23:02:16 +0000 (16:02 -0700)]
Use require !skip_stl_tests
This changes some tests to use "require !skip_stl_tests".
Tom Tromey [Tue, 13 Dec 2022 22:51:16 +0000 (15:51 -0700)]
Use require !skip_dlmopen_tests
This changes some tests to use "require !skip_dlmopen_tests".
Tom Tromey [Tue, 13 Dec 2022 22:40:02 +0000 (15:40 -0700)]
Use require !skip_shlib_tests
This changes some tests to use "require !skip_shlib_tests".
Tom Tromey [Tue, 13 Dec 2022 22:35:59 +0000 (15:35 -0700)]
Use require !skip_cplus_tests
This changes some tests to use "require !skip_cplus_tests".
Tom Tromey [Tue, 13 Dec 2022 22:25:00 +0000 (15:25 -0700)]
Use require is_x86_like_target
This changes some tests to use "require is_x86_like_target".
Tom Tromey [Tue, 13 Dec 2022 22:21:57 +0000 (15:21 -0700)]
Use require dwarf2_support
This changes some tests to use "require dwarf2_support".
Tom Tromey [Tue, 13 Dec 2022 22:16:16 +0000 (15:16 -0700)]
Use require supports_process_record
This changes some tests to use "require supports_process_record".
Tom Tromey [Tue, 13 Dec 2022 22:04:18 +0000 (15:04 -0700)]
Use require supports_reverse
This changes some tests to use "require supports_reverse".
Tom Tromey [Tue, 13 Dec 2022 22:59:39 +0000 (15:59 -0700)]
Use unsupported in 'require'
This changes 'require' to use 'unsupported' rather than 'untested'.
The latter doesn't really seem to be correct according to the DejaGNU
documentation:
Declares a test was not run. `untested' writes in the log file a
message beginning with _UNTESTED_, appending the `message' argument.
For example, you might use this in a dummy test whose only role is to
record that a test does not yet exist for some feature.
The example there, and some text elsewhere, is what makes me think
this isn't a great fit. On the other hand, 'unsupported' says:
Declares that a test case depends on some facility that does not exist
in the testing environment.
Tom Tromey [Tue, 13 Dec 2022 22:00:07 +0000 (15:00 -0700)]
Change 'require' to accept a list of predicates
This changes 'require' to accept a list of simple predicates. For
now, each predicate is just the name of a proc, optionally prefixed
with "!" to indicate that the result should be inverted.
It's possible to make this fancier, but so far I haven't done so. One
idea I had is to allow a predicate to have associated text to display
on failure. Another is to convert the predicates that need a running
gdb (e.g., skip_python_tests) to start their own gdb, and then
'require' could enforce the rule that gdb not be running when it is
called.
Tom Tromey [Thu, 15 Dec 2022 00:04:35 +0000 (17:04 -0700)]
Don't use ensure_gdb_index with require
This series changes 'require' to take a list of simple predicates.
This patch backs out the one use of 'require' that doesn't conform to
this -- calling ensure_gdb_index.
Vladimir Mezentsev [Thu, 12 Jan 2023 20:51:48 +0000 (12:51 -0800)]
gprofng: PR29987 bfd/archive.c:1447: undefined reference to `filename_ncmp'
gprofng/ChangeLog
2023-01-12 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/29987
* configure.ac: Remove dependencies on libbfd and libiberty.
* gprofng/src/Makefile.am: Likewise.
* configure: Rebuild.
* Makefile.in: Rebuild.
* src/Makefile.in: Rebuild.
* doc/Makefile.in: Rebuild.
* gp-display-html/Makefile.in: Rebuild.
Indu Bhagat [Fri, 13 Jan 2023 19:15:43 +0000 (11:15 -0800)]
libsframe: replace an strncat with strcat
Calling strncat with the size of the src string is not so meaningful.
The length argument to strncat should specify the remaining bytes
bytes in the destination; although in this case, it appears to be
unncessary altogether to use strncat in the first place.
libsframe/
* sframe-dump.c (dump_sframe_func_with_fres): Use of strcat is
just as fine.
Andrew Burgess [Thu, 20 Oct 2022 09:52:48 +0000 (10:52 +0100)]
gdbserver: add comments to read_inferior_memory function
Just adding some comments to the gdbserver read_inferior_memory
function. No actual code changes.
Andrew Burgess [Thu, 20 Oct 2022 10:59:55 +0000 (11:59 +0100)]
gdb/infrun: add debug print in print_signal_received_reason
It would have helped me to see an infrun debug line being printed from
print_signal_received_reason, so I'm adding one.
Andrew Burgess [Mon, 17 Oct 2022 14:01:24 +0000 (15:01 +0100)]
gdb: int to bool conversion for normal_stop
Change the return type of normal_stop (infrun.c) from int to bool.
Update callers.
I've also converted the (void) to () in the function declaration and
definition, given I was changing those lines anyway.
There should be no user visible changes after this commit.
Nick Clifton [Fri, 13 Jan 2023 11:42:33 +0000 (11:42 +0000)]
Updated Romainian translation for the bfd sub-directory
GDB Administrator [Fri, 13 Jan 2023 00:00:21 +0000 (00:00 +0000)]
Automatic date update in version.in
Tom Tromey [Fri, 6 Jan 2023 19:18:07 +0000 (12:18 -0700)]
Disable ptype/o for dynamic types
A user pointed out that "ptype/o" of a certain Ada type -- while in C
mode -- caused gdb to crash.
The bug here is that dynamic types can't really be printed this way.
This patch avoids the bug by disabling the "/o" feature in this case.
Note that using "ptype/o" in this way makes sense for the time being,
because the Ada code doesn't support the "/o" feature (yet); and in
any case gdb should not crash.
Hans-Peter Nilsson [Tue, 3 Jan 2023 02:19:54 +0000 (03:19 +0100)]
ARM: Fix ld bloat introduced between binutils-2.38 and 2.39
Since commit
9833b7757d24, "PR28824, relro security issues",
ELF_MAXPAGESIZE matters much more, with regards to layout of
the linked file. That commit fixed an actual bug, but also
exposes a problem for targets were that value is too high.
For example, for ARM(32, a.k.a. "Aarch32") specifically
bfd_arch_arm, it's set to 64 KiB, making all Linux(/GNU)
targets pay an extra amount of up to 60 KiB of bloat in
DSO:s and executables. This matters when there are many
such files, and where storage is expensive.
It's *mostly* bloat when using a Linux kernel, as ARM(32) is
a good example of an target where ELF_MAXPAGESIZE is set to
an extreme value for an obscure corner-case. The ARM
(32-bit) kernel has 4 KiB pages, has had that value forever,
and can't be configured to any other value. The use-case is
IIUC "Aarch32" emulation on an "Aarch64" (arm64) kernel, but
not just that, but a setup where the Linux page-size is
configured to something other than the *default* 4 KiB. Not
sure there actually any such systems in use, again with
both Aarch32 compatibility support and a non-4KiB pagesize,
with all the warnings in the kernel config and requiring the
"EXPERT" level set on.
So, let's do like x86-64 in
a2267dbfc9e1 "x86-64: Use only
one default max-page-size" and set ELF_MAXPAGESIZE to 4096.
bfd:
* elf32-arm.c (ELF_MAXPAGESIZE): Always set to 0x1000.
Hans-Peter Nilsson [Wed, 11 Jan 2023 15:34:04 +0000 (16:34 +0100)]
ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB.
With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes
different and symbols end up in other places. Avoid churn
and regexpification of old test patterns by passing the
max-page-size setting active at the time.
ld/testsuite:
* testsuite/ld-arm/arm-elf.exp,
testsuite/ld-arm/non-contiguous-arm2.d,
testsuite/ld-arm/non-contiguous-arm3.d,
testsuite/ld-arm/non-contiguous-arm5.d,
testsuite/ld-arm/non-contiguous-arm6.d,
testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d:
Pass -z max-page-size=0x10000 explicitly to test that rely on
that value in output-matching patterns.
Nick Alcock [Mon, 9 Jan 2023 13:43:09 +0000 (13:43 +0000)]
libctf: ctf-link outdated input check faulty
This check has a pair of faults which, combined, can lead to memory
corruption. Firstly, it assumes that the values of the ctf_link_inputs
hash are ctf_dict_t's: they are not, they are ctf_link_input_t's, a much
shorter structure. So the flags check which is the core of this is
faulty (but happens, by chance, to give the right output on most
architectures, since usually we happen to get a 0 here, so the test that
checks this usually passes). Worse, the warning that is emitted when
the test fails is added to the wrong dict -- it's added to the input
dict, whose warning list is never consumed, rendering the whole check
useless. But the dict it adds to is still the wrong type, so we end up
overwriting something deep in memory (or, much more likely,
dereferencing a garbage pointer and crashing).
Fixing both reveals another problem: the link input is an *archive*
consisting of multiple members, so we have to consider whether to check
all of them for the outdated-func-info thing we are checking here.
However, no compiler exists that emits a mixture of members with this
flag on and members with it off, and the linker always reserializes (and
upgrades) such things when it sees them: so all members in a given
archive must have the same value of the flag, so we only need to check
one member per input archive.
libctf/
PR libctf/29983
* ctf-link.c (ctf_link_warn_outdated_inputs): Get the types of
members of ctf_link_inputs right, fixing a possible spurious
tesst failure / wild pointer deref / overwrite. Emit the
warning message into the right dict.