summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-03-06 17:33:07 +0100
committerNicolas Schier <nsc@kernel.org>2026-03-20 21:43:35 +0100
commita261f6dff3c1653c19c065c3b3650c625447b8a7 (patch)
treef2075e1b998413cf70863e582b1b6a0f94b8498e /scripts
parentc9bb03ac2c66bc5aa81b51ea0792477524c2763a (diff)
check-uapi: link into shared objects
While testing ABI changes across all architectures, I found that abidiff sometimes produces nonsensical output. Further debugging identified missing or broken libelf support for architecture specific relocations in ET_REL binaries as the source of the problem[1]. Change the script to no longer produce a relocatable object file but instead create a shared library for each header. This makes abidiff work for all of the architectures in upstream linux kernels. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=33869 Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260306163309.2015837-2-arnd@kernel.org Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-uapi.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/check-uapi.sh b/scripts/check-uapi.sh
index 955581735cb3..9fa45cbdecc2 100755
--- a/scripts/check-uapi.sh
+++ b/scripts/check-uapi.sh
@@ -178,8 +178,11 @@ do_compile() {
local -r inc_dir="$1"
local -r header="$2"
local -r out="$3"
- printf "int main(void) { return 0; }\n" | \
- "$CC" -c \
+ printf "int f(void) { return 0; }\n" | \
+ "$CC" \
+ -shared \
+ -nostdlib \
+ -fPIC \
-o "$out" \
-x c \
-O0 \