aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-deps.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-04-03 17:13:51 +0000
committerRoland McGrath <roland@gnu.org>2000-04-03 17:13:51 +0000
commitc6d80202830057548b130381c214ddb383fccd5d (patch)
tree1b5cc503acb22f56e94fa86a9c415a32b914988b /elf/dl-deps.c
parent9129b9874db71c9325ee0772810fee8a5e4a82f8 (diff)
downloadglibc-c6d80202830057548b130381c214ddb383fccd5d.zip
glibc-c6d80202830057548b130381c214ddb383fccd5d.tar.gz
glibc-c6d80202830057548b130381c214ddb383fccd5d.tar.bz2
* sysdeps/mach/hurd/i386/init-first.c (init): Don't set __environ
here, before we might move the stack. (posixland_init): Set __libc_argc, __libc_argc, and __environ here. (init1): And not here. * sysdeps/i386/dl-machine.h (RTLD_START): Fix code broken by last change, to restore argc value in call-clobbered register after RTLD_START_SPECIAL_INIT, which will contain a call. * elf/dl-deps.c (_dl_map_object_deps): Fix size calculations for allocating and initializing L->l_initfini. * resolv/Makefile (headers): Add bits/netdb.h, so it gets installed.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r--elf/dl-deps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index dc372e6..899692e 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -449,12 +449,11 @@ _dl_map_object_deps (struct link_map *map,
{
needed[nneeded++] = NULL;
- l->l_initfini =
- (struct link_map **) malloc (nneeded * sizeof (struct link_map));
+ l->l_initfini = malloc (nneeded * sizeof needed[0]);
if (l->l_initfini == NULL)
_dl_signal_error (ENOMEM, map->l_name,
"cannot allocate dependency list");
- memcpy (l->l_initfini, needed, nneeded * sizeof (struct link_map));
+ memcpy (l->l_initfini, needed, nneeded * sizeof needed[0]);
}
/* If we have no auxiliary objects just go on to the next map. */