Repository navigation
edg_prelink: prelinker does not resolve shared libraries passed with -l
#202
hakanrw
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
When
eccpinvokes the C++ prelinker for automatic template instantiation,the prelinker resolves
-lNAMEonly aslibNAME.a. If a library is availableas
libNAME.sobut has no static archive,edg_prelinkreports that thelibrary does not exist. The final linker invocation accepts the same
-Land-loptions.Passing the shared library by its explicit path works, as does disabling
automatic instantiation.
Observed Behavior
Given a shared library with no corresponding static archive:
the normal GCC driver accepts it:
The equivalent
eccpinvocation fails during prelinking:Passing the same shared library by its explicit path succeeds while automatic
template instantiation remains enabled:
Disabling automatic instantiation with
-tused --no_auto_instantiationalsoavoids the failure because
edg_prelinkis not invoked.Expected Behavior
edg_prelinkshould resolve-lNAMEconsistently with the linker selected bythe
eccptoolchain configuration. In this example,-L. -ledg_prelink_fixtureshould resolvelibedg_prelink_fixture.so,which would allow automatic template instantiation and the final link to
complete.
The lookup should not be hard-coded to
lib<X>.so; it should also supportshared library filename patterns used on other platforms, such as
.dylibon macOS and
.dllon Windows.Additional Details
Reduced source used to create the shared library (
fixture.c):Caller (
main.cc):I acknowledge that:
All reactions