I'm using llvm-ld from SVN r41106 When issueing the command $ /usr/src/llvm/installed/bin/llvm-ld -v -stats -native -O1 -strip-all -o main \ .obj/conf.o .obj/configwriter.o \ -L/usr/share/qt3/lib -L/usr/X11R6/lib \ -lcrypto -lusb -lutil -lqt-mt -lXext -lX11 -lm -lpthread I get this output: Linking bitcode file '.obj/conf.o' Linked in file '.obj/conf.o' Linking bitcode file '.obj/configwriter.o' llvm-ld: error: Cannot link file '.obj/configwriter.o' If I swap the order of configwriter.o and conf.o, then I'll get the same error, it just says that it cannot link conf.o The "*.o" files are made by llvm-gcc-4.0 with --emit-llvm. I can "llvm-dis conf.o -o -" on both files and don't see any apparent error there. Should I file a bug and attach those two files?
I think I have experienced this when more than one module contains definitions for the same values. ie. it should only be a declaration in one of them. On 8/15/07, Holger Schurig <hs4233 at mail.mn-solutions.de> wrote:> I'm using llvm-ld from SVN r41106 > > When issueing the command > > $ /usr/src/llvm/installed/bin/llvm-ld -v -stats -native -O1 -strip-all -o main \ > .obj/conf.o .obj/configwriter.o \ > -L/usr/share/qt3/lib -L/usr/X11R6/lib \ > -lcrypto -lusb -lutil -lqt-mt -lXext -lX11 -lm -lpthread > > I get this output: > > Linking bitcode file '.obj/conf.o' > Linked in file '.obj/conf.o' > Linking bitcode file '.obj/configwriter.o' > llvm-ld: error: Cannot link file '.obj/configwriter.o' > > > If I swap the order of configwriter.o and conf.o, then I'll get > the same error, it just says that it cannot link conf.o > > The "*.o" files are made by llvm-gcc-4.0 with --emit-llvm. I can > "llvm-dis conf.o -o -" on both files and don't see any apparent > error there. > > Should I file a bug and attach those two files? > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
> I think I have experienced this when more than one module > contains definitions for the same values. ie. it should only > be a declaration in one of them.Hmm, when I compile and link this with plain gcc, it everything works. Anyway, llvm-ld should probably not just say "Cannot link file 'blah'", but why it cannot link it. I compiled llvm in with --enable-debug. Is there any switch that I can use to turn on some verbosity, so that I can maybe see from debug output where the problem is?
Tomas, Please file a bug for this. Attach the .o files and command line in question. Thanks, Reid. On Wed, 2007-08-15 at 23:22 +0200, Tomas Lindquist Olsen wrote:> I think I have experienced this when more than one module contains > definitions for the same values. ie. it should only be a declaration > in one of them. > > On 8/15/07, Holger Schurig <hs4233 at mail.mn-solutions.de> wrote: > > I'm using llvm-ld from SVN r41106 > > > > When issueing the command > > > > $ /usr/src/llvm/installed/bin/llvm-ld -v -stats -native -O1 -strip-all -o main \ > > .obj/conf.o .obj/configwriter.o \ > > -L/usr/share/qt3/lib -L/usr/X11R6/lib \ > > -lcrypto -lusb -lutil -lqt-mt -lXext -lX11 -lm -lpthread > > > > I get this output: > > > > Linking bitcode file '.obj/conf.o' > > Linked in file '.obj/conf.o' > > Linking bitcode file '.obj/configwriter.o' > > llvm-ld: error: Cannot link file '.obj/configwriter.o' > > > > > > If I swap the order of configwriter.o and conf.o, then I'll get > > the same error, it just says that it cannot link conf.o > > > > The "*.o" files are made by llvm-gcc-4.0 with --emit-llvm. I can > > "llvm-dis conf.o -o -" on both files and don't see any apparent > > error there. > > > > Should I file a bug and attach those two files? > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Strange error of llvm-ld
- [LLVMdev] Missing Optimization Opportunities
- [LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
- [LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
- [LLVMdev] scalar-evolution + indvars fail to get the loop trip count?