Add link library at runtime?

Mike Frysinger vapier@gentoo.org
Wed Nov 18 02:17:00 GMT 2015


On 17 Nov 2015 19:54, Andrew Bell wrote:
> Not exactly a binutils question, but perhaps you can help?

you probably want to use the libc-help mailing list for such questions:
	https://www.gnu.org/software/libc/development.html

> I'm calling dlopen() on a library A.so that references an undefined symbol
> Foo.  Foo is defined in B.so, but A.so is not linked with B.so (not a
> dependency).  Can I somehow force resolution of Foo in A.so at runtime
> by providing B.so?

just do:
	dlopen("B.so", RTLD_GLOBAL)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20151118/d44b1094/attachment.sig>


More information about the Binutils mailing list