lli successfully run the program but gcc gives seg-fault

Hello;

I was writing this instrumentation pass and I am facing a problem. My
pass instruments the bit code with some extra instructions. When I
run this instrumented bitcode using lli, it runs perfectly, but when I
compile the bitcode using llc and then produce the native binary using
gcc and run it, I get a seg-fault.

Can anyone please tell me the possible reason(s) for this?

Thank you;