This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: DLOPEN and Statically linked executable
Peter Zaitsev <peter@mysql.com> writes:
> Hello Andreas,
>
> Thursday, June 20, 2002, 7:58:55 PM, you wrote:
>
>>>
>
> AJ> You can compile it shared and install glibc in a differnt directory.
>
> Sorry but this is not that general approach. This is exactly the way
> how MySQL binary distribution is Build but we can't ask every user to
> compile GLIBC. This is not that easy task.
You can ship it as part of mysql - note that I really hope that this
is not needed.
>
> AJ> The smaller threads shouldn't need a patch if you compile for
> AJ> i686-linux-gnu with --enable-kernel=2.4.0.
>
> What do you mean? Will smaller stack used or just runtime stack
> selection work ?
Floating stacks will be used and those can have any size.
>
>>>
>>> The problem is - UDF does not work then MySQL is compiled
>>> statically. dlopen() itself works but it does not allow access to
>>> global symbols of running binary which are required for the
>>> functions to work.
>
> AJ> dlopen is not supported in static applications. It might work for you
> AJ> in the glibc version you tested but as glibc developers we only
> AJ> support it for the nss modules.
>
> If it would work, I would not be writing this message. In my case it
> works but external functions defined in main executable can't be
> resolved.
>
> The really important why it is not supported. Are there any
> fundamental reasons for this ?
It's quite difficult to get right and working for all corner cases.
Static and shared linking are really quite different things.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj