[llvm-bugs] [Bug 36432] New: Cannot find a symbol that clashes with the source file name

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 19 00:42:22 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36432

            Bug ID: 36432
           Summary: Cannot find a symbol that clashes with the source file
                    name
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OrcJIT
          Assignee: unassignedbugs at nondot.org
          Reporter: eush at ispras.ru
                CC: llvm-bugs at lists.llvm.org

Created attachment 19894
  --> https://bugs.llvm.org/attachment.cgi?id=19894&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180219/9fe275d3/attachment.html>


More information about the llvm-bugs mailing list