Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Arnd Bergmann and committed by
Nicolas Schier
a261f6df c9bb03ac

+5 -2
+5 -2
scripts/check-uapi.sh
··· 178 178 local -r inc_dir="$1" 179 179 local -r header="$2" 180 180 local -r out="$3" 181 - printf "int main(void) { return 0; }\n" | \ 182 - "$CC" -c \ 181 + printf "int f(void) { return 0; }\n" | \ 182 + "$CC" \ 183 + -shared \ 184 + -nostdlib \ 185 + -fPIC \ 183 186 -o "$out" \ 184 187 -x c \ 185 188 -O0 \