LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 3 - Linking two .a files explicitly on the command line fails
Summary: Linking two .a files explicitly on the command line fails
Status: RESOLVED WORKSFORME
Alias: None
Product: tools
Classification: Unclassified
Component: gccld (show other bugs)
Version: trunk
Hardware: All Linux
: P normal
Assignee: John T. Criswell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-07 13:40 PDT by Chris Lattner
Modified: 2018-09-19 06:24 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2003-10-07 13:40:53 PDT
"gccld foo.a foo.a" fails with multiple symbol definition bugs, whereas "gccld
-lfoo -lfoo" works properly.
Comment 1 Brian R. Gaeke 2003-10-08 12:41:33 PDT
Clearly *something* is going on here. Like John, I also haven't gotten
any multiple-def error messages, but:

53 zion> cat foo.c
int foo () { return 23423; }
54 zion> llvm-gcc -c -o foo.o foo.c
55 zion> llvm-ar foo.a foo.o
Member File Start: 8
Size: 124
Member File End: 192
56 zion> gccld -o=barf foo.a foo.a
gccld: Bytecode file 'foo.a' corrupt!: Invalid bytecode signature!
57 zion> gccld -o=barf -l=foo.a -l=foo.a
Not enough positional command line arguments specified!
Must specify at least 1 positional arguments: See: gccld --help
58 zion> gccld -o=barf -l=foo.a foo.a
gccld: Bytecode file 'foo.a' corrupt!: Invalid bytecode signature!

Maybe the strangeness of the UI should be a separate bug, though.
Leaving this as WFM.
Comment 2 Chris Lattner 2003-10-08 12:51:54 PDT
For wierdness like this, see Bug 19