linux/tools/testing/selftests/rseq
Mark Brown e146162dcf selftests/rseq: Fix build with undefined __weak
commit d5ad9aae13 upstream.

Commit 3bcbc20942 ("selftests/rseq: Play nice with binaries statically
linked against glibc 2.35+") which is now in Linus' tree introduced uses
of __weak but did nothing to ensure that a definition is provided for it
resulting in build failures for the rseq tests:

rseq.c:41:1: error: unknown type name '__weak'
__weak ptrdiff_t __rseq_offset;
^
rseq.c:41:17: error: expected ';' after top level declarator
__weak ptrdiff_t __rseq_offset;
                ^
                ;
rseq.c:42:1: error: unknown type name '__weak'
__weak unsigned int __rseq_size;
^
rseq.c:43:1: error: unknown type name '__weak'
__weak unsigned int __rseq_flags;

Fix this by using the definition from tools/include compiler.h.

Fixes: 3bcbc20942 ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+")
Signed-off-by: Mark Brown <broonie@kernel.org>
Message-Id: <20230804-kselftest-rseq-build-v1-1-015830b66aa9@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:27:25 +02:00
..
.gitignore
basic_percpu_ops_test.c
basic_test.c
compiler.h
Makefile selftests/rseq: Fix build with undefined __weak 2023-08-16 18:27:25 +02:00
param_test.c
rseq-abi.h
rseq-arm.h
rseq-arm64.h
rseq-generic-thread-pointer.h
rseq-mips.h
rseq-ppc-thread-pointer.h
rseq-ppc.h
rseq-riscv.h
rseq-s390.h
rseq-skip.h
rseq-thread-pointer.h
rseq-x86-thread-pointer.h
rseq-x86.h
rseq.c selftests/rseq: Fix build with undefined __weak 2023-08-16 18:27:25 +02:00
rseq.h
run_param_test.sh
settings