[LLVMbugs] [Bug 11677] New: lto lazy-loading produces invalid ir

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 29 20:20:20 PST 2011


             Bug #: 11677
           Summary: lto lazy-loading produces invalid ir
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Linker
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This .ll file:

@table = constant i8* blockaddress(@func, %bb)
define void @func() {

breaks in LTO:

$ ld --plugin LLVMgold.so x.bc -shared -o x.so
invalid linkage type for global declaration
i8* @0
Broken module found, compilation aborted!
Stack dump:
0.    Running pass 'Function Pass Manager' on module 'ld-temp.o'.

What's @0? Taking a look with gdb, it's the not-materialized blockaddress

Breakpoint 2, LTOCodeGenerator::addModule (this=0x6b6ff0, mod=0x702d80,
    errMsg=...) at LTOCodeGenerator.cpp:93
93        bool ret = _linker.LinkInModule(mod->getLLVVMModule(), &errMsg);
(gdb) call mod->getLLVVMModule()->dump()

@table = constant i8* @0
@0 = internal global i8

; Materializable
declare void @func()


Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list