<div dir="ltr"><div dir="ltr">Thanks a lot for the response. Upon using g++ or gcc with -lstdc++ flag I get the original error I was getting without the <span class="gmail-im">"--relocation-model=pic" flag for llc.i.e</span></div><div dir="ltr"><span class="gmail-im"><br></span></div><div dir="ltr"><span class="gmail-im">/usr/bin/ld: output.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC<br>/usr/bin/ld: final link failed: nonrepresentable section on output<br>collect2: error: ld returned 1 exit status</span></div><div dir="ltr"><span class="gmail-im"><br></span></div><div><span class="gmail-im">Is there another way I can try to save the modified program to a file and then execute it? Without using "llc" maybe?<br></span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 18, 2019 at 8:05 PM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 18 May 2019 at 13:28, Holland Vosijk via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> 5. Tried it by giving "--relocation-model=pic" flag to llc command. But if i run gcc command after that I get so many "undefined reference to" errors like:<br>
<br>
The std::* errors are because you need to link against libstdc++. If<br>
you invoked GCC as "g++" I think it would automatically do that, or<br>
you could manually add -lstdc++.<br>
<br>
I'm not sure about the rpc::* errors though. The only librpc.so I can<br>
find on Debian (in the sinfo package) does not contain those symbols,<br>
so maybe you have an alternative version that you need to build to go<br>
with your source and make sure it's the one found by ld.<br>
<br>
Cheers.<br>
<br>
Tim.<br>
</blockquote></div></div>