<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:csdavec@swan.ac.uk" title="David Chisnall <csdavec@swan.ac.uk>"> <span class="fn">David Chisnall</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC"
   href="https://llvm.org/bugs/show_bug.cgi?id=24286">bug 24286</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC"
   href="https://llvm.org/bugs/show_bug.cgi?id=24286#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC"
   href="https://llvm.org/bugs/show_bug.cgi?id=24286">bug 24286</a>
              from <span class="vcard"><a class="email" href="mailto:csdavec@swan.ac.uk" title="David Chisnall <csdavec@swan.ac.uk>"> <span class="fn">David Chisnall</span></a>
</span></b>
        <pre>This looks like a bug in the input code.  The relocation is caused by this
inline assembly:

jal   __do_global_dtors_aux

This is wrong for PIC, it should be:

    dla  $t9, __do_global_dtors_aux
    jalr $t9

The assembly is instantiated from the macro CRT_CALL_STATIC_FUNCTION.  This
appears to come from contrib/gcc/config/mips/mips.h, which contains some
wonderful things like '/* Switch to #elif when we're no longer limited by K&R
C.  */' and, though it does have O32 and N64 / N32 variants, it doesn't appear
to be have a PIC variant.

This code is sufficiently horrible that the correct fix probably involves
napalm.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>