1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
* include/link.h (struct link_map): Add l_soname_added bitfield.
	* elf/dl-load.c (_dl_map_object): Remember when we added the
	SONAME to the l_libname list and don't try it again.
This commit is contained in:
Ulrich Drepper
2000-10-21 06:32:16 +00:00
parent 8699e7b1da
commit c91bc73e3e
3 changed files with 9 additions and 1 deletions

View File

@ -1413,7 +1413,8 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
{
const char *soname;
if (l->l_info[DT_SONAME] == NULL)
if (__builtin_expect (l->l_soname_added, 1)
|| l->l_info[DT_SONAME] == NULL)
continue;
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
@ -1423,6 +1424,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
/* We have a match on a new name -- cache it. */
add_name_to_object (l, soname);
l->l_soname_added = 1;
}
/* We have a match -- bump the reference count and return it. */