http://llvm.org/bugs/show_bug.cgi?id=11866

             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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    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
generate-api-file

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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to