clang doesn't link executables built with ASAN support to libasan, like
gcc does, so we have to use nm rather than ldd for checking for whether
the executable was built with ASAN. nm is part of the binutils package
and should be available on all systems where gcc was installed.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
else
act_exe="${swtpm_exe}"
fi
- if [ -n "$(ldd "${act_exe}" | grep libasan)" ]; then
- echo "${act_exe} is linked with ASAN"
+ if [ -n "$(nm "${act_exe}" | grep __asan_)" ]; then
+ echo "${act_exe} is built with ASAN"
exit 77
fi
fi