From e8e0bee5dd414bb6d5ee7e6a1fa37f330dcb38e4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 30 Mar 1998 18:45:41 +0000 Subject: Update. 1998-03-30 Ulrich Drepper * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): New function. * sysdeps/generic/dl-procinfo.h (HWCAP_IMPORTANT): New definition. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_hwcap_string): New function. (HWCAP_IMPORTANT): New definition. 1998-03-30 17:26 H.J. Lu * elf/dl-open.c (_dl_open): Fix a typo. (_dl_global_scope_alloc): Make it static. * nss/getXXent_r.c (REENTRANT_GETNAME): Avoid endless loop. --- elf/dl-open.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'elf/dl-open.c') diff --git a/elf/dl-open.c b/elf/dl-open.c index 4bec833634..99fac81e13 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -37,7 +37,7 @@ extern char **__libc_argv; extern char **__environ; -size_t _dl_global_scope_alloc; +static size_t _dl_global_scope_alloc; /* During the program run we must not modify the global data of @@ -121,7 +121,8 @@ _dl_open (const char *file, int mode) { /* This is the first dynamic object given global scope. */ _dl_global_scope_alloc = 8; - _dl_global_scope = malloc (8 * sizeof (struct link_map *)); + _dl_global_scope = malloc (_dl_global_scope_alloc + * sizeof (struct link_map *)); if (! _dl_global_scope) { _dl_global_scope = _dl_default_scope; @@ -142,7 +143,8 @@ _dl_open (const char *file, int mode) { /* Must extend the list. */ struct link_map **new = realloc (_dl_global_scope, - _dl_global_scope_alloc * 2); + _dl_global_scope_alloc * 2 + * sizeof (struct link_map *)); if (! new) goto nomem; _dl_global_scope_end = new + (_dl_global_scope_end - -- cgit v1.2.3