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 1302 - llvm-ld warns when linking against shared libraries
Summary: llvm-ld warns when linking against shared libraries
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-ld (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Reid Spencer
URL:
Keywords: code-cleanup
Depends on:
Blocks:
 
Reported: 2007-04-03 21:10 PDT by Ryan M. Lefever
Modified: 2010-03-06 14:00 PST (History)
1 user (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 Ryan M. Lefever 2007-04-03 21:10:36 PDT
When creating a native executable with llvm-ld and linking against a shared
(.so) library, using the -l option, llvm-ld generates the following warning:

llvm-ld: warning: Supposed library 'name_of_lib' isn't a library.

However, the produced executable seems to work fine, and seems to find
libname_of_lib.so through LD_LIBRARY_PATH just fine.  Reid Spencer advised that
this is most likely a code cleanup bug.
Comment 1 Reid Spencer 2007-04-04 00:43:37 PDT
This is pretty easy. The IdentifyFileType method sys::Path is simply not
identifying native object file types. I'm augmenting it to recognize COFF, ELF
and Mach-O files (should cover most of our bases for a while) for a variety of
targets we support. If the object file/shared lib is not recognized, the warning
message will still be produced and it will still link (assuming its valid) but
in that case I think the warning message is justified (i.e. its telling us to
update the object file recognition in LLVM).

This should be fixed shortly.