<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 15, 2018 at 4:05 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> writes:<br>
>> There are a lot of relocations that are not R_ABS or R_PC. Could we<br>
>> limit this to R_PC and still error on other expressions?<br>
>><br>
><br>
> I just tried and unfortunately limiting it to R_PC doesn't work. In<br>
> particular, GCC 8.0 or earlier create R_386_GOTPC relocations in a<br>
> non-allocated section. We have a test for it, and if we limit it to R_PC,<br>
> that test starts failing.<br>
<br>
</span>Sorry, meant in addition to the special case we already have. So<br>
something like this:<br>
<span class=""><br>
<br>
if (Expr == R_NONE)<br>
  continue;<br>
<br>
</span><span class="">// GCC 8.0 or earlier have a bug that it emits R_386_GOTPC relocations<br>
</span><span class="">// against _GLOBAL_OFFSET_TABLE for .debug_info. The bug seems to have<br>
</span><span class="">// been fixed in 2017: <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82630" rel="noreferrer" target="_blank">https://gcc.gnu.org/bugzilla/<wbr>show_bug.cgi?id=82630</a>,<br>
</span><span class="">// but we need to keep this bug-compatible code for a while.<br>
</span><span class="">if (Config->EMachine == EM_386 && Type == R_386_GOTPC)<br>
</span>  continue;<br>
<br>
// SBCL case..<br>
if (Expr == R_PC) {<br>
  ...<br>
  continue;<br>
}<br>
<br>
if (Expr != R_ABS) {<br>
   error<br>
<span class="">}<br></span></blockquote><div><br></div><div><br></div><div>Ah, that makes sense. I didn't notice that I accidentally changed the behavior of the code for i386 GOTPC case.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>> Could you report a bug on SBCL? It is OK to have a workaround, but it<br>
>> is nice to at least let them know of the bug.<br>
>><br>
><br>
> I already filed a bug. I mailed to sbcl-bugs@, and it should be filed to<br>
> their bug management system soon. (I guess it's manual?)<br>
<br>
</span>Thanks!<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>