This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Avoid unnecessary dlopen libgcc_s.so


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]