<div dir="ltr">Yes, this is correct and expected behavior. But why do you want to make it work?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 23, 2017 at 7:14 AM, Joerg Sonnenberger via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Mar 23, 2017 at 01:23:24PM +0100, Martin Richtarsky via llvm-dev wrote:<br>
> ld: error: rodatareloc.s.o:(.rodata+0x0): can't create dynamic relocation<br>
> R_X86_64_64 against local symbol in readonly segment defined in<br>
> rodatareloc.s.o<br>
><br>
><br>
> Changing the section from .rodata to .data fixes it, but I guess this<br>
> should be supported also for .rodata. Should I open a bug?<br>
<br>
</span>This is not a bug, lld is completely correct. You are explicitly asking<br>
for a read-only section and the choosen relocation is position<br>
dependent, so yes, it correctly bails out.<br>
<br>
Joerg<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>