aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-01 07:49:47 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-01 07:49:47 +0000
commitccdf0cab1d670a05afff42b02c7583ccd23abde9 (patch)
tree728f8fc2797a2de2b94a0481b3af4c462e65fc7a /elf
parent5688da55372193e5941f0240e6ea759d28483970 (diff)
downloadglibc-ccdf0cab1d670a05afff42b02c7583ccd23abde9.tar
glibc-ccdf0cab1d670a05afff42b02c7583ccd23abde9.tar.gz
glibc-ccdf0cab1d670a05afff42b02c7583ccd23abde9.tar.bz2
glibc-ccdf0cab1d670a05afff42b02c7583ccd23abde9.zip
Update.
* elf/dl-minimal.c: Define _itoa for 32-bit machines with HP timing. * elf/dl-reloc.c: Pretty printing. * sysdeps/generic/ldsodefs.h: Move _dl_hp_timing_overhead and procinfo-related variables in rtld_global struct. * elf/dl-support.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/i386/i686/Makefile: Likewise. * sysdeps/i386/i686/hp-timing.c: Likewise. * sysdeps/i386/i686/hp-timing.h: Likewise. * sysdeps/ia64/Makefile: Likewise. * sysdeps/ia64/hp-timing.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/Makefile: Likewise. * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. * sysdeps/unix/sysv/linux/arm/dl-procinfo.c: Likewise. * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise. * sysdeps/x86_64/Makefile: Likewise.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-minimal.c23
-rw-r--r--elf/dl-reloc.c2
-rw-r--r--elf/dl-support.c3
-rw-r--r--elf/rtld.c2
4 files changed, 29 insertions, 1 deletions
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 12e9d69ff7..001fc6dcd5 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -268,3 +268,26 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group)
*endptr = (char *) nptr;
return result * sign;
}
+
+
+#if HP_TIMING_AVAIL && ULONG_MAX <= 4294967295UL
+/* We need this function to print the cycle count. On 64-bit machines the
+ _itoa_word function should be used. */
+char *
+_itoa (value, buflim, base, upper_case)
+ unsigned long long int value;
+ char *buflim;
+ unsigned int base;
+ int upper_case;
+{
+ char *bp = buflim;
+
+ assert (base == 10);
+
+ do
+ *--bp = '0' + value % 10;
+ while ((value /= 10) != 0);
+
+ return bp;
+}
+#endif
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index a3ee153b84..8fea3fd778 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -138,7 +138,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
(ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
&& elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
- ? (bump_num_cache_relocations (), \
+ ? (bump_num_cache_relocations (), \
(*ref) = l->l_lookup_cache.ret, \
l->l_lookup_cache.value) \
: ({ lookup_t _lr; \
diff --git a/elf/dl-support.c b/elf/dl-support.c
index b78b79d6d9..9a9436e498 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -91,6 +91,9 @@ struct r_scope_elem *_dl_main_searchlist = &_dl_initial_searchlist;
/* Nonzero during startup. */
int _dl_starting_up = 1;
+/* Get architecture specific initializer. */
+#include <dl-procinfo.c>
+
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
diff --git a/elf/rtld.c b/elf/rtld.c
index e4c2c6e0ad..af7b27fe24 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -74,6 +74,8 @@ int _dl_starting_up;
(except those which cannot be added for some reason). */
struct rtld_global _rtld_global =
{
+ /* Get architecture specific initializer. */
+#include <dl-procinfo.c>
._dl_debug_fd = STDERR_FILENO,
#if 1
/* XXX I know about at least one case where we depend on the old