mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
2003-10-15 Jakub Jelinek <jakub@redhat.com> * elf/rtld.c (print_statistics): Print also number of relative relocations.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2003-10-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* elf/rtld.c (print_statistics): Print also number of relative
|
||||||
|
relocations.
|
||||||
|
|
||||||
2003-10-12 Carlos O'Donell <carlos@baldric.uwo.ca>
|
2003-10-12 Carlos O'Donell <carlos@baldric.uwo.ca>
|
||||||
|
|
||||||
* sysdeps/hppa/sysdep.h: Undef JUMPTARGET before use.
|
* sysdeps/hppa/sysdep.h: Undef JUMPTARGET before use.
|
||||||
|
20
elf/rtld.c
20
elf/rtld.c
@@ -2120,10 +2120,30 @@ print_statistics (void)
|
|||||||
buf, pbuf);
|
buf, pbuf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned long int num_relative_relocations = 0;
|
||||||
|
struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
for (i = 0; i < scope->r_nlist; i++)
|
||||||
|
{
|
||||||
|
struct link_map *l = scope->r_list [i];
|
||||||
|
|
||||||
|
if (!l->l_addr)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (l->l_info[VERSYMIDX (DT_RELCOUNT)])
|
||||||
|
num_relative_relocations += l->l_info[VERSYMIDX (DT_RELCOUNT)]->d_un.d_val;
|
||||||
|
if (l->l_info[VERSYMIDX (DT_RELACOUNT)])
|
||||||
|
num_relative_relocations += l->l_info[VERSYMIDX (DT_RELACOUNT)]->d_un.d_val;
|
||||||
|
}
|
||||||
|
|
||||||
INTUSE(_dl_debug_printf) (" number of relocations: %lu\n",
|
INTUSE(_dl_debug_printf) (" number of relocations: %lu\n",
|
||||||
GL(dl_num_relocations));
|
GL(dl_num_relocations));
|
||||||
INTUSE(_dl_debug_printf) (" number of relocations from cache: %lu\n",
|
INTUSE(_dl_debug_printf) (" number of relocations from cache: %lu\n",
|
||||||
GL(dl_num_cache_relocations));
|
GL(dl_num_cache_relocations));
|
||||||
|
INTUSE(_dl_debug_printf) (" number of relative relocations: %lu\n",
|
||||||
|
num_relative_relocations);
|
||||||
|
|
||||||
#ifndef HP_TIMING_NONAVAIL
|
#ifndef HP_TIMING_NONAVAIL
|
||||||
/* Time spend while loading the object and the dependencies. */
|
/* Time spend while loading the object and the dependencies. */
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
|
||||||
|
|
||||||
|
* pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
|
||||||
|
(__pthread_find_self): Likewise.
|
||||||
|
* manager.c (thread_segment): _STACK_GROWS_UP case added.
|
||||||
|
|
||||||
2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
|
2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
|
||||||
|
|
||||||
* linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
|
* linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
|
||||||
|
@@ -70,8 +70,13 @@ static pthread_descr manager_thread;
|
|||||||
#else
|
#else
|
||||||
static inline pthread_descr thread_segment(int seg)
|
static inline pthread_descr thread_segment(int seg)
|
||||||
{
|
{
|
||||||
|
# ifdef _STACK_GROWS_UP
|
||||||
|
return (pthread_descr)(THREAD_STACK_START_ADDRESS + (seg - 1) * STACK_SIZE)
|
||||||
|
+ 1;
|
||||||
|
# else
|
||||||
return (pthread_descr)(THREAD_STACK_START_ADDRESS - (seg - 1) * STACK_SIZE)
|
return (pthread_descr)(THREAD_STACK_START_ADDRESS - (seg - 1) * STACK_SIZE)
|
||||||
- 1;
|
- 1;
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -893,7 +893,11 @@ pthread_descr __pthread_find_self(void)
|
|||||||
/* __pthread_handles[0] is the initial thread, __pthread_handles[1] is
|
/* __pthread_handles[0] is the initial thread, __pthread_handles[1] is
|
||||||
the manager threads handled specially in thread_self(), so start at 2 */
|
the manager threads handled specially in thread_self(), so start at 2 */
|
||||||
h = __pthread_handles + 2;
|
h = __pthread_handles + 2;
|
||||||
|
# ifdef _STACK_GROWS_UP
|
||||||
|
while (! (sp >= (char *) h->h_descr && sp < h->h_descr->p_guardaddr)) h++;
|
||||||
|
# else
|
||||||
while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom)) h++;
|
while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom)) h++;
|
||||||
|
# endif
|
||||||
return h->h_descr;
|
return h->h_descr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -908,12 +912,23 @@ pthread_descr __pthread_self_stack(void)
|
|||||||
return manager_thread;
|
return manager_thread;
|
||||||
h = __pthread_handles + 2;
|
h = __pthread_handles + 2;
|
||||||
# ifdef USE_TLS
|
# ifdef USE_TLS
|
||||||
|
# ifdef _STACK_GROWS_UP
|
||||||
|
while (h->h_descr == NULL
|
||||||
|
|| ! (sp >= h->h_descr->p_stackaddr && sp < h->h_descr->p_guardaddr))
|
||||||
|
h++;
|
||||||
|
# else
|
||||||
while (h->h_descr == NULL
|
while (h->h_descr == NULL
|
||||||
|| ! (sp <= (char *) h->h_descr->p_stackaddr && sp >= h->h_bottom))
|
|| ! (sp <= (char *) h->h_descr->p_stackaddr && sp >= h->h_bottom))
|
||||||
h++;
|
h++;
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
|
# ifdef _STACK_GROWS_UP
|
||||||
|
while (! (sp >= (char *) h->h_descr && sp < h->h_descr->p_guardaddr))
|
||||||
|
h++;
|
||||||
|
# else
|
||||||
while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom))
|
while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom))
|
||||||
h++;
|
h++;
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
return h->h_descr;
|
return h->h_descr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user