about summary refs log tree commit diff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-09-01 06:10:36 +0000
committerUlrich Drepper <drepper@redhat.com>2001-09-01 06:10:36 +0000
commiteaad82e00522075b805621309775131e27388791 (patch)
tree0db8ddb46f2a278b5e766f9a62606dce3dd240a5 /elf/rtld.c
parentcb2391e14af26237a71729d7af2d9202fc22f12c (diff)
downloadglibc-eaad82e00522075b805621309775131e27388791.tar.gz
glibc-eaad82e00522075b805621309775131e27388791.tar.xz
glibc-eaad82e00522075b805621309775131e27388791.zip
Update.
2001-08-31  Richard Henderson  <rth@redhat.com>

	* elf/dl-support.c (_dl_cpuclock_offset): Protect with NONAVAIL.
	(HP_TIMING_AVAIL): Set to HP_SMALL_TIMING_AVAIL if present.
	* elf/rtld.c (HP_TIMING_AVAIL): Likewise.
	(print_statistics): Make scalar unsigned long long.
	* sysdeps/alpha/hp-timing.h: New file.

2001-08-31  Jakub Jelinek  <jakub@redhat.com>

	* stdio-common/perror.c (perror): Save errno early, pass it
	down to perror_internal.
	(perror_internal): Add errnum argument.

2001-08-31  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/alpha/dl-machine.h (elf_machine_rela): Remove unused code.
	Don't add old memory content for R_ALPHA_REFQUAD.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index fe521176e4..a01594a3ca 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -121,14 +121,20 @@ struct link_map _dl_rtld_map;
 struct libname_list _dl_rtld_libname;
 struct libname_list _dl_rtld_libname2;
 
+/* We expect less than a second for relocation.  */
+#ifdef HP_SMALL_TIMING_AVAIL
+# undef HP_TIMING_AVAIL
+# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL
+#endif
+
 /* Variable for statistics.  */
 #ifndef HP_TIMING_NONAVAIL
 static hp_timing_t rtld_total_time;
 static hp_timing_t relocate_time;
 static hp_timing_t load_time;
 #endif
-extern unsigned long int _dl_num_relocations;	/* in dl-lookup.c */
-extern unsigned long int _dl_num_cache_relocations;	/* in dl-lookup.c */
+extern unsigned long int _dl_num_relocations;		/* in dl-lookup.c */
+extern unsigned long int _dl_num_cache_relocations;	/* in dl-reloc.c */
 
 static ElfW(Addr) _dl_start_final (void *arg, struct link_map *bootstrap_map_p,
 				   hp_timing_t start_time);
@@ -136,7 +142,7 @@ static ElfW(Addr) _dl_start_final (void *arg, struct link_map *bootstrap_map_p,
 #ifdef RTLD_START
 RTLD_START
 #else
-#error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
+# error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
 #endif
 
 static ElfW(Addr)
@@ -1506,7 +1512,7 @@ print_statistics (void)
     {
       char pbuf[30];
       HP_TIMING_PRINT (buf, sizeof (buf), relocate_time);
-      cp = _itoa_word ((1000 * relocate_time) / rtld_total_time,
+      cp = _itoa_word ((1000ULL * relocate_time) / rtld_total_time,
 		       pbuf + sizeof (pbuf), 10, 0);
       wp = pbuf;
       switch (pbuf + sizeof (pbuf) - cp)
@@ -1535,7 +1541,7 @@ print_statistics (void)
     {
       char pbuf[30];
       HP_TIMING_PRINT (buf, sizeof (buf), load_time);
-      cp = _itoa_word ((1000 * load_time) / rtld_total_time,
+      cp = _itoa_word ((1000ULL * load_time) / rtld_total_time,
 		       pbuf + sizeof (pbuf), 10, 0);
       wp = pbuf;
       switch (pbuf + sizeof (pbuf) - cp)