mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Fix warning in __dl_iterate_phdr
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2011-11-12 Ulrich Drepper <drepper@gmail.com>
|
2011-11-12 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
|
* elf/dl-iteratephdr.c [!SHARED] (__dl_iterate_phdr): Don't iterate
|
||||||
|
over namespaces.
|
||||||
|
|
||||||
* sunrpc/rpc_prot.c (rejected): Fix case value.
|
* sunrpc/rpc_prot.c (rejected): Fix case value.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS): Use
|
* sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS): Use
|
||||||
|
@@ -44,9 +44,10 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
|
|||||||
|
|
||||||
/* We have to determine the namespace of the caller since this determines
|
/* We have to determine the namespace of the caller since this determines
|
||||||
which namespace is reported. */
|
which namespace is reported. */
|
||||||
const void *caller = RETURN_ADDRESS (0);
|
|
||||||
size_t nloaded = GL(dl_ns)[0]._ns_nloaded;
|
size_t nloaded = GL(dl_ns)[0]._ns_nloaded;
|
||||||
Lmid_t ns = 0;
|
Lmid_t ns = 0;
|
||||||
|
#ifdef SHARED
|
||||||
|
const void *caller = RETURN_ADDRESS (0);
|
||||||
for (Lmid_t cnt = GL(dl_nns) - 1; cnt > 0; --cnt)
|
for (Lmid_t cnt = GL(dl_nns) - 1; cnt > 0; --cnt)
|
||||||
for (struct link_map *l = GL(dl_ns)[cnt]._ns_loaded; l; l = l->l_next)
|
for (struct link_map *l = GL(dl_ns)[cnt]._ns_loaded; l; l = l->l_next)
|
||||||
{
|
{
|
||||||
@@ -59,6 +60,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
|
|||||||
|| _dl_addr_inside_object (l, (ElfW(Addr)) caller)))
|
|| _dl_addr_inside_object (l, (ElfW(Addr)) caller)))
|
||||||
ns = cnt;
|
ns = cnt;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user