Re: Dynamic linking is go (again)

Jason Thorpe <[email protected]>
Newsgroups gmane.os.netbsd.ports.dreamcast,gmane.os.netbsd.ports.sh3
Message-ID <[email protected]>
On Thursday, July 3, 2003, at 07:45  AM, Marcus Comstedt wrote:

> Btw, I noticed that objects opened with dlopen() can not reference
> symbols in the main binary.  Does anyone know if this is a sh3-related
> issue, or a generic NetBSD bug?  If I link the main binary with the
> shared object, it can access the symbol.

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.

Shared objects can always access each other's symbols (e.g. libc's) but 
the main program is a different situation.

         -- Jason R. Thorpe <[email protected]>
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.