Hello ! I entered the 'demo' subdirectory and 'make heap.asan'. However, I encountered the following message:
[] Relocations for a section that's not loaded: .rela.dyn
[] Relocations for a section that's not loaded: .rela.plt
[x] Couldn't find valid section 403ff0
[x] Couldn't find valid section 403ff8
[] Loading analysis cache
[] Instrumented: 25 locations
Stats: [ 4 14 7]
{"rflags": 21, "rdi": 15, "rax": 10, "rbp": 1, "rsi": 2}
rflags live: 4, rflags + 0 regs: 2, rflags + rax: 0, rflags + >= 1 reg: 2
clang heap.asan.s -lasan -o heap.asan
/usr/bin/ld: /tmp/heap-1df0be.o: in function asan.module_ctor': (.text+0x542): undefined reference to__asan_init_v4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried the following solutions: 1) change the compiler from clang-9 to gcc-4.8, 2) change the '-lasan'
linkage option to '-static-libasan' as some googled tips said, but all fail to the same error message.
So how to fix it ?
Looking forward to your suggestion ~
Hello ! I entered the 'demo' subdirectory and 'make heap.asan'. However, I encountered the following message:
[] Relocations for a section that's not loaded: .rela.dyn [] Relocations for a section that's not loaded: .rela.plt [x] Couldn't find valid section 403ff0 [x] Couldn't find valid section 403ff8 [] Loading analysis cache [] Instrumented: 25 locations Stats: [ 4 14 7] {"rflags": 21, "rdi": 15, "rax": 10, "rbp": 1, "rsi": 2} rflags live: 4, rflags + 0 regs: 2, rflags + rax: 0, rflags + >= 1 reg: 2 clang heap.asan.s -lasan -o heap.asan /usr/bin/ld: /tmp/heap-1df0be.o: in function
asan.module_ctor': (.text+0x542): undefined reference to
__asan_init_v4' clang: error: linker command failed with exit code 1 (use -v to see invocation)I tried the following solutions: 1) change the compiler from clang-9 to gcc-4.8, 2) change the '-lasan' linkage option to '-static-libasan' as some googled tips said, but all fail to the same error message. So how to fix it ? Looking forward to your suggestion ~