[Buildroot] libasan.so missing

Wolfgang Grandegger wg at grandegger.com
Tue Jul 4 10:16:18 UTC 2017



Am 03.07.2017 um 23:59 schrieb Peter Korsgaard:
>>>>>> "Wolfgang" == Wolfgang Grandegger <wg at grandegger.com> writes:
> 
>   > Hello Peter,
>   > Am 03.07.2017 um 19:19 schrieb Peter Korsgaard:
>   >>>>>>> "Wolfgang" == Wolfgang Grandegger <wg at grandegger.com> writes:
>   >>
>   >> > Hello,
>   >> > I'm using the x86_64 buildroot toolchain with gcc 5.4. I wonder why
>   >> > the address sanitizer library "libasan.so*" is not available in the
>   >> > rootfs of the target. Is it intentional? And what is the best way to
>   >> > get it added to the rootfs?
>   >>
>   >> Is this with uClibc-ng, musl or Glibc?
> 
>   > It's with Glibc. I think the libsanitizer libs are built but not moved
>   > to the target.
> 
> Correct. I've sent a patch fixing this for the internal and external
> toolchain. Could you give it a try?
> 
> https://patchwork.ozlabs.org/patch/783661/
> https://patchwork.ozlabs.org/patch/783660/

$ find . -name 'libasan*'
./target/lib/libasan.so
./target/lib/libasan_preinit.o
./target/lib/libasan.so.2
./target/lib/libasan.so.2.0.0

It works. The libsanitizer adds some extra space and runtime overhead, I 
assume. Therefore, on Ubuntu, the libraries are not installed by 
default. They can be added by installing the "libasan0" package. For 
buildroot, would it make sense to make this option configurable as well?

(libasan.*) Extra toolchain libraries to be copied to target

Wolfgang.


More information about the buildroot mailing list