A pointer to asan.module_ctor goes into .init_array or .ctors as appropriate for the platform.
On Thu, Nov 10, 2016 at 1:23 AM, steven shi <shijunj...@gmail.com> wrote: > Hello, > I'm enabling the asan in my firmware, and I meet a issue that the > asan.module_ctor() as below is missing in my linked firmware module. I build > asan with -fsanitize=address -mllvm > -asan-instrumentation-with-call-threshold=0 and I hope to understand who is > supposed to call the asan.module_ctor() to do initialization when start a > module? If the caller is the glibc in Linux(e.g. __libc_csu_init() in > glibc-2.23\csu\elf-init.c) , then how the LLVM let the glibc know the > asan.module_ctor()? > > > define internal void @asan.module_ctor() { > call void @__asan_init() > call void @__asan_version_mismatch_check_v8() > call void @__asan_register_globals(i64 ptrtoint ([1 x { i64, i64, i64, > i64, i64, i64, i64, i64 }]* @0 to i64), i64 1) > ret void > } > > My firmware doesn't use glibc, all my firmware libraries are self-supported > and not linked with OS standard library. Does it mean current LLVM asan > cannot support my firmware? Any suggestion is welcomed. > > > Thanks > Steven Shi > > -- > You received this message because you are subscribed to the Google Groups > "address-sanitizer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to address-sanitizer+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to address-sanitizer+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.