On Tue, Mar 21, 2006 at 01:07:48PM -0500, Andrew Sveikauskas wrote:
> Hi,
> 
> I just upgraded to the 3.9 snapshot in FTP (this is on 386) and I find
> that dlopen() does not work.
> 
[snip]
> 
> And then:
> $ gcc -shared -o liba.so a.c
> $ gcc b.c
> $ ./a.out
> ./a.out:./liba.so: undefined symbol 'x'
> 
> This also happens if I change RTLD_LAZY to RTLD_NOW or anything else.
> 
> Is this a known issue?  Did I do something wrong in the upgrade process?
> 

With ELF symbols in an executable which are not explictly referenced from
a shared library are not exported, for this to work you must pass the
linker flag -E or --export-dynamic, then the program will work
as expected.

eg:
$ gcc -Wl,-E b.c

Dale Rahn                               [EMAIL PROTECTED]

Reply via email to