1995-05-02 14:35:55 +08:00
|
|
|
/* Relocate a shared object and resolve its references to other loaded objects.
|
2004-12-23 04:10:10 +08:00
|
|
|
Copyright (C) 1995-2002, 2003, 2004 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 11:15:52 +08:00
|
|
|
This file is part of the GNU C Library.
|
1995-05-02 14:35:55 +08:00
|
|
|
|
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 11:15:52 +08:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 12:58:11 +08: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.
|
1995-05-02 14:35:55 +08:00
|
|
|
|
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 11:15:52 +08: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 12:58:11 +08:00
|
|
|
Lesser General Public License for more details.
|
1995-05-02 14:35:55 +08:00
|
|
|
|
2001-07-06 12:58:11 +08:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA. */
|
1995-05-02 14:35:55 +08:00
|
|
|
|
1998-03-04 17:53:17 +08:00
|
|
|
#include <errno.h>
|
2000-06-10 12:01:36 +08:00
|
|
|
#include <libintl.h>
|
1998-03-04 17:53:17 +08:00
|
|
|
#include <stdlib.h>
|
1995-05-02 14:35:55 +08:00
|
|
|
#include <unistd.h>
|
2000-03-24 04:31:46 +08:00
|
|
|
#include <ldsodefs.h>
|
1998-03-04 17:53:17 +08:00
|
|
|
#include <sys/mman.h>
|
2001-08-25 03:56:19 +08:00
|
|
|
#include <sys/param.h>
|
1998-03-04 17:53:17 +08:00
|
|
|
#include <sys/types.h>
|
1995-05-02 14:35:55 +08:00
|
|
|
#include "dynamic-link.h"
|
|
|
|
|
2001-08-26 18:50:26 +08:00
|
|
|
/* Statistics function. */
|
2002-01-31 11:41:25 +08:00
|
|
|
#ifdef SHARED
|
|
|
|
# define bump_num_cache_relocations() ++GL(dl_num_cache_relocations)
|
2002-01-30 07:20:28 +08:00
|
|
|
#else
|
2002-01-30 08:38:09 +08:00
|
|
|
# define bump_num_cache_relocations() ((void) 0)
|
2002-01-30 07:20:28 +08:00
|
|
|
#endif
|
2001-08-26 18:50:26 +08:00
|
|
|
|
1997-07-29 06:35:20 +08:00
|
|
|
|
2002-11-05 11:01:37 +08:00
|
|
|
#ifdef USE_TLS
|
|
|
|
/* We are trying to perform a static TLS relocation in MAP, but it was
|
|
|
|
dynamically loaded. This can only work if there is enough surplus in
|
|
|
|
the static TLS area already allocated for each running thread. If this
|
Update.
2003-01-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
variable.
* sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2003-01-31 02:04:01 +08:00
|
|
|
object's TLS segment is too big to fit, we fail. If it fits,
|
2003-07-31 15:34:08 +08:00
|
|
|
we set MAP->l_tls_offset and return.
|
|
|
|
This function intentionally does not return any value but signals error
|
|
|
|
directly, as static TLS should be rare and code handling it should
|
|
|
|
not be inlined as much as possible. */
|
|
|
|
void
|
2003-04-25 01:18:42 +08:00
|
|
|
internal_function __attribute_noinline__
|
2003-04-25 01:10:52 +08:00
|
|
|
_dl_allocate_static_tls (struct link_map *map)
|
2002-11-05 11:01:37 +08:00
|
|
|
{
|
2004-12-23 04:10:10 +08:00
|
|
|
size_t offset;
|
|
|
|
|
2003-07-25 04:07:00 +08:00
|
|
|
/* If the alignment requirements are too high fail. */
|
|
|
|
if (map->l_tls_align > GL(dl_tls_static_align))
|
2003-07-31 15:34:08 +08:00
|
|
|
{
|
|
|
|
fail:
|
2004-03-06 16:19:29 +08:00
|
|
|
_dl_signal_error (0, map->l_name, NULL, N_("\
|
2003-07-31 15:34:08 +08:00
|
|
|
cannot allocate memory in static TLS block"));
|
|
|
|
}
|
2003-03-02 06:32:04 +08:00
|
|
|
|
2002-11-05 11:01:37 +08:00
|
|
|
# if TLS_TCB_AT_TP
|
2003-09-30 10:10:33 +08:00
|
|
|
size_t freebytes;
|
|
|
|
size_t n;
|
|
|
|
size_t blsize;
|
|
|
|
|
2003-07-25 04:07:00 +08:00
|
|
|
freebytes = GL(dl_tls_static_size) - GL(dl_tls_static_used) - TLS_TCB_SIZE;
|
|
|
|
|
|
|
|
blsize = map->l_tls_blocksize + map->l_tls_firstbyte_offset;
|
|
|
|
if (freebytes < blsize)
|
2003-07-31 15:34:08 +08:00
|
|
|
goto fail;
|
2003-07-25 04:07:00 +08:00
|
|
|
|
|
|
|
n = (freebytes - blsize) / map->l_tls_align;
|
|
|
|
|
2004-12-23 04:10:10 +08:00
|
|
|
offset = GL(dl_tls_static_used) + (freebytes - n * map->l_tls_align
|
|
|
|
- map->l_tls_firstbyte_offset);
|
2003-07-25 04:07:00 +08:00
|
|
|
|
|
|
|
map->l_tls_offset = GL(dl_tls_static_used) = offset;
|
2002-11-05 11:01:37 +08:00
|
|
|
# elif TLS_DTV_AT_TP
|
2003-10-03 02:58:31 +08:00
|
|
|
size_t used;
|
|
|
|
size_t check;
|
|
|
|
|
2004-12-23 04:10:10 +08:00
|
|
|
offset = roundup (GL(dl_tls_static_used), map->l_tls_align);
|
2003-03-02 06:32:04 +08:00
|
|
|
used = offset + map->l_tls_blocksize;
|
|
|
|
check = used;
|
2002-11-05 11:01:37 +08:00
|
|
|
/* dl_tls_static_used includes the TCB at the beginning. */
|
2003-03-02 06:32:04 +08:00
|
|
|
|
|
|
|
if (check > GL(dl_tls_static_size))
|
2003-07-31 15:34:08 +08:00
|
|
|
goto fail;
|
2003-03-02 06:32:04 +08:00
|
|
|
|
2002-11-05 11:01:37 +08:00
|
|
|
map->l_tls_offset = offset;
|
2003-03-02 06:32:04 +08:00
|
|
|
GL(dl_tls_static_used) = used;
|
2003-07-25 04:07:00 +08:00
|
|
|
# else
|
|
|
|
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
|
|
|
|
# endif
|
|
|
|
|
2004-12-23 04:10:10 +08:00
|
|
|
if (map->l_relocated)
|
|
|
|
GL(dl_init_static_tls) (map);
|
2003-07-31 15:34:08 +08:00
|
|
|
else
|
|
|
|
map->l_need_tls_init = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Initialize static TLS area and DTV for current (only) thread.
|
|
|
|
libpthread implementations should provide their own hook
|
|
|
|
to handle all threads. */
|
|
|
|
void
|
|
|
|
_dl_nothread_init_static_tls (struct link_map *map)
|
|
|
|
{
|
|
|
|
# if TLS_TCB_AT_TP
|
|
|
|
void *dest = (char *) THREAD_SELF - map->l_tls_offset;
|
|
|
|
# elif TLS_DTV_AT_TP
|
|
|
|
void *dest = (char *) THREAD_SELF + map->l_tls_offset + TLS_PRE_TCB_SIZE;
|
|
|
|
# else
|
|
|
|
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
|
|
|
|
# endif
|
|
|
|
|
|
|
|
/* Fill in the DTV slot so that a later LD/GD access will find it. */
|
2004-12-23 04:10:10 +08:00
|
|
|
THREAD_DTV ()[map->l_tls_modid].pointer = dest;
|
2003-07-31 15:34:08 +08:00
|
|
|
|
|
|
|
/* Initialize the memory. */
|
|
|
|
memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
|
|
|
|
'\0', map->l_tls_blocksize - map->l_tls_initimage_size);
|
2002-11-05 11:01:37 +08:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1995-05-02 14:35:55 +08:00
|
|
|
void
|
1998-09-06 17:16:53 +08:00
|
|
|
_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
|
|
|
int lazy, int consider_profiling)
|
1995-05-02 14:35:55 +08:00
|
|
|
{
|
2001-11-13 05:04:45 +08:00
|
|
|
struct textrels
|
|
|
|
{
|
|
|
|
caddr_t start;
|
|
|
|
size_t len;
|
|
|
|
int prot;
|
|
|
|
struct textrels *next;
|
|
|
|
} *textrels = NULL;
|
|
|
|
/* Initialize it to make the compiler happy. */
|
|
|
|
const char *errstring = NULL;
|
|
|
|
|
1995-05-02 14:35:55 +08:00
|
|
|
if (l->l_relocated)
|
|
|
|
return;
|
|
|
|
|
1998-08-09 08:44:23 +08:00
|
|
|
/* If DT_BIND_NOW is set relocate all references in this object. We
|
|
|
|
do not do this if we are profiling, of course. */
|
2000-09-01 05:05:59 +08:00
|
|
|
if (!consider_profiling
|
|
|
|
&& __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
|
1998-08-09 08:44:23 +08:00
|
|
|
lazy = 0;
|
|
|
|
|
2004-03-05 18:29:47 +08:00
|
|
|
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
|
2004-03-06 16:19:29 +08:00
|
|
|
_dl_debug_printf ("\nrelocation processing: %s%s\n",
|
|
|
|
l->l_name[0] ? l->l_name : rtld_progname,
|
|
|
|
lazy ? " (lazy)" : "");
|
1998-03-11 02:04:16 +08:00
|
|
|
|
2001-11-13 05:04:45 +08:00
|
|
|
/* DT_TEXTREL is now in level 2 and might phase out at some time.
|
|
|
|
But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make
|
|
|
|
testing easier and therefore it will be available at all time. */
|
2000-04-17 23:59:51 +08:00
|
|
|
if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0))
|
1995-05-02 14:35:55 +08:00
|
|
|
{
|
|
|
|
/* Bletch. We must make read-only segments writable
|
|
|
|
long enough to relocate them. */
|
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open.
(__close, __mmap): Likewise define with __ names now.
Mon Jun 10 05:13:18 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-support.c: New file.
* elf/Makefile (CFLAGS-dl-support.c): New variable.
(routines, elide-routines.so): Add dl-support.
* elf/dl-minimal.c (_dl_pagesize): Remove common defn.
* elf/dl-load.c (_dl_pagesize): Define it here.
(_dl_map_object_from_fd): Initialize it if zero.
* elf/link.h (_dl_pagesize): Remove const.
Sun Jun 9 04:04:26 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/Makefile (routines): Add dl-symbol.
* elf/dl-lookup.c (_dl_symbol_value): Moved to ...
* elf/dl-symbol.c: New file.
* elf/elf.h (Elf32_Xword, Elf32_Sxword): New types.
(Elf32_Section, Elf64_Section): New types, 16 bits.
(Elf32_Sym, Elf64_Sym): Use it.
* elf/dl-deps.c (_dl_open): Moved to ...
* elf/dl-open.c: New file.
* Makefile (routines): Add dl-open.
* elf/Makefile (dl-routines): New variable.
(routines): Add $(dl-routines).
(elide-routines.so): New variable, set to $(dl-routines).
(libdl-inhibit-o): Variable removed; build all flavors of -ldl.
(rtld-routines): All but rtld, dl-sysdep, and dl-minimal moved to
$(dl-routines).
* elf/dl-lookup.c (_dl_lookup_symbol): Remove magic symbol grokage.
* elf/dladdr.c: Use ELFW(ST_BIND) in place of ELF32_ST_BIND.
* elf/dl-load.c (open_path): Use __ names for open and close. Avoid
using strdup.
(_dl_map_object): Likewise.
(_dl_map_object_from_fd): Use __ names for mmap, munmap, and mprotect.
* elf/dl-minimal.c (malloc): Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/dl-minimal.c (_dl_pagesize): New variable.
(malloc): Use that instead of a static variable.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_pagesize instead of
calling getpagesize.
* elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* elf/link.h: Declare _dl_pagesize.
* elf/rtld.c (dl_r_debug): Renamed to _dl_r_debug.
* elf/link.h (struct link_map): Use Half for l_phnum instead of Word.
* elf/rtld.c (dl_main): Use Half for phdr count arg.
(_dl_sysdep_start): Update prototype of DL_MAIN function ptr arg.
* elf/dl-load.c (_dl_map_object_from_fd): Use explicit Elf32_Word to
extract 4-byte magic number, not ElfW(Word). Match EI_CLASS against
native wordsize, either 32 or 64.
* elf/elf.h (Elf64_Byte, Elf64_Section): Typedefs removed. In C a
char is always a byte, no need for a typedef. Section indices are
16-bit quantities in elf64, which already have a typedef Elf64_Half.
Remove partial -lelf implementation. There is now a
separately-distributed `libelf' package that implements it.
* elf/dl-lookup.c: Don't #include <libelf.h> any more.
(_dl_elf_hash): New function, moved from
libelf.h:elf_hash.
(_dl_lookup_symbol): Use it instead of elf_hash.
* elf/libelf.h: File removed.
* elf/elf_hash.c: File removed.
* elf/Makefile (headers): Remove libelf.h.
(extra-libs): Remove libelf.
(libelf-routines): Variable removed.
* elf/Makefile (libdl.so): Remove commands from this target. The
implicit rule commands are correct, this explicit rule just serves to
add some dependencies.
* elf/dl-lookup.c (_dl_lookup_symbol): Use ELFW(ST_TYPE) in place of
ELF32_ST_TYPE. Likewise ST_BIND.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise R_SYM.
* elf/link.h (ElfW): New macro for wordsize-independent ElfXX_* type
naming.
(ELFW): New macro, likewise for ELFXX_* macro naming.
(_ElfW, _ElfW_1): New macros, subroutines of ElfW and ELF.
Sat Jun 8 20:52:38 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h, elf/do-rel.h, elf/dynamic-link.h, elf/dl-deps.c,
elf/dl-init.c, elf/dl-load.c, elf/dl-lookup.c, elf/dl-reloc.c,
elf/dl-runtime.c, elf/dladdr.c, elf/dlclose.c, elf/dlsym.c,
elf/linux-compat.c, elf/rtld.c: Change all uses of `Elf32_XXX' to
`ElfW(XXX)' for wordsize-independence.
Sat Jun 8 20:50:42 1996 Richard Henderson <rth@tamu.edu>
* elf/elf.h: Move Elf64_* types in parity with Elf32 counterparts.
(Elf64_auxv_t): New type.
(EM_ALPHA, R_ALPHA_*): New macros for elf64-alpha format.
1996-06-10 18:18:47 +08:00
|
|
|
const ElfW(Phdr) *ph;
|
1995-05-02 14:35:55 +08:00
|
|
|
for (ph = l->l_phdr; ph < &l->l_phdr[l->l_phnum]; ++ph)
|
|
|
|
if (ph->p_type == PT_LOAD && (ph->p_flags & PF_W) == 0)
|
|
|
|
{
|
2001-11-13 05:04:45 +08:00
|
|
|
struct textrels *newp;
|
|
|
|
|
|
|
|
newp = (struct textrels *) alloca (sizeof (*newp));
|
2004-03-05 18:29:47 +08:00
|
|
|
newp->len = (((ph->p_vaddr + ph->p_memsz + GLRO(dl_pagesize) - 1)
|
|
|
|
& ~(GLRO(dl_pagesize) - 1))
|
|
|
|
- (ph->p_vaddr & ~(GLRO(dl_pagesize) - 1)));
|
|
|
|
newp->start = ((ph->p_vaddr & ~(GLRO(dl_pagesize) - 1))
|
2001-11-13 05:04:45 +08:00
|
|
|
+ (caddr_t) l->l_addr);
|
|
|
|
|
|
|
|
if (__mprotect (newp->start, newp->len, PROT_READ|PROT_WRITE) < 0)
|
|
|
|
{
|
|
|
|
errstring = N_("cannot make segment writable for relocation");
|
|
|
|
call_error:
|
2004-03-06 16:19:29 +08:00
|
|
|
_dl_signal_error (errno, l->l_name, NULL, errstring);
|
2001-11-13 05:04:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7
|
|
|
|
newp->prot = (PF_TO_PROT
|
|
|
|
>> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf;
|
|
|
|
#else
|
|
|
|
newp->prot = 0;
|
|
|
|
if (ph->p_flags & PF_R)
|
|
|
|
newp->prot |= PROT_READ;
|
|
|
|
if (ph->p_flags & PF_W)
|
|
|
|
newp->prot |= PROT_WRITE;
|
|
|
|
if (ph->p_flags & PF_X)
|
|
|
|
newp->prot |= PROT_EXEC;
|
|
|
|
#endif
|
|
|
|
newp->next = textrels;
|
|
|
|
textrels = newp;
|
1995-05-02 14:35:55 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
1996-06-11 04:19:39 +08:00
|
|
|
/* Do the actual relocation of the object's GOT and other data. */
|
1995-05-02 14:35:55 +08:00
|
|
|
|
Update.
* elf/dynamic-link.h (elf_get_dynamic_info): Take new argument with
load address. Relocate d_ptr in DT_DTRTAB, DT_SYMTAB, DT_RELA, DT_REL,
DT_JMPREL, DT_PLTGOT, and DT_VERSYM l_info entry.
(_ELF_DYNAMIC_DO_RELOC): Take extra argument which specifies whether
rel and rela relocations can both happen and skip one test if this
is not possible.
(ELF_DYNAMIC_DO_RELA, ELF_DYNAMIC_DO_REL): Call _ELF_DYNAMIC_DO_RELOC
appropriately.
* elf/dl-addr.c (_dl_addr): DT_SYMTAB and DT_STRTAB entries are
already relocated.
* elf/dl-deps.c (_dl_map_object_deps): DT_STRTAB entry is already
relocated.
* elf/dl-load.c (_dl_init_paths): DT_STRTAB entry is already relocated.
(_dl_map_object_from_fd): Call elf_get_dynamic_info with new argument.
(_dl_map_object): DT_STRTAB entry is already relocated.
* elf/dl-lookup.c (do_lookup): DT_STRTAB and DT_SYMTAB entries are
already relocated.
* elf/dl-reloc.c (_dl_relocate_object): DT_STRTAB entry is already
relocated.
* elf/dl-runtime.c (fixup): DT_SYMTAB, DT_STRTAB, DT_JMPREL, and
DT_VERSYM entries are already relocated.
(profile_fixup): Likewise.
* elf/dl-version.c: Rename VERSTAG macro into VERSYMIDX. Replace
all users.
(match_symbol): DT_STRTAB entry is already relocated.
(_dl_check_map_versions): Likewise. Also fo DT_VERSYM.
* elf/do-rel.h (elf_dynamic_do_rel): reladdr is now assumed to be
relocated already. DT_SYMTAB and DT_VERSYM entries are also relocated.
* elf/rtld.c (_dl_start): Pass extra argument to elf_get_dynamic_info.
(find_needed): DT_STRTAB entry is already relocated.
(dl_main): Pass extra argument to elf_get_dynamic_info.
DT_STRTAB entry is already relocated.
* sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): DT_JMPREL and
DT_PLTGOT entries are already relocated.
(elf_machine_rela): Likewise for DT_SYMTAB.
* sysdeps/arm/dl-machine.h (elf_machine_rel): DT_STRTAB is already
relocated.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/powerpc/dl-machine.c (__process_machine_rela): Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Likewise.
(elf_machine_got_rel): Likewise for DT_SYMTAB and DT_STRTAB.
* grp/initgroups.c (initgroups): If function in current module was
successful don't stop but continue to process to get all the groups.
1999-02-20 23:02:24 +08:00
|
|
|
/* String table object symbols. */
|
2000-03-24 04:31:46 +08:00
|
|
|
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
|
1995-05-02 14:35:55 +08:00
|
|
|
|
1996-07-14 19:39:25 +08:00
|
|
|
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
2001-08-27 06:28:16 +08:00
|
|
|
#define RESOLVE_MAP(ref, version, r_type) \
|
2000-05-05 15:15:29 +08:00
|
|
|
(ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
|
2001-08-26 18:50:26 +08:00
|
|
|
? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
|
2001-08-27 06:28:16 +08:00
|
|
|
&& elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
|
2002-01-30 08:38:09 +08:00
|
|
|
? (bump_num_cache_relocations (), \
|
2001-08-26 18:50:26 +08:00
|
|
|
(*ref) = l->l_lookup_cache.ret, \
|
|
|
|
l->l_lookup_cache.value) \
|
|
|
|
: ({ lookup_t _lr; \
|
2001-08-27 06:28:16 +08:00
|
|
|
int _tc = elf_machine_type_class (r_type); \
|
|
|
|
l->l_lookup_cache.type_class = _tc; \
|
2001-08-26 18:50:26 +08:00
|
|
|
l->l_lookup_cache.sym = (*ref); \
|
2004-03-07 13:26:02 +08:00
|
|
|
const struct r_found_version *v = NULL; \
|
|
|
|
int flags = DL_LOOKUP_ADD_DEPENDENCY; \
|
|
|
|
if ((version) != NULL && (version)->hash != 0) \
|
|
|
|
{ \
|
|
|
|
v = (version); \
|
|
|
|
flags = 0; \
|
|
|
|
} \
|
|
|
|
_lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
|
|
|
|
scope, v, _tc, flags, NULL); \
|
2001-08-26 18:50:26 +08:00
|
|
|
l->l_lookup_cache.ret = (*ref); \
|
|
|
|
l->l_lookup_cache.value = _lr; })) \
|
2000-05-05 15:15:29 +08:00
|
|
|
: l)
|
2004-12-23 04:10:10 +08:00
|
|
|
#define RESOLVE(ref, version, r_type) \
|
|
|
|
(ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
|
|
|
|
? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
|
|
|
|
&& elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
|
|
|
|
? (bump_num_cache_relocations (), \
|
|
|
|
(*ref) = l->l_lookup_cache.ret, \
|
|
|
|
l->l_lookup_cache.value) \
|
|
|
|
: ({ lookup_t _lr; \
|
|
|
|
int _tc = elf_machine_type_class (r_type); \
|
|
|
|
l->l_lookup_cache.type_class = _tc; \
|
|
|
|
l->l_lookup_cache.sym = (*ref); \
|
|
|
|
const struct r_found_version *v = NULL; \
|
|
|
|
int flags = DL_LOOKUP_ADD_DEPENDENCY; \
|
|
|
|
if ((version) != NULL && (version)->hash != 0) \
|
|
|
|
{ \
|
|
|
|
v = (version); \
|
|
|
|
flags = 0; \
|
|
|
|
} \
|
|
|
|
_lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
|
|
|
|
scope, v, _tc, flags, NULL); \
|
|
|
|
l->l_lookup_cache.ret = (*ref); \
|
|
|
|
l->l_lookup_cache.value = _lr; })) \
|
|
|
|
: l->l_addr)
|
1996-07-14 19:39:25 +08:00
|
|
|
|
2002-11-05 11:01:37 +08:00
|
|
|
/* This macro is used as a callback from elf_machine_rel{a,} when a
|
|
|
|
static TLS reloc is about to be performed. Since (in dl-load.c) we
|
|
|
|
permit dynamic loading of objects that might use such relocs, we
|
|
|
|
have to check whether each use is actually doable. If the object
|
|
|
|
whose TLS segment the reference resolves to was allocated space in
|
|
|
|
the static TLS block at startup, then it's ok. Otherwise, we make
|
|
|
|
an attempt to allocate it in surplus space on the fly. If that
|
|
|
|
can't be done, we fall back to the error that DF_STATIC_TLS is
|
|
|
|
intended to produce. */
|
2002-10-17 20:10:17 +08:00
|
|
|
#define CHECK_STATIC_TLS(map, sym_map) \
|
|
|
|
do { \
|
2003-04-25 17:12:43 +08:00
|
|
|
if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET, 0)) \
|
2003-07-31 15:34:08 +08:00
|
|
|
_dl_allocate_static_tls (sym_map); \
|
2002-10-17 20:10:17 +08:00
|
|
|
} while (0)
|
|
|
|
|
1996-07-14 19:39:25 +08:00
|
|
|
#include "dynamic-link.h"
|
2001-08-24 07:36:47 +08:00
|
|
|
|
1998-06-07 22:06:56 +08:00
|
|
|
ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling);
|
1998-03-04 17:53:17 +08:00
|
|
|
|
2001-08-11 16:57:41 +08:00
|
|
|
if (__builtin_expect (consider_profiling, 0))
|
1998-03-04 17:53:17 +08:00
|
|
|
{
|
|
|
|
/* Allocate the array which will contain the already found
|
2000-06-20 12:18:25 +08:00
|
|
|
relocations. If the shared object lacks a PLT (for example
|
2000-06-22 21:57:50 +08:00
|
|
|
if it only contains lead function) the l_info[DT_PLTRELSZ]
|
2000-06-20 12:18:25 +08:00
|
|
|
will be NULL. */
|
|
|
|
if (l->l_info[DT_PLTRELSZ] == NULL)
|
2001-11-07 14:32:27 +08:00
|
|
|
{
|
2004-12-23 04:10:10 +08:00
|
|
|
errstring = N_("%s: profiler found no PLTREL in object %s\n");
|
2001-11-07 14:32:27 +08:00
|
|
|
fatal:
|
|
|
|
_dl_fatal_printf (errstring,
|
2002-03-01 17:44:29 +08:00
|
|
|
rtld_progname ?: "<program name unknown>",
|
2001-11-07 14:32:27 +08:00
|
|
|
l->l_name);
|
|
|
|
}
|
2000-06-20 12:18:25 +08:00
|
|
|
|
2004-12-23 04:10:10 +08:00
|
|
|
l->l_reloc_result =
|
|
|
|
(ElfW(Addr) *) calloc (sizeof (ElfW(Addr)),
|
|
|
|
l->l_info[DT_PLTRELSZ]->d_un.d_val);
|
1998-03-04 17:53:17 +08:00
|
|
|
if (l->l_reloc_result == NULL)
|
2001-11-07 14:32:27 +08:00
|
|
|
{
|
|
|
|
errstring = N_("\
|
2004-12-23 04:10:10 +08:00
|
|
|
%s: profiler out of memory shadowing PLTREL of %s\n");
|
2001-11-07 14:32:27 +08:00
|
|
|
goto fatal;
|
|
|
|
}
|
1998-03-04 17:53:17 +08:00
|
|
|
}
|
1995-05-02 14:35:55 +08:00
|
|
|
}
|
|
|
|
|
Update.
<1997-06-12 21:22 Ulrich Drepper <drepper@cygnus.com>
* Makefile (libc-map): Define before including Makerules.
* Makerules (lib%.so): Depend on $(lib%-map).
(build-shlib): Adapt rule for above change.
(libc.so): Depend on $(libc-map).
* db/Makefile (libcdb-map): New definition.
* elf/Makefile (libdl-map): New definition.
* elf/dl-lookup.c: Don't use relative include path.
(undefined_msg): New variable. Use single string in all functions.
(do_lookup): Correctly recognize default version.
Return -2 if no version information is available.
Stop processing hash entries when string was found.
Don't bark about missing versioned symbol in file with original
reference if it is a weak symbol.
(_dl_lookup_symbol): Use undefined_msg.
(_dl_lookup_versioned_symbol): Likewise.
Give extra information if no verdef info is available.
* elf/dl-version.c (file_needed): Remove first argument. We must
seek in the whole search list.
(match_symbol): Correct check for available verdef info.
(_dl_check_map_versions): Correct call of find_needed.
* locale/Makefile (libBrokenLocale-map): New definition.
* login/Makefile (libutil-map): New definition.
* math/Makefile (libm-map): New definition.
* md5-crypt/Makefile (libcrypt-map): New definition.
* nis/Makefile (libnsl-map, libnss_compat-map, libnss_nis-map,
libnss_nisplus-map): New definition.
* nss/Makefile (libnss_files-map, libnss_db-map): New definitions.
* resolv/Makefile (libresolv-map, libnss_dns-map): New definitions.
* libc.map: New file.
* db/libdb.map: New file.
* elf/libdl.map: New file.
* locale/libBrokenLocale.map: New file.
* login/libutil.map: New file.
* math/libm.map: New file.
* md5-crypt/libcrypt.map: New file.
* nis/libnss_compat.map: New file.
* nis/libnsl.map: New file.
* nis/libnss_nis.map: New file.
* nis/libnss_nisplus.map: New file.
* nss/libnss_files.map: New file.
* nss/libnss_db.map: New file.
* resolv/libnss_dns.map: New file.
* resolv/libresolv.map: New file.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Don't do anything
for R_386_NONE entries.
* Makefile (manual/dir-add.info): New rule.
* Makerules: Add vpath definition for .x files.
* Makerules (distinfo): Make sure target directory exists.
* argp/argp-help.c (argp_args_usage): Don't modify `fdoc' value
since it is used to distinguish filtered strings from unmodifed
strings.
* elf/dl-lookup.c (do_lookup): Optimize STT_* recognition.
* elf/dl-reloc.c: Fix typo.
* inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to
`unsigned short'.
* manual/Makefile (dir-add.texi): Also emit wrapper text for
info/install-info.
(distribute): Add dir-add.texi and dir-add.info.
(mostlyclean): Add dir-add.info.
(realclean): Add dir-add.texi.
(install): Add entries in `dir' file using install-info.
* manual/libc.texinfo: Add @dircategory and @direntry text.
Reported by Miles Bader <miles@gnu.ai.mit.edu>.
* manual/pattern.texi: Correct description of GLOB_MAGCHAR and
GLOB_NOMAGIC. Changes by Roland McGrath <roland@gnu.ai.mit.edu>.
* nis/nis_addmember.c: Little optimizations.
* nis/nis_call.c: Likewise.
* nis/nis_creategroup.c: Likewise.
* nis/nis_defaults.c: Likewise.
* nis/nis_destroygroup.c: Likewise.
* nis/nis_ismember.c: Likewise.
* nis/nis_local_names.c: Likewise.
* nis/nis_print_group_entry.c: Likewise.
* nis/nis_verifygroup.c: Likewise.
* posix/unistd.h: Fix comment for getcwd.
* stdlib/Makefile (headers): Remove inttypes.h. It's a system
dependent header.
* sysdeps/wordsize-32/Dist: New file.
* sysdeps/wordsize-32/Makefile: New file.
* sysdeps/wordsize-64/Dist: New file.
* sysdeps/wordsize-64/Makefile: New file.
* sunrpc/Makefile: Adopt comment for real situation.
* sysdeps/i386/add_n.S: Add ASM_TYPE_DIRECTIVE and AS_SIZE_DIRECTIVE.
* sysdeps/i386/addmul_1.s: Likewise.
* sysdeps/i386/lshist.s: Likewise.
* sysdeps/i386/rshift.s: Likewise.
* sysdeps/i386/sub_n.s: Likewise.
* sysdeps/i386/submul_1.s: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
Add .type and .size.
1997-06-12 13:32 Philip Blundell <Philip.Blundell@pobox.com>
* libc/sysdeps/unix/arm/brk.S: New file.
* libc/sysdeps/unix/arm/sysdep.S: Likewise.
* libc/sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
1997-06-11 11:51 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent):
Check if we have shadow information.
1997-06-08 19:33 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_getservlist.c (nis_getservlist): Use calloc instead of
malloc, alloc memory for nis_server struct.
* nis/nis_getservlist.c (nis_freeservlist): Give the memory for
the nis_server struct free, too.
* nis/nis_removemember (nis_removemember): Fix for loop.
1997-06-12 12:45 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we
cannot rely on M_SQRT2 being defined. (log1p): Use __M_SQRT2 not
M_SQRT2.
* math/math.h (_Mldbl): Define even if M_* constants are not
defined.
Reported by corsepiu@faw.uni-ulm.de.
1997-06-12 03:08 Philip Blundell <Philip.Blundell@pobox.com>
* nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses.
1997-06-11 13:22 Ulrich Drepper <drepper@cygnus.com>
* misc/regexp.h (compile): Allow use of macro INIT for variable
declaration. Add documentation for INIT.
Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.
1997-06-11 10:47 Philip Blundell <Philip.Blundell@pobox.com>
* sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types.
1997-06-10 11:31 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/powerpc/strlen.s: Use -0x101 instead of 0xfffffeff
for a signed 16-bit value.
1997-06-07 07:54 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
(_dl_sysdep_read_whole_file): Deleted.
* sysdeps/powerpc/fenvbits.h (__FE_ALL_INVALID): Changed
to FE_ALL_INVALID.
* sysdeps/powerpc/fraiseexcpt.c (__FE_INVALID_SOFTWARE):
Changed to FE_INVALID_SOFTWARE.
(__FPSCR_STICKY_BITS): Changed to FPSCR_STICKY_BITS.
* sysdeps/libm-ieee754/s_fmin.c: Fix a typo.
1997-06-07 18:48 H.J. Lu <hjl@gnu.ai.mit.edu>
* shlib-versions (.*-.*-linux.*): Set libc to 6.
1997-06-08 15:35 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_add.c (nis_add): Use nis_leaf_of_r instead of nis_name_of_r.
* nis/nis_addmember.c (nis_addmember): Fix a lot of pointer errors.
* nis/nis_clone.c: Likewise.
* nis/nis_removemember.c (nis_removemember): Likewise.
* nis/nis_table.c: Likewise.
* nis/nss_nis/nis-hosts.c: Use addr, not p for inet_pton call.
* nis/nss_nisplus/nisplus-hosts.c: Likewise.
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Check for
group == NULL.
1997-06-08 21:21 Mark Kettenis <kettenis@phys.uva.nl>
* login/login.c, login/utmp_daemon.c, login/utmp_file.c,
login/getutent_r.c, login/utmpname.c: Cleanup `#if _LIBC' and
`#ifndef _LIBC' fragments.
* login/programs/utmpd.c: Define DEFAULT_USER.
(drop_priviliges): Use it.
(main): Set locale and text domain.
* login/programs/utmpd-private.h: Declare proc_utmp_eq.
* login/programs/database.c (proc_utmp_eq): Removed.
* login/programs/request.c (proc_utmp_eq): Made global. Only use
ut_id field if valid.
* login/utmp_file.c (proc_utmp_eq): Restore patch made by Miles
Bader that was lost when adding the daemon backend; Only use ut_id
field if valid.
1997-06-05 23:10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and
netinet/icmp.h, add netatalk/at.h.
* sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h.
* sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c.
1997-06-04 19:22 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdlib/testsort.c (compare): Fix parameter types.
1997-06-04 19:05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* md5-crypt/Makefile (distribute): Fix name of file.
1997-06-04 19:02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/Makefile (utmpd-routines): Remove utmpd again, which is
already added implicitly through $(others).
1997-06-05 13:43 Fila Kolodny <fila@filapc.ibi.com>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h.
1997-06-05 13:25 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* md5-crypt/md5-crypt.c: Add prototype for __md5_crypt.
1997-06-05 17:08 Ulrich Drepper <drepper@cygnus.com>
* string/argz-addsep.c: Correct weak alias.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
* locale/setlocale.c (setlocale): Free variable with locale path
before returning.
(setname): Don't test for _nl_current[category] being NULL before
freeing.
Reported by Ben Pfaff <pfaffben@pilot.msu.edu>.
1997-06-04 12:41 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/intro.texi (XPG): Correct some typos.
* manual/libc.texinfo (Program Arguments): Menu updated.
* nis/nis_local_names.c (nis_local_host): Fix pointer errors.
1997-06-13 05:38:55 +08:00
|
|
|
/* Mark the object so we know this work has been done. */
|
1995-05-02 14:35:55 +08:00
|
|
|
l->l_relocated = 1;
|
|
|
|
|
2001-11-13 05:04:45 +08:00
|
|
|
/* Undo the segment protection changes. */
|
|
|
|
while (__builtin_expect (textrels != NULL, 0))
|
1995-05-02 14:35:55 +08:00
|
|
|
{
|
2001-11-13 05:04:45 +08:00
|
|
|
if (__mprotect (textrels->start, textrels->len, textrels->prot) < 0)
|
|
|
|
{
|
|
|
|
errstring = N_("cannot restore segment prot after reloc");
|
|
|
|
goto call_error;
|
|
|
|
}
|
1999-02-20 17:52:46 +08:00
|
|
|
|
2001-11-13 05:04:45 +08:00
|
|
|
textrels = textrels->next;
|
1995-05-02 14:35:55 +08:00
|
|
|
}
|
2004-01-13 16:36:54 +08:00
|
|
|
|
|
|
|
/* In case we can protect the data now that the relocations are
|
|
|
|
done, do it. */
|
|
|
|
if (l->l_relro_size != 0)
|
2004-01-24 16:33:05 +08:00
|
|
|
_dl_protect_relro (l);
|
|
|
|
}
|
2004-03-06 16:19:29 +08:00
|
|
|
|
2004-01-13 16:36:54 +08:00
|
|
|
|
2004-01-24 16:33:05 +08:00
|
|
|
void internal_function
|
|
|
|
_dl_protect_relro (struct link_map *l)
|
|
|
|
{
|
2004-03-05 18:29:47 +08:00
|
|
|
ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
|
|
|
|
& ~(GLRO(dl_pagesize) - 1));
|
2004-01-24 16:33:05 +08:00
|
|
|
ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
|
2004-03-05 18:29:47 +08:00
|
|
|
& ~(GLRO(dl_pagesize) - 1));
|
2004-01-24 16:33:05 +08:00
|
|
|
|
|
|
|
if (start != end
|
|
|
|
&& __mprotect ((void *) start, end - start, PROT_READ) < 0)
|
|
|
|
{
|
2004-03-06 16:19:29 +08:00
|
|
|
static const char errstring[] = N_("\
|
2004-01-13 16:36:54 +08:00
|
|
|
cannot apply additional memory protection after relocation");
|
2004-03-06 16:19:29 +08:00
|
|
|
_dl_signal_error (errno, l->l_name, NULL, errstring);
|
2004-01-13 16:36:54 +08:00
|
|
|
}
|
1995-05-02 14:35:55 +08:00
|
|
|
}
|
1999-07-22 00:58:06 +08:00
|
|
|
|
|
|
|
void
|
Update.
2003-01-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
variable.
* sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2003-01-31 02:04:01 +08:00
|
|
|
internal_function __attribute_noinline__
|
2001-11-06 06:13:46 +08:00
|
|
|
_dl_reloc_bad_type (struct link_map *map, unsigned int type, int plt)
|
1999-07-22 00:58:06 +08:00
|
|
|
{
|
2002-03-14 07:27:20 +08:00
|
|
|
extern const char INTUSE(_itoa_lower_digits)[] attribute_hidden;
|
|
|
|
#define DIGIT(b) INTUSE(_itoa_lower_digits)[(b) & 0xf];
|
2001-11-06 06:13:46 +08:00
|
|
|
|
|
|
|
/* XXX We cannot translate these messages. */
|
2002-10-25 15:54:26 +08:00
|
|
|
static const char msg[2][32
|
|
|
|
#if __ELF_NATIVE_CLASS == 64
|
|
|
|
+ 6
|
|
|
|
#endif
|
|
|
|
] = { "unexpected reloc type 0x",
|
|
|
|
"unexpected PLT reloc type 0x" };
|
2001-11-06 06:13:46 +08:00
|
|
|
char msgbuf[sizeof (msg[0])];
|
|
|
|
char *cp;
|
|
|
|
|
|
|
|
cp = __stpcpy (msgbuf, msg[plt]);
|
2002-10-25 15:54:26 +08:00
|
|
|
#if __ELF_NATIVE_CLASS == 64
|
|
|
|
if (__builtin_expect(type > 0xff, 0))
|
|
|
|
{
|
|
|
|
*cp++ = DIGIT (type >> 28);
|
|
|
|
*cp++ = DIGIT (type >> 24);
|
|
|
|
*cp++ = DIGIT (type >> 20);
|
|
|
|
*cp++ = DIGIT (type >> 16);
|
|
|
|
*cp++ = DIGIT (type >> 12);
|
|
|
|
*cp++ = DIGIT (type >> 8);
|
|
|
|
}
|
|
|
|
#endif
|
2001-11-06 06:13:46 +08:00
|
|
|
*cp++ = DIGIT (type >> 4);
|
2002-08-26 05:52:49 +08:00
|
|
|
*cp++ = DIGIT (type);
|
|
|
|
*cp = '\0';
|
2001-11-06 06:13:46 +08:00
|
|
|
|
2004-03-06 16:19:29 +08:00
|
|
|
_dl_signal_error (0, map->l_name, NULL, msgbuf);
|
1999-07-22 00:58:06 +08:00
|
|
|
}
|