Re: Dynamic linking is go (again)

Marcus Comstedt <[email protected]>
Newsgroups gmane.os.netbsd.ports.dreamcast,gmane.os.netbsd.ports.sh3
Message-ID <[email protected]>
Jason Thorpe <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.