mirror of git://sourceware.org/git/glibc.git
Update.
* include/link.h (struct link_map): New bit field l_faked. * elf/dl-deps.c: Use l_faked field in struct link_map instead of the magic l_opencount==0. * elf/dl-load.c: Likewise. * elf/dl-version.c: Likewise. * elf/rtld.c: Likewise.
This commit is contained in:
parent
c41c89d35d
commit
a881e0a074
|
|
@ -1,5 +1,12 @@
|
||||||
2000-10-23 Ulrich Drepper <drepper@redhat.com>
|
2000-10-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* include/link.h (struct link_map): New bit field l_faked.
|
||||||
|
* elf/dl-deps.c: Use l_faked field in struct link_map instead of
|
||||||
|
the magic l_opencount==0.
|
||||||
|
* elf/dl-load.c: Likewise.
|
||||||
|
* elf/dl-version.c: Likewise.
|
||||||
|
* elf/rtld.c: Likewise.
|
||||||
|
|
||||||
* elf/dl-close.c (_dl_close): Add a few more __builtin_expect.
|
* elf/dl-close.c (_dl_close): Add a few more __builtin_expect.
|
||||||
|
|
||||||
2000-10-23 Jim Meyering <meyering@ascend.com>
|
2000-10-23 Jim Meyering <meyering@ascend.com>
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,7 @@ _dl_map_object_deps (struct link_map *map,
|
||||||
|
|
||||||
for (nlist = 0, runp = known; runp; runp = runp->unique)
|
for (nlist = 0, runp = known; runp; runp = runp->unique)
|
||||||
{
|
{
|
||||||
if (trace_mode && runp->map->l_opencount == 0)
|
if (trace_mode && runp->map->l_faked)
|
||||||
/* This can happen when we trace the loading. */
|
/* This can happen when we trace the loading. */
|
||||||
--map->l_searchlist.r_nlist;
|
--map->l_searchlist.r_nlist;
|
||||||
else
|
else
|
||||||
|
|
@ -516,7 +516,7 @@ _dl_map_object_deps (struct link_map *map,
|
||||||
map->l_searchlist.r_duplist = map->l_searchlist.r_list + nlist;
|
map->l_searchlist.r_duplist = map->l_searchlist.r_list + nlist;
|
||||||
|
|
||||||
for (cnt = 0, runp = known; runp; runp = runp->dup)
|
for (cnt = 0, runp = known; runp; runp = runp->dup)
|
||||||
if (trace_mode && runp->map->l_opencount == 0)
|
if (trace_mode && runp->map->l_faked)
|
||||||
/* This can happen when we trace the loading. */
|
/* This can happen when we trace the loading. */
|
||||||
--map->l_searchlist.r_nduplist;
|
--map->l_searchlist.r_nduplist;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1679,10 +1679,10 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
|
||||||
|| (l = _dl_new_object (name_copy, name, type, loader)) == NULL)
|
|| (l = _dl_new_object (name_copy, name, type, loader)) == NULL)
|
||||||
_dl_signal_error (ENOMEM, name,
|
_dl_signal_error (ENOMEM, name,
|
||||||
N_("cannot create shared object descriptor"));
|
N_("cannot create shared object descriptor"));
|
||||||
/* We use an opencount of 0 as a sign for the faked entry.
|
/* Signal that this is a faked entry. */
|
||||||
Since the descriptor is initialized with zero we do not
|
l->l_faked = 1;
|
||||||
|
/* Since the descriptor is initialized with zero we do not
|
||||||
have do this here.
|
have do this here.
|
||||||
l->l_opencount = 0;
|
|
||||||
l->l_reserved = 0; */
|
l->l_reserved = 0; */
|
||||||
l->l_buckets = &dummy_bucket;
|
l->l_buckets = &dummy_bucket;
|
||||||
l->l_nbuckets = 1;
|
l->l_nbuckets = 1;
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
|
||||||
/* Make sure this is no stub we created because of a missing
|
/* Make sure this is no stub we created because of a missing
|
||||||
dependency. */
|
dependency. */
|
||||||
if (__builtin_expect (! trace_mode, 1)
|
if (__builtin_expect (! trace_mode, 1)
|
||||||
|| __builtin_expect (needed->l_opencount, 1) != 0)
|
|| ! __builtin_expect (needed->l_faked, 0))
|
||||||
{
|
{
|
||||||
/* NEEDED is the map for the file we need. Now look for the
|
/* NEEDED is the map for the file we need. Now look for the
|
||||||
dependency symbols. */
|
dependency symbols. */
|
||||||
|
|
@ -375,8 +375,7 @@ _dl_check_all_versions (struct link_map *map, int verbose, int trace_mode)
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
for (l = map; l != NULL; l = l->l_next)
|
for (l = map; l != NULL; l = l->l_next)
|
||||||
result |= (l->l_opencount != 0
|
result |= ! l->l_faked && _dl_check_map_versions (l, verbose, trace_mode);
|
||||||
&& _dl_check_map_versions (l, verbose, trace_mode));
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -891,7 +891,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||||
struct link_map *l;
|
struct link_map *l;
|
||||||
|
|
||||||
for (l = _dl_loaded->l_next; l; l = l->l_next)
|
for (l = _dl_loaded->l_next; l; l = l->l_next)
|
||||||
if (l->l_opencount == 0)
|
if (l->l_faked)
|
||||||
/* The library was not found. */
|
/* The library was not found. */
|
||||||
_dl_sysdep_message ("\t", l->l_libname->name, " => not found\n",
|
_dl_sysdep_message ("\t", l->l_libname->name, " => not found\n",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
@ -948,7 +948,7 @@ of this helper program; chances are you did not intend to run this program.\n\
|
||||||
l = l->l_next;
|
l = l->l_next;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (l != &_dl_rtld_map && l->l_opencount > 0)
|
if (l != &_dl_rtld_map && ! l->l_faked)
|
||||||
{
|
{
|
||||||
args.l = l;
|
args.l = l;
|
||||||
_dl_receive_error (print_unresolved, relocate_doit,
|
_dl_receive_error (print_unresolved, relocate_doit,
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,8 @@ struct link_map
|
||||||
to by `l_phdr' is allocated. */
|
to by `l_phdr' is allocated. */
|
||||||
unsigned int l_soname_added:1; /* Nonzero if the SONAME is for sure in
|
unsigned int l_soname_added:1; /* Nonzero if the SONAME is for sure in
|
||||||
the l_libname list. */
|
the l_libname list. */
|
||||||
|
unsigned int l_faked:1; /* Nonzero if this is a faked descriptor
|
||||||
|
without associated file. */
|
||||||
|
|
||||||
/* Array with version names. */
|
/* Array with version names. */
|
||||||
unsigned int l_nversions;
|
unsigned int l_nversions;
|
||||||
|
|
@ -202,7 +204,7 @@ struct link_map
|
||||||
ElfW(Addr) l_map_start, l_map_end;
|
ElfW(Addr) l_map_start, l_map_end;
|
||||||
|
|
||||||
/* This is an array defining the lookup scope for this link map.
|
/* This is an array defining the lookup scope for this link map.
|
||||||
There are at most three different scope lists. */
|
There are at most three different scope lists. */
|
||||||
struct r_scope_elem *l_scope[4];
|
struct r_scope_elem *l_scope[4];
|
||||||
|
|
||||||
/* A similar array, this time only with the local scope. This is
|
/* A similar array, this time only with the local scope. This is
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue