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: unassignedb...@nondot.org
          Reporter: e...@ispras.ru
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to