<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - PowerPC64: jump tables cause failure during early Linux boot"
   href="https://llvm.org/bugs/show_bug.cgi?id=27128">27128</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PowerPC64: jump tables cause failure during early Linux boot
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: PowerPC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>anton@samba.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>A recent patch to more aggressively use jump tables ([Codegen]
Decrease minimum jump table density) has shown up an issue when using
llvm to build the PowerPC64 Linux kernel.

The kernel spends a short amount of time in early boot running at a non zero
offset. We do this by relocating everything in the TOC, then undoing that when
we copy ourselves down to 0.

We don't have an issue with jump tables on gcc because they use 32bit offsets
which get added to a base address. On llvm they are 64bit addresses. Looking
closer, it looks like llvm emits similar code to gcc when using the -fpic flag.

We've avoided the complexity and overhead of building a completely relocatable
image so far, perhaps we need to revisit that.</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>