<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Cannot find a symbol that clashes with the source file name"
   href="https://bugs.llvm.org/show_bug.cgi?id=36432">36432</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot find a symbol that clashes with the source file name
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>OrcJIT
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eush@ispras.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19894" name="attach_19894" title="Test case to reproduce the problem">attachment 19894</a> <a href="attachment.cgi?id=19894&action=edit" title="Test case to reproduce the problem">[details]</a></span>
Test case to reproduce the problem

Hi!

RTDyldObjectLinkingLayer cannot find a symbol if its name clashes the name of
the source file.

ELFObjectWriter adds an STT_FILE symbol with the name of the source file name
(which is initialized to the ModuleID by the Module constructor). This symbol
is handled first in `RTDyldObjectLinkingLayer::buildInitialSymbolTable' and
prevents the function symbol with the same name to be inserted into the symbol
table, and so `RTDyldObjectLinkingLayer::findSymbol' returns a symbol with
address zero.

I added a test to OrcCAPITest to demonstrate this problem.</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>