mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 06:30:05 +00:00
Update.
2001-09-18 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (ptmalloc_init): Handle _environ==NULL. Reported by B. D. Elliott <bde@nwlink.com> [PR libc/2541]. 2001-09-18 Andreas Schwab <schwab@suse.de> * elf/dl-load.c (_dl_map_object_from_fd): Update handling of scope list, now that l_scope is a pointer. * elf/dl-open.c (dl_open_worker): Fix thinko when enlarging the scope list. 2001-09-18 kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h (elf_machine_rela): Fix reverse condition. (elf_machine_rela_relative): Add a missing declaration. 2001-09-18 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/configure.in: Add ia64 and s390 ldd-rewrite scripts. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * elf/ldd.bash.in: Update copyright message. 2001-09-17 H.J. Lu <hjl@gnu.org> * hurd/hurdmalloc.c (bcopy): Removed. (realloc): Replace bcopy with memcpy. * hurd/path-lookup.c (file_name_path_scan): Likewise. * resolv/gethnamaddr.c (map_v4v6_address): Likewise. * sunrpc/rpcinfo.c (pmapdump): Likewise. * resolv/gethnamaddr.c (getanswer): Replace bcopy with memmove. (gethostbyaddr): Likewise. * sunrpc/rpcinfo.c (get_inet_address): Likewise. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/eval.c: Removed.
This commit is contained in:
parent
013ed6739f
commit
9596d0ddf0
45
ChangeLog
45
ChangeLog
@ -1,3 +1,48 @@
|
|||||||
|
2001-09-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (ptmalloc_init): Handle _environ==NULL.
|
||||||
|
Reported by B. D. Elliott <bde@nwlink.com> [PR libc/2541].
|
||||||
|
|
||||||
|
2001-09-18 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* elf/dl-load.c (_dl_map_object_from_fd): Update handling of scope
|
||||||
|
list, now that l_scope is a pointer.
|
||||||
|
|
||||||
|
* elf/dl-open.c (dl_open_worker): Fix thinko when enlarging the
|
||||||
|
scope list.
|
||||||
|
|
||||||
|
2001-09-18 kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
|
* sysdeps/sh/dl-machine.h (elf_machine_rela): Fix reverse condition.
|
||||||
|
(elf_machine_rela_relative): Add a missing declaration.
|
||||||
|
|
||||||
|
2001-09-18 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: New.
|
||||||
|
* sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed: New.
|
||||||
|
* sysdeps/unix/sysv/linux/configure.in: Add ia64 and s390
|
||||||
|
ldd-rewrite scripts.
|
||||||
|
|
||||||
|
2001-09-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/ldd.bash.in: Update copyright message.
|
||||||
|
|
||||||
|
2001-09-17 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* hurd/hurdmalloc.c (bcopy): Removed.
|
||||||
|
(realloc): Replace bcopy with memcpy.
|
||||||
|
* hurd/path-lookup.c (file_name_path_scan): Likewise.
|
||||||
|
* resolv/gethnamaddr.c (map_v4v6_address): Likewise.
|
||||||
|
* sunrpc/rpcinfo.c (pmapdump): Likewise.
|
||||||
|
|
||||||
|
* resolv/gethnamaddr.c (getanswer): Replace bcopy with memmove.
|
||||||
|
(gethostbyaddr): Likewise.
|
||||||
|
* sunrpc/rpcinfo.c (get_inet_address): Likewise.
|
||||||
|
|
||||||
|
2001-09-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/gnu/eval.c: Removed.
|
||||||
|
|
||||||
2001-09-18 Andreas Jaeger <aj@suse.de>
|
2001-09-18 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* sysdeps/i386/fpu/s_logbl.S: Move to ...
|
* sysdeps/i386/fpu/s_logbl.S: Move to ...
|
||||||
|
@ -1136,7 +1136,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
|
|||||||
|
|
||||||
/* Now move the existing entries one back. */
|
/* Now move the existing entries one back. */
|
||||||
memmove (&l->l_scope[1], &l->l_scope[0],
|
memmove (&l->l_scope[1], &l->l_scope[0],
|
||||||
sizeof (l->l_scope) - sizeof (l->l_scope[0]));
|
(l->l_scope_max - 1) * sizeof (l->l_scope[0]));
|
||||||
|
|
||||||
/* Now add the new entry. */
|
/* Now add the new entry. */
|
||||||
l->l_scope[0] = &l->l_symbolic_searchlist;
|
l->l_scope[0] = &l->l_symbolic_searchlist;
|
||||||
|
@ -312,7 +312,7 @@ dl_open_worker (void *a)
|
|||||||
++runp;
|
++runp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__builtin_expect (cnt + 1 < imap->l_scope_max, 0))
|
if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0))
|
||||||
{
|
{
|
||||||
/* The 'r_scope' array is too small. Allocate a new one
|
/* The 'r_scope' array is too small. Allocate a new one
|
||||||
dynamically. */
|
dynamically. */
|
||||||
@ -327,7 +327,7 @@ dl_open_worker (void *a)
|
|||||||
_dl_signal_error (ENOMEM, "dlopen", NULL,
|
_dl_signal_error (ENOMEM, "dlopen", NULL,
|
||||||
N_("cannot create scope list"));
|
N_("cannot create scope list"));
|
||||||
imap->l_scope = memcpy (newp, imap->l_scope,
|
imap->l_scope = memcpy (newp, imap->l_scope,
|
||||||
cnt * imap->l_scope_max);
|
cnt * sizeof (imap->l_scope[0]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -339,10 +339,10 @@ dl_open_worker (void *a)
|
|||||||
N_("cannot create scope list"));
|
N_("cannot create scope list"));
|
||||||
imap->l_scope = newp;
|
imap->l_scope = newp;
|
||||||
}
|
}
|
||||||
|
|
||||||
imap->l_scope[cnt++] = &new->l_searchlist;
|
|
||||||
imap->l_scope[cnt] = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imap->l_scope[cnt++] = &new->l_searchlist;
|
||||||
|
imap->l_scope[cnt] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run the initializer functions of new objects. */
|
/* Run the initializer functions of new objects. */
|
||||||
|
@ -36,7 +36,7 @@ while test $# -gt 0; do
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
--vers | --versi | --versio | --version)
|
--vers | --versi | --versio | --version)
|
||||||
echo 'ldd (GNU libc) @VERSION@'
|
echo 'ldd (GNU libc) @VERSION@'
|
||||||
echo $"Copyright (C) 1999 Free Software Foundation, Inc.
|
echo $"Copyright (C) 2001 Free Software Foundation, Inc.
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
Written by Roland McGrath and Ulrich Drepper."
|
Written by Roland McGrath and Ulrich Drepper."
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define bcopy(s,d,n) memcpy ((d), (s), (n)) /* No overlap handling. */
|
|
||||||
|
|
||||||
#include "hurdmalloc.h" /* XXX see that file */
|
#include "hurdmalloc.h" /* XXX see that file */
|
||||||
|
|
||||||
#include <mach.h>
|
#include <mach.h>
|
||||||
@ -37,6 +35,10 @@
|
|||||||
/*
|
/*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.15 2001/09/19 03:04:09 drepper
|
||||||
|
* (bcopy): Removed.
|
||||||
|
* (realloc): Replace bcopy with memcpy.
|
||||||
|
*
|
||||||
* Revision 1.14 2001/04/01 05:03:14 roland
|
* Revision 1.14 2001/04/01 05:03:14 roland
|
||||||
* 2001-03-11 Roland McGrath <roland@frob.com>
|
* 2001-03-11 Roland McGrath <roland@frob.com>
|
||||||
*
|
*
|
||||||
@ -422,8 +424,8 @@ realloc(old_base, new_size)
|
|||||||
*/
|
*/
|
||||||
new_base = malloc(new_size);
|
new_base = malloc(new_size);
|
||||||
if (new_base)
|
if (new_base)
|
||||||
bcopy(old_base, new_base,
|
memcpy (new_base, old_base,
|
||||||
(int) (old_size < new_size ? old_size : new_size));
|
(int) (old_size < new_size ? old_size : new_size));
|
||||||
|
|
||||||
if (new_base || new_size == 0)
|
if (new_base || new_size == 0)
|
||||||
/* Free OLD_BASE, but only if the malloc didn't fail. */
|
/* Free OLD_BASE, but only if the malloc didn't fail. */
|
||||||
|
@ -55,10 +55,10 @@ file_name_path_scan (const char *file_name, const char *path,
|
|||||||
if (pfx_len == 0)
|
if (pfx_len == 0)
|
||||||
pfxed_name[pfx_len++] = '.';
|
pfxed_name[pfx_len++] = '.';
|
||||||
else
|
else
|
||||||
bcopy (path, pfxed_name, pfx_len);
|
memcpy (pfxed_name, path, pfx_len);
|
||||||
if (pfxed_name[pfx_len - 1] != '/')
|
if (pfxed_name[pfx_len - 1] != '/')
|
||||||
pfxed_name[pfx_len++] = '/';
|
pfxed_name[pfx_len++] = '/';
|
||||||
bcopy (file_name, pfxed_name + pfx_len, file_name_len + 1);
|
memcpy (pfxed_name + pfx_len, file_name, file_name_len + 1);
|
||||||
|
|
||||||
err = (*fun)(pfxed_name);
|
err = (*fun)(pfxed_name);
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
|
@ -1766,49 +1766,49 @@ ptmalloc_init __MALLOC_P((void))
|
|||||||
secure = __libc_enable_secure;
|
secure = __libc_enable_secure;
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
s = NULL;
|
s = NULL;
|
||||||
{
|
if (_environ != NULL)
|
||||||
char **runp = _environ;
|
{
|
||||||
char *envline;
|
char **runp = _environ;
|
||||||
|
char *envline;
|
||||||
|
|
||||||
while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL,
|
while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL, 0))
|
||||||
0))
|
{
|
||||||
{
|
size_t len = strcspn (envline, "=");
|
||||||
size_t len = strcspn (envline, "=");
|
|
||||||
|
|
||||||
if (envline[len] != '=')
|
if (envline[len] != '=')
|
||||||
/* This is a "MALLOC_" variable at the end of the string
|
/* This is a "MALLOC_" variable at the end of the string
|
||||||
without a '=' character. Ignore it since otherwise we
|
without a '=' character. Ignore it since otherwise we
|
||||||
will access invalid memory below. */
|
will access invalid memory below. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (len)
|
switch (len)
|
||||||
{
|
{
|
||||||
case 6:
|
case 6:
|
||||||
if (memcmp (envline, "CHECK_", 6) == 0)
|
if (memcmp (envline, "CHECK_", 6) == 0)
|
||||||
s = &envline[7];
|
s = &envline[7];
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0)
|
if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0)
|
||||||
mALLOPt(M_TOP_PAD, atoi(&envline[9]));
|
mALLOPt(M_TOP_PAD, atoi(&envline[9]));
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
|
if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
|
||||||
mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
|
mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
if (! secure)
|
if (! secure)
|
||||||
{
|
{
|
||||||
if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0)
|
if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0)
|
||||||
mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16]));
|
mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16]));
|
||||||
else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0)
|
else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0)
|
||||||
mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16]));
|
mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16]));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (! secure)
|
if (! secure)
|
||||||
{
|
{
|
||||||
|
@ -441,7 +441,7 @@ getanswer(answer, anslen, qname, qtype)
|
|||||||
cp += n;
|
cp += n;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bcopy(cp, *hap++ = bp, n);
|
memmove(*hap++ = bp, cp, n);
|
||||||
bp += n;
|
bp += n;
|
||||||
buflen -= n;
|
buflen -= n;
|
||||||
cp += n;
|
cp += n;
|
||||||
@ -738,7 +738,7 @@ gethostbyaddr(addr, len, af)
|
|||||||
#endif /*SUNSECURITY*/
|
#endif /*SUNSECURITY*/
|
||||||
hp->h_addrtype = af;
|
hp->h_addrtype = af;
|
||||||
hp->h_length = len;
|
hp->h_length = len;
|
||||||
bcopy(addr, host_addr, len);
|
memmove(host_addr, addr, len);
|
||||||
h_addr_ptrs[0] = (char *)host_addr;
|
h_addr_ptrs[0] = (char *)host_addr;
|
||||||
h_addr_ptrs[1] = NULL;
|
h_addr_ptrs[1] = NULL;
|
||||||
if (af == AF_INET && (_res.options & RES_USE_INET6)) {
|
if (af == AF_INET && (_res.options & RES_USE_INET6)) {
|
||||||
@ -899,14 +899,14 @@ map_v4v6_address(src, dst)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Stash a temporary copy so our caller can update in place. */
|
/* Stash a temporary copy so our caller can update in place. */
|
||||||
bcopy(src, tmp, INADDRSZ);
|
memcpy(tmp, src, INADDRSZ);
|
||||||
/* Mark this ipv6 addr as a mapped ipv4. */
|
/* Mark this ipv6 addr as a mapped ipv4. */
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
*p++ = 0x00;
|
*p++ = 0x00;
|
||||||
*p++ = 0xff;
|
*p++ = 0xff;
|
||||||
*p++ = 0xff;
|
*p++ = 0xff;
|
||||||
/* Retrieve the saved copy and we're done. */
|
/* Retrieve the saved copy and we're done. */
|
||||||
bcopy(tmp, (void*)p, INADDRSZ);
|
memcpy((void*)p, tmp, INADDRSZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -542,8 +542,8 @@ pmapdump (argc, argv)
|
|||||||
bzero ((char *) &server_addr, sizeof server_addr);
|
bzero ((char *) &server_addr, sizeof server_addr);
|
||||||
server_addr.sin_family = AF_INET;
|
server_addr.sin_family = AF_INET;
|
||||||
if ((hp = gethostbyname ("localhost")) != NULL)
|
if ((hp = gethostbyname ("localhost")) != NULL)
|
||||||
bcopy (hp->h_addr, (caddr_t) & server_addr.sin_addr,
|
memcpy ((caddr_t) & server_addr.sin_addr, hp->h_addr,
|
||||||
hp->h_length);
|
hp->h_length);
|
||||||
else
|
else
|
||||||
server_addr.sin_addr.s_addr = inet_addr ("0.0.0.0");
|
server_addr.sin_addr.s_addr = inet_addr ("0.0.0.0");
|
||||||
}
|
}
|
||||||
@ -733,7 +733,7 @@ get_inet_address (addr, host)
|
|||||||
host);
|
host);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
bcopy (hp->h_addr, (char *) &addr->sin_addr, hp->h_length);
|
memmove ((char *) &addr->sin_addr, hp->h_addr, hp->h_length);
|
||||||
}
|
}
|
||||||
addr->sin_family = AF_INET;
|
addr->sin_family = AF_INET;
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#ifndef RTLD_BOOTSTRAP
|
||||||
else if (__builtin_expect (r_type != R_SH_NONE, 0))
|
else if (__builtin_expect (r_type == R_SH_NONE, 0))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
@ -561,6 +561,8 @@ static inline void
|
|||||||
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
||||||
Elf32_Addr *const reloc_addr)
|
Elf32_Addr *const reloc_addr)
|
||||||
{
|
{
|
||||||
|
Elf32_Addr value;
|
||||||
|
|
||||||
if (reloc->r_addend)
|
if (reloc->r_addend)
|
||||||
value = l_addr + reloc->r_addend;
|
value = l_addr + reloc->r_addend;
|
||||||
else
|
else
|
||||||
|
6
sysdeps/unix/sysv/linux/configure
vendored
6
sysdeps/unix/sysv/linux/configure
vendored
@ -189,6 +189,12 @@ case "$machine" in
|
|||||||
i[3456]86* | m68*)
|
i[3456]86* | m68*)
|
||||||
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
||||||
;;
|
;;
|
||||||
|
ia64*)
|
||||||
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
|
||||||
|
;;
|
||||||
|
s390*)
|
||||||
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
|
||||||
|
;;
|
||||||
sparc*)
|
sparc*)
|
||||||
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
|
||||||
;;
|
;;
|
||||||
|
@ -157,6 +157,12 @@ case "$machine" in
|
|||||||
i[3456]86* | m68*)
|
i[3456]86* | m68*)
|
||||||
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
||||||
;;
|
;;
|
||||||
|
ia64*)
|
||||||
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
|
||||||
|
;;
|
||||||
|
s390*)
|
||||||
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
|
||||||
|
;;
|
||||||
sparc*)
|
sparc*)
|
||||||
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
|
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
|
||||||
;;
|
;;
|
||||||
|
1
sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
Normal file
1
sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
Normal file
@ -0,0 +1 @@
|
|||||||
|
s_^\(RTLDLIST=\)\([^ ]*\)\(\|-ia64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\4 \2\4"_
|
1
sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
Normal file
1
sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
Normal file
@ -0,0 +1 @@
|
|||||||
|
s_^\(RTLDLIST=\)\([^ ]*\)\(\|64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4 \264\4"_
|
Loading…
Reference in New Issue
Block a user