<div dir="ltr"><div><div><div><div><div><div><div>Hi <br></div> I am executing following steps to convert assembly to object code.<br><br></div>llc -march=x86-64 -filetype=asm  input.ll -o input.s<br></div>g++ -g -c -o input.s --input.o<br><br></div><div>inshort <br></div><div><span style="color:rgb(53,28,117)">ll --> llc --> .s -->g++ -->obj </span><br><br></div>original source was something like this<br><br><span style="color:rgb(0,0,255)">{ <br></span></div><span style="color:rgb(0,255,0)"><span style="color:rgb(0,0,255)">    printf(" **** %s ****",str);<br>}</span><br></span><br></div>input.s turn out to be<br><br></div><div><span style="color:rgb(0,0,255)">movq .str@GOTPCREL(%rip),%rdi<br></span></div><div><span style="color:rgb(0,0,255)">movq .str.1@GOTPCREL(%rip),%rsi</span><br></div><div>xorl  %eax,%eax<br></div><div>movq %rdi,%r14<br></div><div>callq printf@PLT<br><br><br></div><div>While at Runtime<br><br>
<div><span style="color:rgb(204,0,0)">mov  0x0(%rip),%rdi<br></span></div><div><span style="color:rgb(204,0,0)">mov  0x0(%rip),%rsi</span><br></div><div>xor  %eax,%eax<br></div><div>mov %rdi,%r14<br></div><div>callq printf@PLT</div>

<br></div><div>Not really sure what happened here?<br></div><div>I was expecting at runtime offset for str and str.1 to be different.<br></div><div>I could really use some help to determine if this is bug?<br></div></div>