This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Avoid unnecessary dlopen libgcc_s.so
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Wed, 2 Nov 2005 11:06:50 -0800
- Subject: Re: PATCH: Avoid unnecessary dlopen libgcc_s.so
- References: <20051102174346.GA2370@lucon.org> <4368FE31.7080300@redhat.com>
On Wed, Nov 02, 2005 at 09:58:09AM -0800, Ulrich Drepper wrote:
> H. J. Lu wrote:
> > When an executabl is linked against libgcc_s.so, there is no need to
> > dlopen libgcc_s.so. This patch avoids unnecessary dlopen libgcc_s.so.
>
> For the price of six additional expensive relocations to be performed
> for every single executable. That's not acceptable.
I am not sure if it is more expensive than calling dlopen.
>
> If anything should change at all it is a change in the loading code
> which avoids allocation if the object is already loaded. That's
> sufficiently easy: add a flag to the open code, search for the object in
> the open code. If found and the new flag is set, make sure the object
> cannot be unloaded. Then return a descriptor for this object and have
> it used. Maybe existing memory can be used or a pointer to existing
> memory is passed down, I cannot say without looking at the code.
>
I will see what I can do.
H.J.