<html>
    <head>
      <base href="http://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 --- - RuntimeDyld doesn't handle calls to external functions from MachO objects"
   href="http://llvm.org/bugs/show_bug.cgi?id=15729">15729</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>RuntimeDyld doesn't handle calls to external functions from MachO objects
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Generic Execution Engine Support
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andrew.kaylor@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10343" name="attach_10343" title="sample code to reproduce the problem">attachment 10343</a> <a href="attachment.cgi?id=10343&action=edit" title="sample code to reproduce the problem">[details]</a></span>
sample code to reproduce the problem

RuntimeDyld fails with an assertion when trying to perform relocations on
generated code that contains a call to an external function.  The generated
code contains a relocation (which varies by architecture) that is not handled
by the RuntimeDyldMachO class.

Eran Weiss provided the attached sample code to reproduce the problem.

To reproduce:

$ /usr/bin/g++ `llvm-config --cxxflags` -g -m32 -c mcjit_external_symbol.cpp
$ /usr/bin/g++ `llvm-config --ldflags` -g -m32 -o mcjit_external_symbol
mcjit_external_symbol.o `llvm-config --libs all`
$ ./mcjit_external_symbol 
verifying... 
LLVM ERROR: Program used external function '_external' which could not be
resolved!


This same test case passes if the older JIT implementation is used.</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>