PATCH: Avoid unnecessary dlopen libgcc_s.so
H. J. Lu
hjl@lucon.org
Wed Nov 2 19:07:00 GMT 2005
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.
More information about the Libc-alpha
mailing list