[LLVMbugs] [Bug 521] NEW: Linker does not handle bytecode libraries correctly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 19 16:04:47 PST 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=521

           Summary: Linker does not handle bytecode libraries correctly
           Product: libraries
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Linker
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org


We can currently create llvm "shared objects" with commands like: "llvm-gcc
-shared x.bc y.bc -o libfoo.so".

There are two problems with this.

1. When linking to one of these libraries, gccld -native and -native-cbe are
   broken.  In particular, linking something like this:
     llvm-gcc x.o -lfoo -Wl,-native
   will successfully link libfoo.so into x.o as a bytecode link stage, but will
   then fail when invoking the system linker.  The problem is that liblinker is
   not keeping track of the fact that the bytecode version was found, so we 
   don't need to have a native version around.

2. Shared libraries should only be linked in once.  There are two forms of
   this bug.  One is if you do llvmgcc -lfoo -lbar -lfoo, where libfoo.so is
   a bytecode file.  The second problem occurs when we have just llvmgcc -lfoo
   -lbar, and where libfoo.so has libbar in its deplibs list.

-Chris



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list