Re: Dynamic linking is go (again)

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

> 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()...

I think in this case you're simply linking a PIC object directly into 
the executable, right?  It's not actually recording a dependency on 
bar.so in the binary, is it?

         -- 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.