PATCH: Avoid unnecessary dlopen libgcc_s.so

Ulrich Drepper drepper@redhat.com
Wed Nov 2 17:59:00 GMT 2005


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.

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.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20051102/8b5c3e20/attachment.sig>


More information about the Libc-alpha mailing list