Subject: Re: Dynamic linking is go (again)
To: Jason Thorpe <firstname.lastname@example.org>
From: Marcus Comstedt <email@example.com>
Date: 07/03/2003 22:44:01
Jason Thorpe <firstname.lastname@example.org> writes:
> You need to pass -E (--export-dynamic is the long option name, I
> think) to the linker in order for shared objects to access main
> program symbols.
Well, this works, but then how come I don't need the -E flag when I
link against the shared object? That is, if I do
gcc -o prog foo.o -R. bar.so
then bar can access the symbols in foo without -E, but if I instead
dlopen() bar.so from foo, -E is needed. I think the semantics should be
the same for these two cases, if I specify RTLD_GLOBAL to dlopen()...