History

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.

Arnd Bergmann committed 8 months ago

Commit a261f6d1 parent c9bb03a1 file · +5 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

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