Subject: Re: Dynamic linking is go (again)
To: Jason Thorpe <>
From: Marcus Comstedt <>
List: port-sh3
Date: 07/03/2003 22:44:01
Jason Thorpe <> 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.

then bar can access the symbols in foo without -E, but if I instead
dlopen() 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