<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 9 June 2014 11:03, 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">Here is some explanation for it, but I'm not sure whether this should be in the commit message. This is also not supported in Linux, but I don't know the reason for it. But even if we enable gp-relative addressing in NaCl, it wouldn't work because MIPS Gold linker currently doesn't support it. For gp-relative addressing to work, linker needs to emit together all the sections that are accessed using gp-relative addressing (.got section first, followed by various small-data sections (.sdata, .sbss, ...)). This is currently not implemented in MIPS Gold. (In GNU ld, this section ordering is specified in ld's internal linker script, but Gold doesn't have internal linker script.)<br>
</blockquote><div><br></div><div>If you don't explain this in the commit message or in the code, how would someone reading the source code know the reason for making UseSmallSection conditional on <span style="font-family:arial,sans-serif;font-size:13px">!isTargetNaCl()? How would someone maintaining the code know whether the </span><font face="arial, sans-serif">!isTargetNaCl() check could be removed?</font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I think you should add a comment explaining this in the code.</span></div><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Presumably the reason that UseSmallSection is disabled for Linux is that LLVM is assuming that it might be being used with Gold?</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Cheers,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Mark</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div></div></div>