<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 28 May 2014 11:29, Sasa Stankovic <span dir="ltr"><<a href="mailto:Sasa.Stankovic@imgtec.com" target="_blank">Sasa.Stankovic@imgtec.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>> BTW, if you're hitting this when targeting NaCl at the moment, you should probably turn off PIC code generation, since you don't need PIC for NaCl nexes.<br>




<br>
</div>Should this be done in LLVM, or in pnacl/driver scripts?</blockquote><div><br></div><div>That depends.  Why does LLVM default to using -relocation-model=pic on MIPS?  This differs from GCC, and it differs from other architectures.</div>



<div><br></div><div>The default appears to be set by this code in lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp:</div><div><div>  if (RM == Reloc::Default)</div><div>    RM = Reloc::PIC_;</div></div><div>but there's no explanation of the reason there.</div>



<div><br></div><div>I would recommend taking that out and changing the default to be non-PIC, for efficiency, and for consistency with other architectures and with GCC.  But maybe there is a reason for it?</div><div><br>


</div><div>Cheers,</div><div>Mark</div><div><br></div></div></div></div>