Subject: Re: Dynamic linking is go (again)
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Marcus Comstedt <marcus@mc.pp.se>
List: port-dreamcast
Date: 07/03/2003 22:44:01
Jason Thorpe <thorpej@wasabisystems.com> 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()...


  // Marcus