about summary refs log tree commit diff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-30 18:45:41 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-30 18:45:41 +0000
commite8e0bee5dd414bb6d5ee7e6a1fa37f330dcb38e4 (patch)
tree2a22ed2642b6dc5da6474928ca51dfea783d5c5b /elf/dl-open.c
parent001426b8993e21615a756fcabcbead8a62a2125c (diff)
downloadglibc-e8e0bee5dd414bb6d5ee7e6a1fa37f330dcb38e4.tar.gz
glibc-e8e0bee5dd414bb6d5ee7e6a1fa37f330dcb38e4.tar.xz
glibc-e8e0bee5dd414bb6d5ee7e6a1fa37f330dcb38e4.zip
Update.
1998-03-30  Ulrich Drepper  <drepper@cygnus.com>

	* 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  <hjl@gnu.org>

	* 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.
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c8
1 files changed, 5 insertions, 3 deletions
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 -