Linking of simavr.so

13 views
Skip to first unread message

Giles Atkinson

unread,
Jan 16, 2021, 5:01:38 PM1/16/21
to sim...@googlegroups.com
I am writing some software that uses libsimavr.so.  Because it runs in a rather special environment, it loads the library at run-time, using dlopen().  That fails either immediately or later when calling dlsym(), depending on the dlopen() flags.  On examining the library with ldd, the cause is clear: libsimavr.so is not linked with the libraries it depends on, particularly libelf.

Looking in Makefile.common, the "-l" options are explicitly removed when linking shared libraries.
I tried restoring them, and all seems well: tests and exampes work as before and dlopen() now works.   What is the reason for omitting the library dependencies?

Thanks,

Giles
Reply all
Reply to author
Forward
0 new messages