[LLVMbugs] [Bug 11866] New: linkonce_odr symbol shows up in library when using lto

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 26 21:24:33 PST 2012


             Bug #: 11866
           Summary: linkonce_odr symbol shows up in library when using lto
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Linking this IL file
%struct.foo = type { i8 }
define void @_Z3zedP3foo(%struct.foo* nocapture %x) uwtable optsize ssp {
  tail call void @_ZN3foo3barEv(%struct.foo* undef) optsize
  ret void
define linkonce_odr void @_ZN3foo3barEv(%struct.foo* nocapture %this) uwtable
optsize noinline ssp align 2 {
  tail call void @_Z1fv() optsize
  ret void
declare void @_Z1fv() optsize

with a regular object file defining _Z1fv with

ld -shared -o t.so test.o test2.o -plugin LLVMgold.so -plugin-opt

produces a .so with _ZN3foo3barEv visible (it is also included in the apifile).
Given the definition of linkonce_odr, we should be able to avoid including it.

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