[llvm-dev] Compiling program with dfsan at IR
Archa . via llvm-dev
llvm-dev at lists.llvm.org
Sat Jun 3 02:19:29 PDT 2017
I tried running step 5 with clang -fsanitize=dataflow instead of gcc but it
gave the following error:
relocation R_X86_64_32 against `desc' can not be used when making a shared
object; recompile with -fPIC
error adding symbols: Bad value
clang-5.0: error: linker command failed with exit code 1 (use -v to see
So I also tried adding -fPIC option at step 1 when converting .c program to
.bc and still results in same error. Is there anything else I may be
On Fri, Jun 2, 2017 at 9:25 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> Programs compiled with dfsan require a runtime library in order to work
> correctly. You will need to link your program with "clang
> On Fri, Jun 2, 2017 at 12:46 AM, Archa . via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> I am trying to instrument a small program with dfsan at IR and then
>> compile it. But I end up with undefined reference errors.
>> Steps taken:
>> 1.Convert toy program to .bc
>> 2. IR pass to insert dfsan calls
>> 3.opt -dfsan on resultant bitcode from step 2
>> 4. llc step3.bc -o step4.s
>> 5. gcc step.s -o step5.o
>> I get error "undefined reference to `__dfsan_arg_tls' " and so forth for
>> all functions defined.
>> Is there something I am missing or doing wrong in my steps.
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev