Emit a variable defined in gcc

Martin Liška mliska@suse.cz
Thu Jul 2 08:32:06 GMT 2020

On 7/2/20 8:12 AM, Harshit Sharma wrote:
> Thanks Martin. I liked your idea of using __builtin___asan_version_mismatch_check_v8().
> But now, I am getting a compile error. ( error: implicit declaration of function '__builtin___asan_version_mismatch_check_v8'; )
> It means the reference to this function is not resolved. So, I guess gcc is not emitting this function.

The function is defined in libasan.so in libsanitizer/asan/asan_rtl.cpp.

> What could be the issue here? Btw I am using fsanitize=kernel-address for my project. Even if I use fsanitize=address, the reference to
> this function will not be resolved.

For kernel-address, there's no run-time provided by GCC and so that the call to __builtin___asan_version_mismatch_check_v8
is not emitted.

You may change the emission and do it also for kernel-address where you'll define the symbol in kernel source code.


More information about the Gcc mailing list