1995-11-23 04:53:06 +00:00
|
|
|
|
/* Minimal replacements for basic facilities used in the dynamic linker.
|
2020-01-01 00:14:33 +00:00
|
|
|
|
Copyright (C) 1995-2020 Free Software Foundation, Inc.
|
update from main archive 961116
Sun Nov 17 03:13:57 1996 Ulrich Drepper <drepper@cygnus.com>
* db/makedb.c: Update and reformat copyright.
* elf/Makefile: Likewise.
* elf/dl-close.c: Likewise.
* elf/dl-debug.c: Likewise.
* elf/dl-deps.c: Likewise.
* elf/dl-error.c: Likewise.
* elf/dl-fini.c: Likewise.
* elf/dl-init.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/dl-minimal.c: Likewise.
* elf/dl-object.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/dl-reloc.c: Likewise.
* elf/dl-runtime.c: Likewise.
* elf/dl-support.c: Likewise.
* elf/dl-symbol.c: Likewise.
* elf/dladdr.c: Likewise.
* elf/dlclose.c: Likewise.
* elf/dlerror.c: Likewise.
* elf/dlopen.c: Likewise.
* elf/dlsym.c: Likewise.
* elf/do-rel.h: Likewise.
* elf/dynamic-link.h: Likewise.
* elf/eval.c: Likewise.
* elf/rtld.c: Likewise.
* inet/ether_hton.c: Likewise.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Likewise.
* inet/getnetgrent_r.c: Likewise.
* inet/Makefile (+gccwarn): Remove definition.
Instead set CFLAGS-rcmd.c, CFLAGS-rexec.c, and CFLAGS-ruserpass.c
to `-w'.
* inet/aliases.h: Add C++ protection.
* inet/ether_hton.c: Add prototype for __nss_ethers_lookup.
(ether_hostton): Remove unused variable result.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Include <ctype.h> and <string.h>.
* inet/getnetgrent_r.c: Include <stdlib.h>.
Use casts to prevent warnings.
(innetgr): Initialize `known' and `needed'.
* inet/inet_net.c: Make local variable `i' of type u_int32_t.
* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)) [NEED__RES]: Don't
return NULL. Instead set *RESULT to NULL and return -1.
* nss/getXXent_r.c (INTERNAL (REENTRANT_GETNAME)): Likewise.
(SETFUNC_NAME, ENDFUNC_NAME) [NEED__RES]: Don't return anything.
* nss/nss_files/files-alias.c: Debug function. I didn't worked at
all before.
Sat Nov 16 15:25:34 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/readv.c: Don't use PTR anymore.
* sysdeps/posix/writev.c: Likewise.
* version.h (VERSION): Bump to 1.98.
* nss/db-Makefile: Generate lines for getXXXent iteration.
* sysdeps/alpha/Dist: Don't distribute removed files divlu.S,
divqu.S, remlu.S, and remqu.S.
Fri Nov 15 08:55:54 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* posix/unistd.h: Correct typo in documentation.
Thu Nov 14 18:08:14 1996 a sun <asun@zoology.washington.edu>
* inet/netinet/tcp.h: Use __ protected versions instead of
BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN directly.
Sat Nov 16 13:44:55 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_msg_cat_cntr): Initialize so that
references in libc.so are not anymore undefined.
Sat Nov 16 18:17:36 1996 NIIBE Yutaka <gniibe@mri.co.jp>
* io/utime.h: Rename second parameter for utime to prevent warning
for -Wshadow.
* dirent/dirent.h: Same here for scandir prototype.
* math/mathcalls.h: Likewise for frexp and ldexp.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise for bindresvport.
Sat Nov 16 03:49:27 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/tst-strtod.c: Add test for error case below.
Sat Nov 16 03:48:39 1996 Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>
* stdlib/strtod.c: Recognize numbers like 0e-19.
Fri Nov 15 08:38:43 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* time/Makefile ($(installed-localtime-file)): Fix path to
rellns-sh.
* Makefile: Don't generate and install gnu/lib-names.h if
$(build-shared) is not `yes'.
Thu Nov 14 09:23:58 1996 H.J. Lu (hjl@gnu.ai.mit.edu)
* sysdeps/posix/Makefile ($(common-objpfx)mk-stdiolim): Depend
on $(..)posix/posix1_lim.h, not ../posix/posix1_lim.h.
* Makerules (REAL_MAKE_VERSION): New, use it instead of
MAKE_VERSION.
Thu Nov 14 22:10:43 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_files/files-XXX.x (_nss_files_get,ENTNAME_r): Fix typo.
* nss/getXXent_r.c: Fix typo. Set correct return value when
no further service is available.
Thu Nov 14 17:48:13 1996 Ulrich Drepper <drepper@cygnus.com>
* db/recno/rec_put.c: Add cast to avoid warning.
* db/recno/rec_close.c: Likewise.
* db/mpool/mpool.c: Likewise.
* db/hash/hash_bigkey.h: Likewise.
* db/hash/hash.c: Likewise.
* db/btree/bt_split.c: Likewise.
* db/btree/bt_put.c: Likewise.
Thu Nov 14 14:11:44 1996 Ulrich Drepper <drepper@cygnus.com>
* dirent/dirent.h: Update copyright.
* elf/elf.h: Likewise.
* elf/link.h: Likewise.
* gmon/sys/gmon_out.h: Likewise.
* gnu-versions.h: Likewise.
* intl/libintl.h: Likewise.
* io/fcntl.h: Likewise.
* io/ftw.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/utime.h: Likewise.
* locale/langinfo.h: Likewise.
* malloc/malloc.h: Likewise.
* malloc/obstack.h: Likewise.
* misc/ar.h: Likewise.
* misc/error.h: Likewise.
* misc/mntent.h: Likewise.
* misc/sgtty.h: Likewise.
* misc/sys/cdefs.h: Likewise.
* misc/sys/dir.h: Likewise.
* misc/sys/file.h: Likewise.
* misc/sys/ioctl.h: Likewise.
* misc/sys/ustat.h: Likewise.
* posix/fnmatch.h: Likewise.
* posix/getopt.h: Likewise.
* posix/glob.h: Likewise.
* posix/posix2_lim.h: Likewise.
* posix/regex.h: Likewise.
* posix/sys/times.h: Likewise.
* posix/sys/types.h: Likewise.
* posix/sys/utsname.h: Likewise.
* posix/tar.h: Likewise.
* posix/wordexp.h: Likewise.
* resource/sys/resource.h: Likewise.
* resource/sys/vlimit.h: Likewise.
* resource/sys/vtimes.h: Likewise.
* socket/sys/socket.h: Likewise.
* socket/sys/un.h: Likewise.
* stdio-common/printf.h: Likewise.
* stdlib/alloca.h: Likewise.
* string/argz.h: Likewise.
* string/endian.h: Likewise.
* string/envz.h: Likewise.
* string/memory.h: Likewise.
* string/strings.h: Likewise.
* sysdeps/generic/crypt.h: Likewise.
* sysdeps/generic/direntry.h: Likewise.
* sysdeps/generic/gnu/types.h: Likewise.
* sysdeps/generic/ioctl-types.h: Likewise.
* sysdeps/generic/netinet/in.h: Likewise.
* sysdeps/generic/resourcebits.h: Likewise.
* sysdeps/generic/sigset.h: Likewise.
* sysdeps/generic/sockaddrcom.h: Likewise.
* sysdeps/generic/sys/mman.h: Likewise.
* sysdeps/generic/sys/ptrace.h: Likewise.
* sysdeps/generic/termbits.h: Likewise.
* sysdeps/generic/waitstatus.h: Likewise.
* sysdeps/ieee754/huge_val.h: Likewise.
* sysdeps/ieee754/nan.h: Likewise.
* sysdeps/mach/hurd/local_lim.h: Likewise.
* sysdeps/mach/hurd/statbuf.h: Likewise.
* sysdeps/stub/huge_val.h: Likewise.
* sysdeps/stub/libc-lock.h: Likewise.
* sysdeps/stub/signum.h: Likewise.
* sysdeps/stub/statbuf.h: Likewise.
* sysdeps/stub/waitflags.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/sockaddrcom.h: Likewise.
* sysdeps/unix/bsd/osf/alpha/statbuf.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
* sysdeps/unix/bsd/signum.h: Likewise.
* sysdeps/unix/bsd/statbuf.h: Likewise.
* sysdeps/unix/bsd/sun/signum.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/resourcebits.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/termbits.h: Likewise.
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/waitflags.h: Likewise.
* sysdeps/unix/sysv/irix4/signum.h: Likewise.
* sysdeps/unix/sysv/irix4/statbuf.h: Likewise.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/direntry.h: Likewise.
* sysdeps/unix/sysv/linux/gnu/types.h: Likewise.
* sysdeps/unix/sysv/linux/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/local_lim.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* sysdeps/unix/sysv/linux/resourcebits.h: Likewise.
* sysdeps/unix/sysv/linux/signum.h: Likewise.
* sysdeps/unix/sysv/linux/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise.
* sysdeps/unix/sysv/linux/syscall.h: Likewise.
* sysdeps/unix/sysv/linux/termbits.h: Likewise.
* sysdeps/unix/sysv/local_lim.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/syscall.h: Likewise.
* sysdeps/unix/sysv/sco3.2/local_lim.h: Likewise.
* sysdeps/unix/sysv/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/i386/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/waitflags.h: Likewise.
* sysdeps/vax/huge_val.h: Likewise.
* values.h: Likewise.
Thu Nov 14 04:22:41 1996 Ulrich Drepper <drepper@cygnus.com>
* malloc/obstack.h: Use memcpy instead of bcopy and define a macro
`memcpy' using bcopy if memcpy is not available.
* manual/stdio.texi: Correct description of printf customization.
The argument info function is not optional anymore and the
interface for `printf_function' also changed.
* manual/examples/rprintf.c: Define and use argument info function.
* stdio-common/printf.h (struct printf_info): Change type for field
`pad' to wchar_t.
Correct comment for `register_printf_function'.
* nss/getXXbyYY.c [NEED_H_ERRNO]: Don't pass pointer to h_errno
to reentrant function. Instead use temporary variable and set
h_errno if an error occured.
Reported by NIIBE Yutaka.
are no bits set in the masks. Reported by baldazzi@csr.unibo.it.
1996-11-17 03:15:52 +00:00
|
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
update from main archive 961116
Sun Nov 17 03:13:57 1996 Ulrich Drepper <drepper@cygnus.com>
* db/makedb.c: Update and reformat copyright.
* elf/Makefile: Likewise.
* elf/dl-close.c: Likewise.
* elf/dl-debug.c: Likewise.
* elf/dl-deps.c: Likewise.
* elf/dl-error.c: Likewise.
* elf/dl-fini.c: Likewise.
* elf/dl-init.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/dl-minimal.c: Likewise.
* elf/dl-object.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/dl-reloc.c: Likewise.
* elf/dl-runtime.c: Likewise.
* elf/dl-support.c: Likewise.
* elf/dl-symbol.c: Likewise.
* elf/dladdr.c: Likewise.
* elf/dlclose.c: Likewise.
* elf/dlerror.c: Likewise.
* elf/dlopen.c: Likewise.
* elf/dlsym.c: Likewise.
* elf/do-rel.h: Likewise.
* elf/dynamic-link.h: Likewise.
* elf/eval.c: Likewise.
* elf/rtld.c: Likewise.
* inet/ether_hton.c: Likewise.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Likewise.
* inet/getnetgrent_r.c: Likewise.
* inet/Makefile (+gccwarn): Remove definition.
Instead set CFLAGS-rcmd.c, CFLAGS-rexec.c, and CFLAGS-ruserpass.c
to `-w'.
* inet/aliases.h: Add C++ protection.
* inet/ether_hton.c: Add prototype for __nss_ethers_lookup.
(ether_hostton): Remove unused variable result.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Include <ctype.h> and <string.h>.
* inet/getnetgrent_r.c: Include <stdlib.h>.
Use casts to prevent warnings.
(innetgr): Initialize `known' and `needed'.
* inet/inet_net.c: Make local variable `i' of type u_int32_t.
* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)) [NEED__RES]: Don't
return NULL. Instead set *RESULT to NULL and return -1.
* nss/getXXent_r.c (INTERNAL (REENTRANT_GETNAME)): Likewise.
(SETFUNC_NAME, ENDFUNC_NAME) [NEED__RES]: Don't return anything.
* nss/nss_files/files-alias.c: Debug function. I didn't worked at
all before.
Sat Nov 16 15:25:34 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/readv.c: Don't use PTR anymore.
* sysdeps/posix/writev.c: Likewise.
* version.h (VERSION): Bump to 1.98.
* nss/db-Makefile: Generate lines for getXXXent iteration.
* sysdeps/alpha/Dist: Don't distribute removed files divlu.S,
divqu.S, remlu.S, and remqu.S.
Fri Nov 15 08:55:54 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* posix/unistd.h: Correct typo in documentation.
Thu Nov 14 18:08:14 1996 a sun <asun@zoology.washington.edu>
* inet/netinet/tcp.h: Use __ protected versions instead of
BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN directly.
Sat Nov 16 13:44:55 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_msg_cat_cntr): Initialize so that
references in libc.so are not anymore undefined.
Sat Nov 16 18:17:36 1996 NIIBE Yutaka <gniibe@mri.co.jp>
* io/utime.h: Rename second parameter for utime to prevent warning
for -Wshadow.
* dirent/dirent.h: Same here for scandir prototype.
* math/mathcalls.h: Likewise for frexp and ldexp.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise for bindresvport.
Sat Nov 16 03:49:27 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/tst-strtod.c: Add test for error case below.
Sat Nov 16 03:48:39 1996 Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>
* stdlib/strtod.c: Recognize numbers like 0e-19.
Fri Nov 15 08:38:43 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* time/Makefile ($(installed-localtime-file)): Fix path to
rellns-sh.
* Makefile: Don't generate and install gnu/lib-names.h if
$(build-shared) is not `yes'.
Thu Nov 14 09:23:58 1996 H.J. Lu (hjl@gnu.ai.mit.edu)
* sysdeps/posix/Makefile ($(common-objpfx)mk-stdiolim): Depend
on $(..)posix/posix1_lim.h, not ../posix/posix1_lim.h.
* Makerules (REAL_MAKE_VERSION): New, use it instead of
MAKE_VERSION.
Thu Nov 14 22:10:43 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_files/files-XXX.x (_nss_files_get,ENTNAME_r): Fix typo.
* nss/getXXent_r.c: Fix typo. Set correct return value when
no further service is available.
Thu Nov 14 17:48:13 1996 Ulrich Drepper <drepper@cygnus.com>
* db/recno/rec_put.c: Add cast to avoid warning.
* db/recno/rec_close.c: Likewise.
* db/mpool/mpool.c: Likewise.
* db/hash/hash_bigkey.h: Likewise.
* db/hash/hash.c: Likewise.
* db/btree/bt_split.c: Likewise.
* db/btree/bt_put.c: Likewise.
Thu Nov 14 14:11:44 1996 Ulrich Drepper <drepper@cygnus.com>
* dirent/dirent.h: Update copyright.
* elf/elf.h: Likewise.
* elf/link.h: Likewise.
* gmon/sys/gmon_out.h: Likewise.
* gnu-versions.h: Likewise.
* intl/libintl.h: Likewise.
* io/fcntl.h: Likewise.
* io/ftw.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/utime.h: Likewise.
* locale/langinfo.h: Likewise.
* malloc/malloc.h: Likewise.
* malloc/obstack.h: Likewise.
* misc/ar.h: Likewise.
* misc/error.h: Likewise.
* misc/mntent.h: Likewise.
* misc/sgtty.h: Likewise.
* misc/sys/cdefs.h: Likewise.
* misc/sys/dir.h: Likewise.
* misc/sys/file.h: Likewise.
* misc/sys/ioctl.h: Likewise.
* misc/sys/ustat.h: Likewise.
* posix/fnmatch.h: Likewise.
* posix/getopt.h: Likewise.
* posix/glob.h: Likewise.
* posix/posix2_lim.h: Likewise.
* posix/regex.h: Likewise.
* posix/sys/times.h: Likewise.
* posix/sys/types.h: Likewise.
* posix/sys/utsname.h: Likewise.
* posix/tar.h: Likewise.
* posix/wordexp.h: Likewise.
* resource/sys/resource.h: Likewise.
* resource/sys/vlimit.h: Likewise.
* resource/sys/vtimes.h: Likewise.
* socket/sys/socket.h: Likewise.
* socket/sys/un.h: Likewise.
* stdio-common/printf.h: Likewise.
* stdlib/alloca.h: Likewise.
* string/argz.h: Likewise.
* string/endian.h: Likewise.
* string/envz.h: Likewise.
* string/memory.h: Likewise.
* string/strings.h: Likewise.
* sysdeps/generic/crypt.h: Likewise.
* sysdeps/generic/direntry.h: Likewise.
* sysdeps/generic/gnu/types.h: Likewise.
* sysdeps/generic/ioctl-types.h: Likewise.
* sysdeps/generic/netinet/in.h: Likewise.
* sysdeps/generic/resourcebits.h: Likewise.
* sysdeps/generic/sigset.h: Likewise.
* sysdeps/generic/sockaddrcom.h: Likewise.
* sysdeps/generic/sys/mman.h: Likewise.
* sysdeps/generic/sys/ptrace.h: Likewise.
* sysdeps/generic/termbits.h: Likewise.
* sysdeps/generic/waitstatus.h: Likewise.
* sysdeps/ieee754/huge_val.h: Likewise.
* sysdeps/ieee754/nan.h: Likewise.
* sysdeps/mach/hurd/local_lim.h: Likewise.
* sysdeps/mach/hurd/statbuf.h: Likewise.
* sysdeps/stub/huge_val.h: Likewise.
* sysdeps/stub/libc-lock.h: Likewise.
* sysdeps/stub/signum.h: Likewise.
* sysdeps/stub/statbuf.h: Likewise.
* sysdeps/stub/waitflags.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/sockaddrcom.h: Likewise.
* sysdeps/unix/bsd/osf/alpha/statbuf.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
* sysdeps/unix/bsd/signum.h: Likewise.
* sysdeps/unix/bsd/statbuf.h: Likewise.
* sysdeps/unix/bsd/sun/signum.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/resourcebits.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/termbits.h: Likewise.
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/waitflags.h: Likewise.
* sysdeps/unix/sysv/irix4/signum.h: Likewise.
* sysdeps/unix/sysv/irix4/statbuf.h: Likewise.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/direntry.h: Likewise.
* sysdeps/unix/sysv/linux/gnu/types.h: Likewise.
* sysdeps/unix/sysv/linux/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/local_lim.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* sysdeps/unix/sysv/linux/resourcebits.h: Likewise.
* sysdeps/unix/sysv/linux/signum.h: Likewise.
* sysdeps/unix/sysv/linux/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise.
* sysdeps/unix/sysv/linux/syscall.h: Likewise.
* sysdeps/unix/sysv/linux/termbits.h: Likewise.
* sysdeps/unix/sysv/local_lim.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/syscall.h: Likewise.
* sysdeps/unix/sysv/sco3.2/local_lim.h: Likewise.
* sysdeps/unix/sysv/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/i386/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/waitflags.h: Likewise.
* sysdeps/vax/huge_val.h: Likewise.
* values.h: Likewise.
Thu Nov 14 04:22:41 1996 Ulrich Drepper <drepper@cygnus.com>
* malloc/obstack.h: Use memcpy instead of bcopy and define a macro
`memcpy' using bcopy if memcpy is not available.
* manual/stdio.texi: Correct description of printf customization.
The argument info function is not optional anymore and the
interface for `printf_function' also changed.
* manual/examples/rprintf.c: Define and use argument info function.
* stdio-common/printf.h (struct printf_info): Change type for field
`pad' to wchar_t.
Correct comment for `register_printf_function'.
* nss/getXXbyYY.c [NEED_H_ERRNO]: Don't pass pointer to h_errno
to reentrant function. Instead use temporary variable and set
h_errno if an error occured.
Reported by NIIBE Yutaka.
are no bits set in the masks. Reported by baldazzi@csr.unibo.it.
1996-11-17 03:15:52 +00:00
|
|
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
|
Lesser General Public License for more details.
|
update from main archive 961116
Sun Nov 17 03:13:57 1996 Ulrich Drepper <drepper@cygnus.com>
* db/makedb.c: Update and reformat copyright.
* elf/Makefile: Likewise.
* elf/dl-close.c: Likewise.
* elf/dl-debug.c: Likewise.
* elf/dl-deps.c: Likewise.
* elf/dl-error.c: Likewise.
* elf/dl-fini.c: Likewise.
* elf/dl-init.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/dl-minimal.c: Likewise.
* elf/dl-object.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/dl-reloc.c: Likewise.
* elf/dl-runtime.c: Likewise.
* elf/dl-support.c: Likewise.
* elf/dl-symbol.c: Likewise.
* elf/dladdr.c: Likewise.
* elf/dlclose.c: Likewise.
* elf/dlerror.c: Likewise.
* elf/dlopen.c: Likewise.
* elf/dlsym.c: Likewise.
* elf/do-rel.h: Likewise.
* elf/dynamic-link.h: Likewise.
* elf/eval.c: Likewise.
* elf/rtld.c: Likewise.
* inet/ether_hton.c: Likewise.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Likewise.
* inet/getnetgrent_r.c: Likewise.
* inet/Makefile (+gccwarn): Remove definition.
Instead set CFLAGS-rcmd.c, CFLAGS-rexec.c, and CFLAGS-ruserpass.c
to `-w'.
* inet/aliases.h: Add C++ protection.
* inet/ether_hton.c: Add prototype for __nss_ethers_lookup.
(ether_hostton): Remove unused variable result.
* inet/ether_ntoh.c: Likewise.
* inet/ether_line.c: Include <ctype.h> and <string.h>.
* inet/getnetgrent_r.c: Include <stdlib.h>.
Use casts to prevent warnings.
(innetgr): Initialize `known' and `needed'.
* inet/inet_net.c: Make local variable `i' of type u_int32_t.
* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)) [NEED__RES]: Don't
return NULL. Instead set *RESULT to NULL and return -1.
* nss/getXXent_r.c (INTERNAL (REENTRANT_GETNAME)): Likewise.
(SETFUNC_NAME, ENDFUNC_NAME) [NEED__RES]: Don't return anything.
* nss/nss_files/files-alias.c: Debug function. I didn't worked at
all before.
Sat Nov 16 15:25:34 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/readv.c: Don't use PTR anymore.
* sysdeps/posix/writev.c: Likewise.
* version.h (VERSION): Bump to 1.98.
* nss/db-Makefile: Generate lines for getXXXent iteration.
* sysdeps/alpha/Dist: Don't distribute removed files divlu.S,
divqu.S, remlu.S, and remqu.S.
Fri Nov 15 08:55:54 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* posix/unistd.h: Correct typo in documentation.
Thu Nov 14 18:08:14 1996 a sun <asun@zoology.washington.edu>
* inet/netinet/tcp.h: Use __ protected versions instead of
BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN directly.
Sat Nov 16 13:44:55 1996 Ulrich Drepper <drepper@cygnus.com>
* intl/loadmsgcat.c (_nl_msg_cat_cntr): Initialize so that
references in libc.so are not anymore undefined.
Sat Nov 16 18:17:36 1996 NIIBE Yutaka <gniibe@mri.co.jp>
* io/utime.h: Rename second parameter for utime to prevent warning
for -Wshadow.
* dirent/dirent.h: Same here for scandir prototype.
* math/mathcalls.h: Likewise for frexp and ldexp.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise for bindresvport.
Sat Nov 16 03:49:27 1996 Ulrich Drepper <drepper@cygnus.com>
* stdlib/tst-strtod.c: Add test for error case below.
Sat Nov 16 03:48:39 1996 Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>
* stdlib/strtod.c: Recognize numbers like 0e-19.
Fri Nov 15 08:38:43 1996 Andreas Jaeger <aj@arthur.pfalz.de>
* time/Makefile ($(installed-localtime-file)): Fix path to
rellns-sh.
* Makefile: Don't generate and install gnu/lib-names.h if
$(build-shared) is not `yes'.
Thu Nov 14 09:23:58 1996 H.J. Lu (hjl@gnu.ai.mit.edu)
* sysdeps/posix/Makefile ($(common-objpfx)mk-stdiolim): Depend
on $(..)posix/posix1_lim.h, not ../posix/posix1_lim.h.
* Makerules (REAL_MAKE_VERSION): New, use it instead of
MAKE_VERSION.
Thu Nov 14 22:10:43 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_files/files-XXX.x (_nss_files_get,ENTNAME_r): Fix typo.
* nss/getXXent_r.c: Fix typo. Set correct return value when
no further service is available.
Thu Nov 14 17:48:13 1996 Ulrich Drepper <drepper@cygnus.com>
* db/recno/rec_put.c: Add cast to avoid warning.
* db/recno/rec_close.c: Likewise.
* db/mpool/mpool.c: Likewise.
* db/hash/hash_bigkey.h: Likewise.
* db/hash/hash.c: Likewise.
* db/btree/bt_split.c: Likewise.
* db/btree/bt_put.c: Likewise.
Thu Nov 14 14:11:44 1996 Ulrich Drepper <drepper@cygnus.com>
* dirent/dirent.h: Update copyright.
* elf/elf.h: Likewise.
* elf/link.h: Likewise.
* gmon/sys/gmon_out.h: Likewise.
* gnu-versions.h: Likewise.
* intl/libintl.h: Likewise.
* io/fcntl.h: Likewise.
* io/ftw.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/utime.h: Likewise.
* locale/langinfo.h: Likewise.
* malloc/malloc.h: Likewise.
* malloc/obstack.h: Likewise.
* misc/ar.h: Likewise.
* misc/error.h: Likewise.
* misc/mntent.h: Likewise.
* misc/sgtty.h: Likewise.
* misc/sys/cdefs.h: Likewise.
* misc/sys/dir.h: Likewise.
* misc/sys/file.h: Likewise.
* misc/sys/ioctl.h: Likewise.
* misc/sys/ustat.h: Likewise.
* posix/fnmatch.h: Likewise.
* posix/getopt.h: Likewise.
* posix/glob.h: Likewise.
* posix/posix2_lim.h: Likewise.
* posix/regex.h: Likewise.
* posix/sys/times.h: Likewise.
* posix/sys/types.h: Likewise.
* posix/sys/utsname.h: Likewise.
* posix/tar.h: Likewise.
* posix/wordexp.h: Likewise.
* resource/sys/resource.h: Likewise.
* resource/sys/vlimit.h: Likewise.
* resource/sys/vtimes.h: Likewise.
* socket/sys/socket.h: Likewise.
* socket/sys/un.h: Likewise.
* stdio-common/printf.h: Likewise.
* stdlib/alloca.h: Likewise.
* string/argz.h: Likewise.
* string/endian.h: Likewise.
* string/envz.h: Likewise.
* string/memory.h: Likewise.
* string/strings.h: Likewise.
* sysdeps/generic/crypt.h: Likewise.
* sysdeps/generic/direntry.h: Likewise.
* sysdeps/generic/gnu/types.h: Likewise.
* sysdeps/generic/ioctl-types.h: Likewise.
* sysdeps/generic/netinet/in.h: Likewise.
* sysdeps/generic/resourcebits.h: Likewise.
* sysdeps/generic/sigset.h: Likewise.
* sysdeps/generic/sockaddrcom.h: Likewise.
* sysdeps/generic/sys/mman.h: Likewise.
* sysdeps/generic/sys/ptrace.h: Likewise.
* sysdeps/generic/termbits.h: Likewise.
* sysdeps/generic/waitstatus.h: Likewise.
* sysdeps/ieee754/huge_val.h: Likewise.
* sysdeps/ieee754/nan.h: Likewise.
* sysdeps/mach/hurd/local_lim.h: Likewise.
* sysdeps/mach/hurd/statbuf.h: Likewise.
* sysdeps/stub/huge_val.h: Likewise.
* sysdeps/stub/libc-lock.h: Likewise.
* sysdeps/stub/signum.h: Likewise.
* sysdeps/stub/statbuf.h: Likewise.
* sysdeps/stub/waitflags.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/sockaddrcom.h: Likewise.
* sysdeps/unix/bsd/osf/alpha/statbuf.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
* sysdeps/unix/bsd/signum.h: Likewise.
* sysdeps/unix/bsd/statbuf.h: Likewise.
* sysdeps/unix/bsd/sun/signum.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/resourcebits.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/termbits.h: Likewise.
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/waitflags.h: Likewise.
* sysdeps/unix/sysv/irix4/signum.h: Likewise.
* sysdeps/unix/sysv/irix4/statbuf.h: Likewise.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/direntry.h: Likewise.
* sysdeps/unix/sysv/linux/gnu/types.h: Likewise.
* sysdeps/unix/sysv/linux/ioctl-types.h: Likewise.
* sysdeps/unix/sysv/linux/local_lim.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* sysdeps/unix/sysv/linux/resourcebits.h: Likewise.
* sysdeps/unix/sysv/linux/signum.h: Likewise.
* sysdeps/unix/sysv/linux/statbuf.h: Likewise.
* sysdeps/unix/sysv/linux/sys/io.h: Likewise.
* sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise.
* sysdeps/unix/sysv/linux/syscall.h: Likewise.
* sysdeps/unix/sysv/linux/termbits.h: Likewise.
* sysdeps/unix/sysv/local_lim.h: Likewise.
* sysdeps/unix/sysv/sco3.2.4/syscall.h: Likewise.
* sysdeps/unix/sysv/sco3.2/local_lim.h: Likewise.
* sysdeps/unix/sysv/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/i386/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/signum.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: Likewise.
* sysdeps/unix/sysv/sysv4/waitflags.h: Likewise.
* sysdeps/vax/huge_val.h: Likewise.
* values.h: Likewise.
Thu Nov 14 04:22:41 1996 Ulrich Drepper <drepper@cygnus.com>
* malloc/obstack.h: Use memcpy instead of bcopy and define a macro
`memcpy' using bcopy if memcpy is not available.
* manual/stdio.texi: Correct description of printf customization.
The argument info function is not optional anymore and the
interface for `printf_function' also changed.
* manual/examples/rprintf.c: Define and use argument info function.
* stdio-common/printf.h (struct printf_info): Change type for field
`pad' to wchar_t.
Correct comment for `register_printf_function'.
* nss/getXXbyYY.c [NEED_H_ERRNO]: Don't pass pointer to h_errno
to reentrant function. Instead use temporary variable and set
h_errno if an error occured.
Reported by NIIBE Yutaka.
are no bits set in the masks. Reported by baldazzi@csr.unibo.it.
1996-11-17 03:15:52 +00:00
|
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
|
<https://www.gnu.org/licenses/>. */
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
1998-03-24 00:39:45 +00:00
|
|
|
|
#include <errno.h>
|
1998-04-07 16:28:09 +00:00
|
|
|
|
#include <limits.h>
|
2015-07-09 22:32:32 +00:00
|
|
|
|
#include <stdio.h>
|
1998-03-24 00:39:45 +00:00
|
|
|
|
#include <string.h>
|
2002-07-20 01:14:41 +00:00
|
|
|
|
#include <tls.h>
|
1998-03-24 00:39:45 +00:00
|
|
|
|
#include <unistd.h>
|
1995-11-23 04:53:06 +00:00
|
|
|
|
#include <sys/mman.h>
|
2002-02-13 08:03:56 +00:00
|
|
|
|
#include <sys/param.h>
|
|
|
|
|
#include <sys/types.h>
|
2000-03-23 20:31:46 +00:00
|
|
|
|
#include <ldsodefs.h>
|
2020-02-08 18:58:43 +00:00
|
|
|
|
#include <dl-irel.h>
|
|
|
|
|
#include <dl-hash.h>
|
|
|
|
|
#include <dl-sym-post.h>
|
2012-03-20 23:00:23 +00:00
|
|
|
|
#include <_itoa.h>
|
2016-08-03 14:11:01 +00:00
|
|
|
|
#include <malloc/malloc-internal.h>
|
1998-03-24 00:39:45 +00:00
|
|
|
|
|
|
|
|
|
#include <assert.h>
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
2020-02-08 18:58:43 +00:00
|
|
|
|
/* The rtld startup code calls __rtld_malloc_init_stubs after the
|
|
|
|
|
first self-relocation to adjust the pointers to the minimal
|
|
|
|
|
implementation below. Before the final relocation,
|
|
|
|
|
__rtld_malloc_init_real is called to replace the pointers with the
|
|
|
|
|
real implementation. */
|
2020-02-26 14:58:23 +00:00
|
|
|
|
__typeof (calloc) *__rtld_calloc attribute_relro;
|
|
|
|
|
__typeof (free) *__rtld_free attribute_relro;
|
|
|
|
|
__typeof (malloc) *__rtld_malloc attribute_relro;
|
|
|
|
|
__typeof (realloc) *__rtld_realloc attribute_relro;
|
2020-02-08 18:58:43 +00:00
|
|
|
|
|
|
|
|
|
/* Defined below. */
|
2020-02-26 14:58:23 +00:00
|
|
|
|
static __typeof (calloc) rtld_calloc;
|
|
|
|
|
static __typeof (free) rtld_free;
|
|
|
|
|
static __typeof (malloc) rtld_malloc;
|
|
|
|
|
static __typeof (realloc) rtld_realloc;
|
2020-02-08 18:58:43 +00:00
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
__rtld_malloc_init_stubs (void)
|
|
|
|
|
{
|
|
|
|
|
__rtld_calloc = &rtld_calloc;
|
|
|
|
|
__rtld_free = &rtld_free;
|
|
|
|
|
__rtld_malloc = &rtld_malloc;
|
|
|
|
|
__rtld_realloc = &rtld_realloc;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-08 08:57:09 +00:00
|
|
|
|
bool
|
|
|
|
|
__rtld_malloc_is_complete (void)
|
|
|
|
|
{
|
|
|
|
|
/* The caller assumes that there is an active malloc. */
|
|
|
|
|
assert (__rtld_malloc != NULL);
|
|
|
|
|
return __rtld_malloc != &rtld_malloc;
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-08 18:58:43 +00:00
|
|
|
|
/* Lookup NAME at VERSION in the scope of MATCH. */
|
|
|
|
|
static void *
|
|
|
|
|
lookup_malloc_symbol (struct link_map *main_map, const char *name,
|
|
|
|
|
struct r_found_version *version)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const ElfW(Sym) *ref = NULL;
|
|
|
|
|
lookup_t result = _dl_lookup_symbol_x (name, main_map, &ref,
|
|
|
|
|
main_map->l_scope,
|
|
|
|
|
version, 0, 0, NULL);
|
|
|
|
|
|
|
|
|
|
assert (ELFW(ST_TYPE) (ref->st_info) != STT_TLS);
|
|
|
|
|
void *value = DL_SYMBOL_ADDRESS (result, ref);
|
|
|
|
|
|
|
|
|
|
return _dl_sym_post (result, ref, value, 0, main_map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
__rtld_malloc_init_real (struct link_map *main_map)
|
|
|
|
|
{
|
|
|
|
|
/* We cannot use relocations and initializers for this because the
|
|
|
|
|
changes made by __rtld_malloc_init_stubs break REL-style
|
|
|
|
|
(non-RELA) relocations that depend on the previous pointer
|
|
|
|
|
contents. Also avoid direct relocation depedencies for the
|
|
|
|
|
malloc symbols so this function can be called before the final
|
|
|
|
|
rtld relocation (which enables RELRO, after which the pointer
|
|
|
|
|
variables cannot be written to). */
|
|
|
|
|
|
|
|
|
|
struct r_found_version version;
|
|
|
|
|
version.name = symbol_version_string (libc, GLIBC_2_0);
|
|
|
|
|
version.hidden = 0;
|
|
|
|
|
version.hash = _dl_elf_hash (version.name);
|
|
|
|
|
version.filename = NULL;
|
|
|
|
|
|
|
|
|
|
void *new_calloc = lookup_malloc_symbol (main_map, "calloc", &version);
|
|
|
|
|
void *new_free = lookup_malloc_symbol (main_map, "free", &version);
|
|
|
|
|
void *new_malloc = lookup_malloc_symbol (main_map, "malloc", &version);
|
|
|
|
|
void *new_realloc = lookup_malloc_symbol (main_map, "realloc", &version);
|
|
|
|
|
|
|
|
|
|
/* Update the pointers in one go, so that any internal allocations
|
|
|
|
|
performed by lookup_malloc_symbol see a consistent
|
|
|
|
|
implementation. */
|
|
|
|
|
__rtld_calloc = new_calloc;
|
|
|
|
|
__rtld_free = new_free;
|
|
|
|
|
__rtld_malloc = new_malloc;
|
|
|
|
|
__rtld_realloc = new_realloc;
|
|
|
|
|
}
|
|
|
|
|
|
2016-11-30 15:23:58 +00:00
|
|
|
|
/* Minimal malloc allocator for used during initial link. After the
|
|
|
|
|
initial link, a full malloc implementation is interposed, either
|
|
|
|
|
the one in libc, or a different one supplied by the user through
|
|
|
|
|
interposition. */
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
|
|
|
|
static void *alloc_ptr, *alloc_end, *alloc_last_block;
|
|
|
|
|
|
2002-08-05 01:21:25 +00:00
|
|
|
|
/* Allocate an aligned memory block. */
|
2020-02-08 18:58:43 +00:00
|
|
|
|
static void *
|
|
|
|
|
rtld_malloc (size_t n)
|
1995-11-23 04:53:06 +00:00
|
|
|
|
{
|
|
|
|
|
if (alloc_end == 0)
|
|
|
|
|
{
|
|
|
|
|
/* Consume any unused space in the last page of our data segment. */
|
2002-03-15 03:09:42 +00:00
|
|
|
|
extern int _end attribute_hidden;
|
1995-11-23 04:53:06 +00:00
|
|
|
|
alloc_ptr = &_end;
|
2002-01-31 03:41:25 +00:00
|
|
|
|
alloc_end = (void *) 0 + (((alloc_ptr - (void *) 0)
|
2004-03-05 10:29:47 +00:00
|
|
|
|
+ GLRO(dl_pagesize) - 1)
|
|
|
|
|
& ~(GLRO(dl_pagesize) - 1));
|
1995-11-23 04:53:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure the allocation pointer is ideally aligned. */
|
2016-11-30 15:23:58 +00:00
|
|
|
|
alloc_ptr = (void *) 0 + (((alloc_ptr - (void *) 0) + MALLOC_ALIGNMENT - 1)
|
|
|
|
|
& ~(MALLOC_ALIGNMENT - 1));
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
2007-07-04 18:06:39 +00:00
|
|
|
|
if (alloc_ptr + n >= alloc_end || n >= -(uintptr_t) alloc_ptr)
|
1995-11-23 04:53:06 +00:00
|
|
|
|
{
|
2016-04-23 13:05:01 +00:00
|
|
|
|
/* Insufficient space left; allocate another page plus one extra
|
|
|
|
|
page to reduce number of mmap calls. */
|
1995-11-23 04:53:06 +00:00
|
|
|
|
caddr_t page;
|
2004-03-05 10:29:47 +00:00
|
|
|
|
size_t nup = (n + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1);
|
2016-04-23 13:05:01 +00:00
|
|
|
|
if (__glibc_unlikely (nup == 0 && n != 0))
|
|
|
|
|
return NULL;
|
|
|
|
|
nup += GLRO(dl_pagesize);
|
1998-03-04 09:53:17 +00:00
|
|
|
|
page = __mmap (0, nup, PROT_READ|PROT_WRITE,
|
2009-03-31 22:03:24 +00:00
|
|
|
|
MAP_ANON|MAP_PRIVATE, -1, 0);
|
2007-07-04 18:06:39 +00:00
|
|
|
|
if (page == MAP_FAILED)
|
|
|
|
|
return NULL;
|
1995-11-23 04:53:06 +00:00
|
|
|
|
if (page != alloc_end)
|
|
|
|
|
alloc_ptr = page;
|
1998-03-04 09:53:17 +00:00
|
|
|
|
alloc_end = page + nup;
|
1995-11-23 04:53:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
alloc_last_block = (void *) alloc_ptr;
|
|
|
|
|
alloc_ptr += n;
|
|
|
|
|
return alloc_last_block;
|
|
|
|
|
}
|
|
|
|
|
|
1997-04-08 23:42:08 +00:00
|
|
|
|
/* We use this function occasionally since the real implementation may
|
|
|
|
|
be optimized when it can assume the memory it returns already is
|
|
|
|
|
set to NUL. */
|
2020-02-08 18:58:43 +00:00
|
|
|
|
static void *
|
|
|
|
|
rtld_calloc (size_t nmemb, size_t size)
|
1997-04-08 23:42:08 +00:00
|
|
|
|
{
|
2002-12-06 11:15:07 +00:00
|
|
|
|
/* New memory from the trivial malloc above is always already cleared.
|
|
|
|
|
(We make sure that's true in the rare occasion it might not be,
|
|
|
|
|
by clearing memory in free, below.) */
|
2007-07-04 18:06:39 +00:00
|
|
|
|
size_t bytes = nmemb * size;
|
|
|
|
|
|
|
|
|
|
#define HALF_SIZE_T (((size_t) 1) << (8 * sizeof (size_t) / 2))
|
|
|
|
|
if (__builtin_expect ((nmemb | size) >= HALF_SIZE_T, 0)
|
|
|
|
|
&& size != 0 && bytes / size != nmemb)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
return malloc (bytes);
|
1997-04-08 23:42:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
1995-11-23 04:53:06 +00:00
|
|
|
|
/* This will rarely be called. */
|
2020-02-08 18:58:43 +00:00
|
|
|
|
void
|
|
|
|
|
rtld_free (void *ptr)
|
1995-11-23 04:53:06 +00:00
|
|
|
|
{
|
|
|
|
|
/* We can free only the last block allocated. */
|
|
|
|
|
if (ptr == alloc_last_block)
|
2002-12-06 11:15:07 +00:00
|
|
|
|
{
|
|
|
|
|
/* Since this is rare, we clear the freed block here
|
|
|
|
|
so that calloc can presume malloc returns cleared memory. */
|
|
|
|
|
memset (alloc_last_block, '\0', alloc_ptr - alloc_last_block);
|
|
|
|
|
alloc_ptr = alloc_last_block;
|
|
|
|
|
}
|
1995-11-23 04:53:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
1996-06-04 05:18:15 +00:00
|
|
|
|
/* This is only called with the most recent block returned by malloc. */
|
2020-02-08 18:58:43 +00:00
|
|
|
|
void *
|
|
|
|
|
rtld_realloc (void *ptr, size_t n)
|
1996-06-04 05:18:15 +00:00
|
|
|
|
{
|
2001-11-10 03:23:20 +00:00
|
|
|
|
if (ptr == NULL)
|
|
|
|
|
return malloc (n);
|
1996-06-04 05:18:15 +00:00
|
|
|
|
assert (ptr == alloc_last_block);
|
2006-10-12 21:52:54 +00:00
|
|
|
|
size_t old_size = alloc_ptr - alloc_last_block;
|
1996-06-04 05:18:15 +00:00
|
|
|
|
alloc_ptr = alloc_last_block;
|
2006-10-12 21:52:54 +00:00
|
|
|
|
void *new = malloc (n);
|
2006-10-13 16:28:21 +00:00
|
|
|
|
return new != ptr ? memcpy (new, ptr, old_size) : new;
|
1996-06-04 05:18:15 +00:00
|
|
|
|
}
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
|
|
|
|
/* Avoid signal frobnication in setjmp/longjmp. Keeps things smaller. */
|
|
|
|
|
|
|
|
|
|
#include <setjmp.h>
|
|
|
|
|
|
1996-07-08 06:18:25 +00:00
|
|
|
|
int weak_function
|
2001-01-19 00:36:48 +00:00
|
|
|
|
__sigjmp_save (sigjmp_buf env, int savemask __attribute__ ((unused)))
|
Update.
1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-minimal.c: Don't use relative #include paths.
(malloc): Don't try to initialize _dl_pagesize, it already is.
(__sigjmp_save, longjmp): Reformat.
* sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to
show content of auxiliary array.
(_dl_sysdep_start): Remember start of auxiliary vector.
* sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function.
* elf/link.h: Add prototype for _dl_show_auxv.
* elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar
is present.
* libio/iofdopen.c: Better prepare for use in libstdc++.
* libio/iofflush.c: Likewise.
* libio/iofgetpos.c: Likewise.
* libio/iofgets.c: Likewise.
* libio/iofopen.c: Likewise.
* libio/iofputs.c: Likewise.
* libio/iofread.c: Likewise.
* libio/iofsetpos.c: Likewise.
* libio/ioftell.c: Likewise.
* libio/iofwrite.c: Likewise.
* libio/iogetdelim.c: Likewise.
* libio/iogets.c: Likewise.
* libio/iopopen.c: Likewise.
* libio/ioputs.c: Likewise.
* libio/iosetbuffer.c: Likewise.
* libio/iosetvbuf.c: Likewise.
* libio/ioungetc.c: Likewise.
* libio/iovsprintf.c: Likewise.
* libio/iovsscanf.c: Likewise.
* manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct
place.
* manual/math.texi: Add comment to sincos decsription to say it's a
GNU extension.
Fix description of random function.
* posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32.
* posix/glob.c: Likewise. Handle stupid system headers on SunOS.
Add casts for all __alloca calls.
* posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32.
Declare additional GLOB_* constants also if _GNU_SOURCE is defined.
Patches by Paul D. Smith <psmith@BayNetworks.COM>.
* stdio-common/_itoa.c: Don't use relateive #include paths.
* sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for
gcc 2.7.
(atan): Loading 1.0 from memory does not pay off.
(asinh): Fix typo.
1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/stub/accept.c: Use socklen_t where necessary.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftw.c (object_compare): Avoid memcmp when comparing scalar
types.
1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c (cbrt_test): Add epsilon for long double to
`cbrt (-0.001)'.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/stub/bits/string.h: Fix comment.
1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/Makefile (routines): Remove dl-version.
(dl-routines): Add it here instead. This removes dead code from
libc.so.
1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/thread-m.h (thread_atfork, thread_atfork_static): New
macros to encapsulate pthread_atfork's functionality.
* malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New
functions, registered via thread_atfork in the initialization
routine or via thread_atfork_static in global scope. This
ensures a consistent state of all locks across fork().
1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/programs/xtmp.c (compare_entry):
Partially undo patch made by Klaus Espenlaub. There
was no xtmp/utmp typo. Added comment to cclarify this.
* login/programs/xtmp.h: Likewise.
* posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32.
Patch by Paul D. Smith <psmith@BayNetworks.COM>.
1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com>
* login/getutid.c: Rename to __getutid and make getutid and getutxid
weak aliases.
Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>.
1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers):
Add bits/mman.h.
1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/fmtmsg.c (fmtmsg): Add static to
__libc_once_define macro.
* libc.map (__progname_full, __progname): Added.
1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0
if SIOGIFINDEX is not defined.
(if_indextoname): Initialize "result" to NULL.
(if_nametoindex, if_nameindex): Fix ENOSYS setting.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc ISO C 9x exception handling:
* sysdeps/sparc/fpu/bits/mathdef.h: New file.
* sysdeps/sparc/fpu/fclrexcpt.c: New file.
* sysdeps/sparc/fpu/fegetenv.c: New file.
* sysdeps/sparc/fpu/fegetround.c: New file.
* sysdeps/sparc/fpu/feholdexcpt.c: New file.
* sysdeps/sparc/fpu/fesetenv.c: New file.
* sysdeps/sparc/fpu/fesetround.c: New file.
* sysdeps/sparc/fpu/feupdateenv.c: New file.
* sysdeps/sparc/fpu/fgetexcptflg.c: New file.
* sysdeps/sparc/fpu/fraiseexcpt.c: New file.
* sysdeps/sparc/fpu/fsetexcptflg.c: New file.
* sysdeps/sparc/fpu/ftestexcept.c: New file.
* sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file.
* sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc64 merge:
* configure.in: Change up subdirectories, rename sparc8->sparcv8.
* csu/Makefile: Nuke need-nopic-initfini bits. The problem was
that sparc64 ld did not recognize pic relocs at all.
* elf/dl-deps.c: Include <string.h>.
* elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size
directly instead of the DT names to get them from.
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled
from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts
for the possibility that DT_RELA and DT_JMPPLT overlap, as such is
the case on the Sparc.
* elf/elf.h: Stub out Elf64_Ver*, and make them the same as the
Elf32_Ver* bits. The linker does not even know to differentiate
between the word sizes. Someone should examine this and figure
out what the proper sizes of things should be for 64-bit hosts
before the sparc64 libraries are distributed.
* shlib-versions: Rename sparc64 ld.so to not conflict with sparc32
on the same machine.
Move old sysdeps/sparc contents to sysdeps/sparc/sparc32,
rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to
sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc.
* sysdeps/sparc/Implies: Do ieee754 here.
* sysdeps/sparc/configure.in: Move from sparc32/.
* sysdeps/sparc/sparc32/Implies: Do wordsize here.
* sysdeps/sparc/sparc64/Implies: Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address):
Use uninitialized .got to find load address instead of AT_BASE, as
the later does not exist when running ld.so directly.
* sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../.
* sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
* sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support.
* sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel
and s_signbitl for stdio.
* sysdeps/sparc/sparc64/configure.in: Remove, we no longer need
nopic_initfini.
* sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove.
* sysdeps/sparc/sparc64/bsd-setjmp.S: Remove.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias.
* sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp
and setjmp entry points.
* sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation.
* sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC.
* sysdeps/sparc/sparc64/elf/crtend.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction):
Fix sa_flags size for sparc64; add sa_restorer for kernel.
* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file.
1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c (login): Check for correct return value of
utmpname.
1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com>
* time/tzset.c (__tzset_internal): Correctly handle TZ strings
following incorrect old POSIX specs.
Patch by Paul Eggert <eggert@twinsun.com>.
* sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART.
* sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/math.texi: Define the macros @mul and @infinity and use
them to format the multiplication and infinity signs.
(FP Comparison Functions): Use @code, not @math, for C code
examples.
* elf/dl-profile.c: Add descriptions and implement reading of
1997-08-14 01:54:13 +00:00
|
|
|
|
{
|
2001-01-19 00:36:48 +00:00
|
|
|
|
env[0].__mask_was_saved = 0;
|
Update.
1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-minimal.c: Don't use relative #include paths.
(malloc): Don't try to initialize _dl_pagesize, it already is.
(__sigjmp_save, longjmp): Reformat.
* sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to
show content of auxiliary array.
(_dl_sysdep_start): Remember start of auxiliary vector.
* sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function.
* elf/link.h: Add prototype for _dl_show_auxv.
* elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar
is present.
* libio/iofdopen.c: Better prepare for use in libstdc++.
* libio/iofflush.c: Likewise.
* libio/iofgetpos.c: Likewise.
* libio/iofgets.c: Likewise.
* libio/iofopen.c: Likewise.
* libio/iofputs.c: Likewise.
* libio/iofread.c: Likewise.
* libio/iofsetpos.c: Likewise.
* libio/ioftell.c: Likewise.
* libio/iofwrite.c: Likewise.
* libio/iogetdelim.c: Likewise.
* libio/iogets.c: Likewise.
* libio/iopopen.c: Likewise.
* libio/ioputs.c: Likewise.
* libio/iosetbuffer.c: Likewise.
* libio/iosetvbuf.c: Likewise.
* libio/ioungetc.c: Likewise.
* libio/iovsprintf.c: Likewise.
* libio/iovsscanf.c: Likewise.
* manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct
place.
* manual/math.texi: Add comment to sincos decsription to say it's a
GNU extension.
Fix description of random function.
* posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32.
* posix/glob.c: Likewise. Handle stupid system headers on SunOS.
Add casts for all __alloca calls.
* posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32.
Declare additional GLOB_* constants also if _GNU_SOURCE is defined.
Patches by Paul D. Smith <psmith@BayNetworks.COM>.
* stdio-common/_itoa.c: Don't use relateive #include paths.
* sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for
gcc 2.7.
(atan): Loading 1.0 from memory does not pay off.
(asinh): Fix typo.
1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/stub/accept.c: Use socklen_t where necessary.
* sysdeps/stub/bind.c: Likewise.
* sysdeps/stub/connect.c: Likewise.
* sysdeps/stub/getsockname.c: Likewise.
* sysdeps/stub/getsockopt.c: Likewise.
* sysdeps/stub/recvfrom.c: Likewise.
* sysdeps/stub/sendto.c: Likewise.
* sysdeps/stub/setsockopt.c: Likewise.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftw.c (object_compare): Avoid memcmp when comparing scalar
types.
1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c (cbrt_test): Add epsilon for long double to
`cbrt (-0.001)'.
1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/stub/bits/string.h: Fix comment.
1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/Makefile (routines): Remove dl-version.
(dl-routines): Add it here instead. This removes dead code from
libc.so.
1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
* malloc/thread-m.h (thread_atfork, thread_atfork_static): New
macros to encapsulate pthread_atfork's functionality.
* malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New
functions, registered via thread_atfork in the initialization
routine or via thread_atfork_static in global scope. This
ensures a consistent state of all locks across fork().
1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/programs/xtmp.c (compare_entry):
Partially undo patch made by Klaus Espenlaub. There
was no xtmp/utmp typo. Added comment to cclarify this.
* login/programs/xtmp.h: Likewise.
* posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32.
Patch by Paul D. Smith <psmith@BayNetworks.COM>.
1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com>
* login/getutid.c: Rename to __getutid and make getutid and getutxid
weak aliases.
Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>.
1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers):
Add bits/mman.h.
1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/fmtmsg.c (fmtmsg): Add static to
__libc_once_define macro.
* libc.map (__progname_full, __progname): Added.
1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0
if SIOGIFINDEX is not defined.
(if_indextoname): Initialize "result" to NULL.
(if_nametoindex, if_nameindex): Fix ENOSYS setting.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc ISO C 9x exception handling:
* sysdeps/sparc/fpu/bits/mathdef.h: New file.
* sysdeps/sparc/fpu/fclrexcpt.c: New file.
* sysdeps/sparc/fpu/fegetenv.c: New file.
* sysdeps/sparc/fpu/fegetround.c: New file.
* sysdeps/sparc/fpu/feholdexcpt.c: New file.
* sysdeps/sparc/fpu/fesetenv.c: New file.
* sysdeps/sparc/fpu/fesetround.c: New file.
* sysdeps/sparc/fpu/feupdateenv.c: New file.
* sysdeps/sparc/fpu/fgetexcptflg.c: New file.
* sysdeps/sparc/fpu/fraiseexcpt.c: New file.
* sysdeps/sparc/fpu/fsetexcptflg.c: New file.
* sysdeps/sparc/fpu/ftestexcept.c: New file.
* sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file.
* sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file.
1997-08-11 11:58 Richard Henderson <rth@cygnus.com>
Sparc64 merge:
* configure.in: Change up subdirectories, rename sparc8->sparcv8.
* csu/Makefile: Nuke need-nopic-initfini bits. The problem was
that sparc64 ld did not recognize pic relocs at all.
* elf/dl-deps.c: Include <string.h>.
* elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size
directly instead of the DT names to get them from.
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled
from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts
for the possibility that DT_RELA and DT_JMPPLT overlap, as such is
the case on the Sparc.
* elf/elf.h: Stub out Elf64_Ver*, and make them the same as the
Elf32_Ver* bits. The linker does not even know to differentiate
between the word sizes. Someone should examine this and figure
out what the proper sizes of things should be for 64-bit hosts
before the sparc64 libraries are distributed.
* shlib-versions: Rename sparc64 ld.so to not conflict with sparc32
on the same machine.
Move old sysdeps/sparc contents to sysdeps/sparc/sparc32,
rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to
sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc.
* sysdeps/sparc/Implies: Do ieee754 here.
* sysdeps/sparc/configure.in: Move from sparc32/.
* sysdeps/sparc/sparc32/Implies: Do wordsize here.
* sysdeps/sparc/sparc64/Implies: Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address):
Use uninitialized .got to find load address instead of AT_BASE, as
the later does not exist when running ld.so directly.
* sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../.
* sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
* sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support.
* sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel
and s_signbitl for stdio.
* sysdeps/sparc/sparc64/configure.in: Remove, we no longer need
nopic_initfini.
* sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove.
* sysdeps/sparc/sparc64/bsd-setjmp.S: Remove.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file.
* sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias.
* sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp
and setjmp entry points.
* sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation.
* sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC.
* sysdeps/sparc/sparc64/elf/crtend.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction):
Fix sa_flags size for sparc64; add sa_restorer for kernel.
* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file.
1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c (login): Check for correct return value of
utmpname.
1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com>
* time/tzset.c (__tzset_internal): Correctly handle TZ strings
following incorrect old POSIX specs.
Patch by Paul Eggert <eggert@twinsun.com>.
* sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART.
* sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise.
Reported by NIIBE Yutaka <gniibe@mri.co.jp>.
1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/math.texi: Define the macros @mul and @infinity and use
them to format the multiplication and infinity signs.
(FP Comparison Functions): Use @code, not @math, for C code
examples.
* elf/dl-profile.c: Add descriptions and implement reading of
1997-08-14 01:54:13 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
1998-02-18 11:00:24 +00:00
|
|
|
|
/* Define our own version of the internal function used by strerror. We
|
|
|
|
|
only provide the messages for some common errors. This avoids pulling
|
|
|
|
|
in the whole error list. */
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
1996-07-08 06:18:25 +00:00
|
|
|
|
char * weak_function
|
1998-04-14 16:51:08 +00:00
|
|
|
|
__strerror_r (int errnum, char *buf, size_t buflen)
|
1995-11-23 04:53:06 +00:00
|
|
|
|
{
|
1998-02-18 11:00:24 +00:00
|
|
|
|
char *msg;
|
|
|
|
|
|
|
|
|
|
switch (errnum)
|
|
|
|
|
{
|
|
|
|
|
case ENOMEM:
|
|
|
|
|
msg = (char *) "Cannot allocate memory";
|
|
|
|
|
break;
|
|
|
|
|
case EINVAL:
|
|
|
|
|
msg = (char *) "Invalid argument";
|
|
|
|
|
break;
|
|
|
|
|
case ENOENT:
|
|
|
|
|
msg = (char *) "No such file or directory";
|
|
|
|
|
break;
|
|
|
|
|
case EPERM:
|
|
|
|
|
msg = (char *) "Operation not permitted";
|
|
|
|
|
break;
|
|
|
|
|
case EIO:
|
|
|
|
|
msg = (char *) "Input/output error";
|
|
|
|
|
break;
|
|
|
|
|
case EACCES:
|
|
|
|
|
msg = (char *) "Permission denied";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
/* No need to check buffer size, all calls in the dynamic linker
|
|
|
|
|
provide enough space. */
|
|
|
|
|
buf[buflen - 1] = '\0';
|
2002-02-03 19:39:52 +00:00
|
|
|
|
msg = _itoa (errnum, buf + buflen - 1, 10, 0);
|
1998-02-18 11:00:24 +00:00
|
|
|
|
msg = memcpy (msg - (sizeof ("Error ") - 1), "Error ",
|
|
|
|
|
sizeof ("Error ") - 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return msg;
|
1995-11-23 04:53:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 22:32:32 +00:00
|
|
|
|
void
|
|
|
|
|
__libc_fatal (const char *message)
|
|
|
|
|
{
|
|
|
|
|
_dl_fatal_printf ("%s", message);
|
|
|
|
|
}
|
|
|
|
|
rtld_hidden_def (__libc_fatal)
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
2015-07-09 22:32:32 +00:00
|
|
|
|
void
|
|
|
|
|
__attribute__ ((noreturn))
|
|
|
|
|
__chk_fail (void)
|
|
|
|
|
{
|
|
|
|
|
_exit (127);
|
|
|
|
|
}
|
|
|
|
|
rtld_hidden_def (__chk_fail)
|
|
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
1995-11-23 04:53:06 +00:00
|
|
|
|
/* Define (weakly) our own assert failure function which doesn't use stdio.
|
|
|
|
|
If we are linked into the user program (-ldl), the normal __assert_fail
|
|
|
|
|
defn can override this one. */
|
|
|
|
|
|
1996-07-08 06:18:25 +00:00
|
|
|
|
void weak_function
|
1995-11-23 04:53:06 +00:00
|
|
|
|
__assert_fail (const char *assertion,
|
|
|
|
|
const char *file, unsigned int line, const char *function)
|
|
|
|
|
{
|
2001-02-28 06:36:10 +00:00
|
|
|
|
_dl_fatal_printf ("\
|
2001-04-11 04:53:37 +00:00
|
|
|
|
Inconsistency detected by ld.so: %s: %u: %s%sAssertion `%s' failed!\n",
|
2001-02-28 06:36:10 +00:00
|
|
|
|
file, line, function ?: "", function ? ": " : "",
|
|
|
|
|
assertion);
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
|
|
|
|
}
|
2020-11-10 23:35:19 +00:00
|
|
|
|
# ifndef NO_RTLD_HIDDEN
|
2015-07-09 22:32:32 +00:00
|
|
|
|
rtld_hidden_weak (__assert_fail)
|
2020-11-10 23:35:19 +00:00
|
|
|
|
# endif
|
1995-11-23 04:53:06 +00:00
|
|
|
|
|
2002-08-30 01:31:18 +00:00
|
|
|
|
void weak_function
|
|
|
|
|
__assert_perror_fail (int errnum,
|
|
|
|
|
const char *file, unsigned int line,
|
|
|
|
|
const char *function)
|
|
|
|
|
{
|
|
|
|
|
char errbuf[400];
|
|
|
|
|
_dl_fatal_printf ("\
|
|
|
|
|
Inconsistency detected by ld.so: %s: %u: %s%sUnexpected error: %s.\n",
|
|
|
|
|
file, line, function ?: "", function ? ": " : "",
|
|
|
|
|
__strerror_r (errnum, errbuf, sizeof errbuf));
|
|
|
|
|
|
|
|
|
|
}
|
2020-11-10 23:35:19 +00:00
|
|
|
|
# ifndef NO_RTLD_HIDDEN
|
2002-08-30 01:31:18 +00:00
|
|
|
|
rtld_hidden_weak (__assert_perror_fail)
|
2020-11-10 23:35:19 +00:00
|
|
|
|
# endif
|
1995-11-23 04:53:06 +00:00
|
|
|
|
#endif
|
2015-07-09 22:32:32 +00:00
|
|
|
|
|
2007-01-25 17:10:56 +00:00
|
|
|
|
#undef _itoa
|
2002-02-03 19:39:52 +00:00
|
|
|
|
/* We always use _itoa instead of _itoa_word in ld.so since the former
|
|
|
|
|
also has to be present and it is never about speed when these
|
|
|
|
|
functions are used. */
|
2002-02-01 07:49:47 +00:00
|
|
|
|
char *
|
2015-10-20 11:54:09 +00:00
|
|
|
|
_itoa (unsigned long long int value, char *buflim, unsigned int base,
|
|
|
|
|
int upper_case)
|
2002-02-01 07:49:47 +00:00
|
|
|
|
{
|
2002-02-03 19:39:52 +00:00
|
|
|
|
assert (! upper_case);
|
2002-02-01 07:49:47 +00:00
|
|
|
|
|
|
|
|
|
do
|
2012-05-29 21:55:13 +00:00
|
|
|
|
*--buflim = _itoa_lower_digits[value % base];
|
2002-02-03 19:39:52 +00:00
|
|
|
|
while ((value /= base) != 0);
|
2002-02-01 07:49:47 +00:00
|
|
|
|
|
2002-02-03 19:39:52 +00:00
|
|
|
|
return buflim;
|
2002-02-01 07:49:47 +00:00
|
|
|
|
}
|
2002-02-03 02:26:37 +00:00
|
|
|
|
|
2015-07-09 22:32:32 +00:00
|
|
|
|
/* The '_itoa_lower_digits' variable in libc.so is able to handle bases
|
|
|
|
|
up to 36. We don't need this here. */
|
|
|
|
|
const char _itoa_lower_digits[16] = "0123456789abcdef";
|
|
|
|
|
rtld_hidden_data_def (_itoa_lower_digits)
|
|
|
|
|
|
2002-02-03 02:26:37 +00:00
|
|
|
|
/* The following is not a complete strsep implementation. It cannot
|
|
|
|
|
handle empty delimiter strings. But this isn't necessary for the
|
|
|
|
|
execution of ld.so. */
|
|
|
|
|
#undef strsep
|
|
|
|
|
#undef __strsep
|
|
|
|
|
char *
|
|
|
|
|
__strsep (char **stringp, const char *delim)
|
|
|
|
|
{
|
|
|
|
|
char *begin;
|
|
|
|
|
|
2002-02-03 19:39:52 +00:00
|
|
|
|
assert (delim[0] != '\0');
|
|
|
|
|
|
2002-02-03 02:26:37 +00:00
|
|
|
|
begin = *stringp;
|
|
|
|
|
if (begin != NULL)
|
|
|
|
|
{
|
|
|
|
|
char *end = begin;
|
|
|
|
|
|
|
|
|
|
while (*end != '\0' || (end = NULL))
|
|
|
|
|
{
|
|
|
|
|
const char *dp = delim;
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
if (*dp == *end)
|
|
|
|
|
break;
|
|
|
|
|
while (*++dp != '\0');
|
|
|
|
|
|
|
|
|
|
if (*dp != '\0')
|
|
|
|
|
{
|
|
|
|
|
*end++ = '\0';
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
++end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*stringp = end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return begin;
|
|
|
|
|
}
|
|
|
|
|
weak_alias (__strsep, strsep)
|
|
|
|
|
strong_alias (__strsep, __strsep_g)
|