summaryrefslogtreecommitdiff
path: root/build_abi.sh
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2019-06-12 18:34:25 +0100
committerMatthias Maennich <maennich@google.com>2019-06-12 18:34:25 +0100
commitf2540c7355b0a54250ec986c0dc3d1e3f1499bcf (patch)
tree43178ceac82e833188f833e6e5fded381bc151f4 /build_abi.sh
parent2f2937cb8a5effb8f173384a82095b5fa38e4669 (diff)
abi: replace libabigail's --short-locs by postprocessing of the abi.xml
Shortening the file paths with --short-locs to just file names makes the abi.xml output ambigous and the later abidiff analysis sensitive for external influences that (still correct) change the result of the binary. Hence, stop using --short-locs, but rather textual replace all occurrences of the kernel source dir and - in a second step - everything else that sneaked in (e.g. from the prebuilts or other repositories of the checkout). Bug: 135011693 Change-Id: I808a96e3e38365e54f5eb467587b8f5dfbc12825 Signed-off-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to 'build_abi.sh')
-rwxr-xr-xbuild_abi.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/build_abi.sh b/build_abi.sh
index e413cf2..ef3f990 100755
--- a/build_abi.sh
+++ b/build_abi.sh
@@ -63,6 +63,12 @@ ${ROOT_DIR}/build/abi/dump_abi \
--linux-tree $OUT_DIR \
--out-file ${DIST_DIR}/${abi_out_file}
+# sanitize the abi.xml by removing any occurences of the kernel path
+sed -i "s#${ROOT_DIR}/${KERNEL_DIR}/##g" ${DIST_DIR}/${abi_out_file}
+# now also do that with any left over paths sneaking in
+# (e.g. from the prebuilts)
+sed -i "s#${ROOT_DIR}/##g" ${DIST_DIR}/${abi_out_file}
+
ln -sf ${abi_out_file} ${DIST_DIR}/abi.xml
echo "========================================================"