glibc/sysdeps/generic/dl-machine.h

137 lines
4.1 KiB
C
Raw Normal View History

/* Machine-dependent ELF dynamic relocation inline functions. Stub version.
Copyright (C) 1995-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
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.
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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
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 07:40:42 +02:00
<https://www.gnu.org/licenses/>. */
#define ELF_MACHINE_NAME "stub"
#include <string.h>
#include <link.h>
elf: Fix dynamic-link.h usage on rtld.c The 4af6982e4c fix does not fully handle RTLD_BOOTSTRAP usage on rtld.c due two issues: 1. RTLD_BOOTSTRAP is also used on dl-machine.h on various architectures and it changes the semantics of various machine relocation functions. 2. The elf_get_dynamic_info() change was done sideways, previously to 490e6c62aa get-dynamic-info.h was included by the first dynamic-link.h include *without* RTLD_BOOTSTRAP being defined. It means that the code within elf_get_dynamic_info() that uses RTLD_BOOTSTRAP is in fact unused. To fix 1. this patch now includes dynamic-link.h only once with RTLD_BOOTSTRAP defined. The ELF_DYNAMIC_RELOCATE call will now have the relocation fnctions with the expected semantics for the loader. And to fix 2. part of 4af6982e4c is reverted (the check argument elf_get_dynamic_info() is not required) and the RTLD_BOOTSTRAP pieces are removed. To reorganize the includes the static TLS definition is moved to its own header to avoid a circular dependency (it is defined on dynamic-link.h and dl-machine.h requires it at same time other dynamic-link.h definition requires dl-machine.h defitions). Also ELF_MACHINE_NO_REL, ELF_MACHINE_NO_RELA, and ELF_MACHINE_PLT_REL are moved to its own header. Only ancient ABIs need special values (arm, i386, and mips), so a generic one is used as default. The powerpc Elf64_FuncDesc is also moved to its own header, since csu code required its definition (which would require either include elf/ folder or add a full path with elf/). Checked on x86_64, i686, aarch64, armhf, powerpc64, powerpc32, and powerpc64le. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2021-10-13 14:49:34 +02:00
#include <dl-static-tls.h>
#include <dl-machine-rel.h>
Update. 2000-10-19 H.J. Lu <hjl@gnu.org> * elf/Makefile (distribute): Add neededtest.c, neededobj1.c, neededobj2.c and neededobj3.c. (tests): Add neededtest. (modules-names): Add neededobj1, neededobj2 and neededobj3. ($(objpfx)neededobj1.so): New target. ($(objpfx)neededobj2.so): Likewise. ($(objpfx)neededobj3.so): Likewise. ($(objpfx)neededtest): Likewise. ($(objpfx)neededtest.out): Likewise. * elf/neededtest.c: New. Based on the bug report from Allen Bauer <kylix_rd@hotmail.com>. * elf/neededobj1.c: Likewise. * elf/neededobj2.c: Likewise. * elf/neededobj3.c: Likewise. 2000-10-20 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Decrement reference counter for all dependencies even if the DSO does not get unloaded. * elf/dl-load.c (_dl_map_object_from_fd): Pass pointer to ELF header to elf_machine_matches_host. * sysdeps/alpha/dl-machine.h (elf_machine_matches_host): Parameter is now pointer to ELF header. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/generic/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. Patch by Martin Schwidefsksy <schwidefsky@de.ibm.com>. 2000-10-20 Jakub Jelinek <jakub@redhat.com> * include/limits.h: Include bits/wordsize.h, use #if __WORDSIZE == 64 check instead of #ifdef __alpha__. * include/bits/xopen_lim.h (WORD_BIT, LONG_BIT): Don't count on INT_MAX, __INT_MAX__, LONG_MAX or __LONG_MAX__ being defined when this is included. * posix/wordexp-tst.sh (testout): Place output file in build directory. Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-10-21 02:02:39 +02:00
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
Update. 2000-10-19 H.J. Lu <hjl@gnu.org> * elf/Makefile (distribute): Add neededtest.c, neededobj1.c, neededobj2.c and neededobj3.c. (tests): Add neededtest. (modules-names): Add neededobj1, neededobj2 and neededobj3. ($(objpfx)neededobj1.so): New target. ($(objpfx)neededobj2.so): Likewise. ($(objpfx)neededobj3.so): Likewise. ($(objpfx)neededtest): Likewise. ($(objpfx)neededtest.out): Likewise. * elf/neededtest.c: New. Based on the bug report from Allen Bauer <kylix_rd@hotmail.com>. * elf/neededobj1.c: Likewise. * elf/neededobj2.c: Likewise. * elf/neededobj3.c: Likewise. 2000-10-20 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Decrement reference counter for all dependencies even if the DSO does not get unloaded. * elf/dl-load.c (_dl_map_object_from_fd): Pass pointer to ELF header to elf_machine_matches_host. * sysdeps/alpha/dl-machine.h (elf_machine_matches_host): Parameter is now pointer to ELF header. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/generic/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. Patch by Martin Schwidefsksy <schwidefsky@de.ibm.com>. 2000-10-20 Jakub Jelinek <jakub@redhat.com> * include/limits.h: Include bits/wordsize.h, use #if __WORDSIZE == 64 check instead of #ifdef __alpha__. * include/bits/xopen_lim.h (WORD_BIT, LONG_BIT): Don't count on INT_MAX, __INT_MAX__, LONG_MAX or __LONG_MAX__ being defined when this is included. * posix/wordexp-tst.sh (testout): Place output file in build directory. Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-10-21 02:02:39 +02:00
elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
Update. 2000-10-19 H.J. Lu <hjl@gnu.org> * elf/Makefile (distribute): Add neededtest.c, neededobj1.c, neededobj2.c and neededobj3.c. (tests): Add neededtest. (modules-names): Add neededobj1, neededobj2 and neededobj3. ($(objpfx)neededobj1.so): New target. ($(objpfx)neededobj2.so): Likewise. ($(objpfx)neededobj3.so): Likewise. ($(objpfx)neededtest): Likewise. ($(objpfx)neededtest.out): Likewise. * elf/neededtest.c: New. Based on the bug report from Allen Bauer <kylix_rd@hotmail.com>. * elf/neededobj1.c: Likewise. * elf/neededobj2.c: Likewise. * elf/neededobj3.c: Likewise. 2000-10-20 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Decrement reference counter for all dependencies even if the DSO does not get unloaded. * elf/dl-load.c (_dl_map_object_from_fd): Pass pointer to ELF header to elf_machine_matches_host. * sysdeps/alpha/dl-machine.h (elf_machine_matches_host): Parameter is now pointer to ELF header. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/generic/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. Patch by Martin Schwidefsksy <schwidefsky@de.ibm.com>. 2000-10-20 Jakub Jelinek <jakub@redhat.com> * include/limits.h: Include bits/wordsize.h, use #if __WORDSIZE == 64 check instead of #ifdef __alpha__. * include/bits/xopen_lim.h (WORD_BIT, LONG_BIT): Don't count on INT_MAX, __INT_MAX__, LONG_MAX or __LONG_MAX__ being defined when this is included. * posix/wordexp-tst.sh (testout): Place output file in build directory. Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
2000-10-21 02:02:39 +02:00
switch (ehdr->e_machine)
{
default:
return 0;
}
}
/* Return the link-time address of _DYNAMIC. */
static inline Elf32_Addr
elf_machine_dynamic (void)
{
#error "Damn, no _DYNAMIC"
}
/* Return the run-time load address of the shared object. */
static inline Elf32_Addr
elf_machine_load_address (void)
{
#error "Where am I?"
}
Update. 1997-09-27 01:14 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (extra-objs): Depend in before-compile. * configure.in: Locate Perl and substitute with complete path. * config.make.in: Add PERL for substitution. * elf/Makefile (routines): Add dl-addr. * elf/dladdr.c: Move the real code into ... * elf/dl-addr.c: New file. * elf/link.h: Add prototype for _dl_addr. * elf/dladdr.c (dladdr): Change address argument to be const. * elf/dlfcn.h: Likewise. * locale/C_name.c: Add _nl_POSIX_name. * locale/localeinfo.h: Add declaration of _nl_POSIX_name. * locale/findlocale.c (_nl_find_locale): Use _nl_POSIX_name. (_nl_remove_locale): Free name of data set. * locale/setlocale.c (clever_copy): Remove. (new_composite_name): Use _nl_C_name and _nl_POSIX_name in compare. (setname): Only remove old name when it is for category LC_ALL. Change malloc, free, realloc, and memalign hooks for glibc to take another parameter indicating the location of the caller. * malloc/malloc.c: Change hook functions and variables. * malloc/malloc.h: Likewise. * malloc/mcheck.c: Likewise. Make sure later hooked function also get the original caller address. * malloc/mtrace.c: Likewise. (tr_where): If no information in _mtrace_file is given use the information about the caller. * malloc/Makefile (distribute): Replace mtrace.awk by mtrace.pl. Add rules to install mtrace.pl after rewriting. * malloc/mtrace.pl: New file. Based on the old AWK script but with extended functionality. * malloc/mtrace.awk: Removed. * po/fr.po: New version. * string/Makefile: Do use builtins for tester.c and inl-tester.c. * string/tester.c: Rewrite. Split in many small functions to not exceed gcc's limits. * sysdeps/unix/sysv/linux/syscalls.list: Add prctl. 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/bits/string2.h (__stpcpy_small): Don't use casts as lvalues. 1997-09-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/time.texi (Formatting Date and Time): Clarify explanation of strftime flags a bit. Suggested by Robert Bihlmeyer <robbe@orcus.priv.at>. 1997-09-25 00:13 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/libm-ieee754/s_exp2f.c: Protect _GNU_SOURCE definition. Fix typo, it is FLT_MANT_DIG. 1997-09-24 18:52 H.J. Lu <hjl@gnu.ai.mit.edu> * math/atest-exp2.c: Include <stdlib/gmp.h> instead of <gmp.h>. 1997-08-27 08:10 H.J. Lu <hjl@gnu.ai.mit.edu> * libio/libio.h, libio/libioP.h: Support libio in libstdc++. * libio/libio.h (_IO_peekc): Defined as _IO_peekc_unlocked if _IO_MTSAFE_IO is undefined. 1997-09-24 23:27 Richard Henderson <rth@cygnus.com> * elf/dl-runtime.c (fixup): Don't go through elf_machine_relplt, but lookup the value of the target symbol ourselves and call the new elf_machine_fixup_plt. This kills the ELF_FIXUP_RETURN_VALUE hack. (profile_fixup): Likewise, but don't fix up the plt. * elf/rtld.c (_dl_main): ELF_MACHINE_RELOC_NOPLT renamed _JMP_SLOT. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RELOC_NOPLT): Renamed. (elf_alpha_fix_plt): Renamed elf_machine_fixup_plt. * sysdeps/i386/dl-machine.h (elf_machine_relplt): Killed. (ELF_MACHINE_JMP_SLOT): Renamed. (elf_machine_fixup_plt): New function. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. (elf_machine_rela): Moved JMP_SLOT fixup out to elf_machine_fixup_plt. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/stub/dl-machine.h: Update, sorta. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Do profiling. (TRAMPOLINE_TEMPLATE): From the carcas of _RUNTIME_TRAMPOLINE, do both normal and profile code. (elf_machine_rela): Handle r_addend for .got and .plt too.
1997-09-27 02:21:42 +02:00
/* Fixup a PLT entry to bounce directly to the function at VALUE. */
PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY ELFv2 functions with localentry:0 are those with a single entry point, ie. global entry == local entry, that have no requirement on r2 or r12 and guarantee r2 is unchanged on return. Such an external function can be called via the PLT without saving r2 or restoring it on return, avoiding a common load-hit-store for small functions. This patch implements the ld.so changes necessary for this optimization. ld.so needs to check that an optimized plt call sequence is in fact calling a function implemented with localentry:0, end emit a fatal error otherwise. The elf/testobj6.c change is to stop "error while loading shared libraries: expected localentry:0 `preload'" when running elf/preloadtest, which we'd get otherwise. * elf/elf.h (PPC64_OPT_LOCALENTRY): Define. * sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Add refsym and sym parameters. Adjust callers. * sysdeps/aarch64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/microblaze/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/nios2/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/tile/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.c (_dl_error_localentry): New. (_dl_reloc_overflow): Increase buffser size. Formatting. * sysdeps/powerpc/powerpc64/dl-machine.h (ppc64_local_entry_offset): Delete reloc param, add refsym and sym. Check optimized plt call stubs for localentry:0 functions. Adjust callers. (elf_machine_fixup_plt, elf_machine_plt_conflict): Add refsym and sym parameters. Adjust callers. (_dl_reloc_overflow): Move attribute. (_dl_error_localentry): Declare. * elf/dl-runtime.c (_dl_fixup): Save original sym. Pass refsym and sym to elf_machine_fixup_plt. * elf/testobj6.c (preload): Call printf.
2017-06-14 03:17:25 +02:00
static inline ElfW(Addr)
Update. 2000-05-05 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c (_dl_map_object_from_fd): Little of computation of parameter to mprotect and for variable assignments. 2000-05-03 Jes Sorensen <jes@linuxcare.com> * sysdeps/generic/ldsodefs.h (LOOKUP_VALUE_ADDRESS): Check the validity of map before dereferencing it. * elf/dl-reloc.c (RESOLVE_MAP): Define. 2000-05-02 Jes Sorensen <jes@linuxcare.com> * elf/dl-runtime.c (fixup): Add the value returned in the symbol lookup to the arguments to elf_machine_fixup_plt(). * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add Link_map of the symbol being resolved to input argument list and make the function return the pointer to the reloc. * sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Change return valuie to lookup_t and return the value. * sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_fixup_plt): Likewise. Make it an inline function returning value after calling __elf_machine_fixup_plt(). * elf/dl-sym.c (_dl_vsym): Use DL_SYMBOL_ADDRESS() to obtain the symbol address. * elf/dl-symbol.c (_dl_symbol_value): Use LOOKUP_VALUE_ADDRESS to obtain the symbol address. * sysdeps/generic/ldsodefs.h: Add generic DL_SYMBOL_ADDRESS() macro depending on the definition of ELF_FUNCTION_PTR_IS_SPECIAL. * sysdeps/ia64/dl-machine.h: Add DL_SYMBOL_ADDRESS() macro calling _dl_symbol_address() - this way DL_SYMBOL_ADDRESS() turns into an inline on non ia64. 2000-04-28 Jes Sorensen <jes@linuxcare.com> * elf/dl-runtime.c (fixup): Use the portable macros to get the symbol address of an object. * elf/dl-runtime.c (fixup-profile): Use the portable macros to get the symbol address of an object. * elf/dl-libc.c (struct do_dlsym_args): Change loadbase to a lookup_t. * elf/dl-lookup.c (_dl_lookup_symbol): Likewise. (_dl_lookup_symbol_skip): Likewise. (_dl_lookup_versioned_symbol): Likewise. (_dl_lookup_versioned_symbol_skip): Likewise. 2000-04-27 Jes Sorensen <jes@linuxcare.com> * elf/rtld.c (_dl_start): Get the function pointer return address via _dl_start_address for architectures that need a function pointer descriptor rather than just a pointer (ia64). * sysdeps/generic/dl-lookupcfg.h: New file. * sysdeps/ia64/dl-lookupcfg.h: New file. * sysdeps/ia64/dl-machine.h: New file. * sysdeps/ia64/dl-symaddr.c: New file. * sysdeps/ia64/dl-fptr.c: New file. * elf/elf.h: Add IA-64 specific definitions.
2000-05-05 09:15:29 +02:00
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY ELFv2 functions with localentry:0 are those with a single entry point, ie. global entry == local entry, that have no requirement on r2 or r12 and guarantee r2 is unchanged on return. Such an external function can be called via the PLT without saving r2 or restoring it on return, avoiding a common load-hit-store for small functions. This patch implements the ld.so changes necessary for this optimization. ld.so needs to check that an optimized plt call sequence is in fact calling a function implemented with localentry:0, end emit a fatal error otherwise. The elf/testobj6.c change is to stop "error while loading shared libraries: expected localentry:0 `preload'" when running elf/preloadtest, which we'd get otherwise. * elf/elf.h (PPC64_OPT_LOCALENTRY): Define. * sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Add refsym and sym parameters. Adjust callers. * sysdeps/aarch64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/microblaze/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/nios2/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/tile/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.c (_dl_error_localentry): New. (_dl_reloc_overflow): Increase buffser size. Formatting. * sysdeps/powerpc/powerpc64/dl-machine.h (ppc64_local_entry_offset): Delete reloc param, add refsym and sym. Check optimized plt call stubs for localentry:0 functions. Adjust callers. (elf_machine_fixup_plt, elf_machine_plt_conflict): Add refsym and sym parameters. Adjust callers. (_dl_reloc_overflow): Move attribute. (_dl_error_localentry): Declare. * elf/dl-runtime.c (_dl_fixup): Save original sym. Pass refsym and sym to elf_machine_fixup_plt. * elf/testobj6.c (preload): Call printf.
2017-06-14 03:17:25 +02:00
const ElfW(Sym) *refsym, const ElfW(Sym) *sym,
const ElfW(Rel) *reloc,
ElfW(Addr) *reloc_addr, ElfW(Addr) value)
Update. 1997-09-27 01:14 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (extra-objs): Depend in before-compile. * configure.in: Locate Perl and substitute with complete path. * config.make.in: Add PERL for substitution. * elf/Makefile (routines): Add dl-addr. * elf/dladdr.c: Move the real code into ... * elf/dl-addr.c: New file. * elf/link.h: Add prototype for _dl_addr. * elf/dladdr.c (dladdr): Change address argument to be const. * elf/dlfcn.h: Likewise. * locale/C_name.c: Add _nl_POSIX_name. * locale/localeinfo.h: Add declaration of _nl_POSIX_name. * locale/findlocale.c (_nl_find_locale): Use _nl_POSIX_name. (_nl_remove_locale): Free name of data set. * locale/setlocale.c (clever_copy): Remove. (new_composite_name): Use _nl_C_name and _nl_POSIX_name in compare. (setname): Only remove old name when it is for category LC_ALL. Change malloc, free, realloc, and memalign hooks for glibc to take another parameter indicating the location of the caller. * malloc/malloc.c: Change hook functions and variables. * malloc/malloc.h: Likewise. * malloc/mcheck.c: Likewise. Make sure later hooked function also get the original caller address. * malloc/mtrace.c: Likewise. (tr_where): If no information in _mtrace_file is given use the information about the caller. * malloc/Makefile (distribute): Replace mtrace.awk by mtrace.pl. Add rules to install mtrace.pl after rewriting. * malloc/mtrace.pl: New file. Based on the old AWK script but with extended functionality. * malloc/mtrace.awk: Removed. * po/fr.po: New version. * string/Makefile: Do use builtins for tester.c and inl-tester.c. * string/tester.c: Rewrite. Split in many small functions to not exceed gcc's limits. * sysdeps/unix/sysv/linux/syscalls.list: Add prctl. 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/bits/string2.h (__stpcpy_small): Don't use casts as lvalues. 1997-09-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/time.texi (Formatting Date and Time): Clarify explanation of strftime flags a bit. Suggested by Robert Bihlmeyer <robbe@orcus.priv.at>. 1997-09-25 00:13 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/libm-ieee754/s_exp2f.c: Protect _GNU_SOURCE definition. Fix typo, it is FLT_MANT_DIG. 1997-09-24 18:52 H.J. Lu <hjl@gnu.ai.mit.edu> * math/atest-exp2.c: Include <stdlib/gmp.h> instead of <gmp.h>. 1997-08-27 08:10 H.J. Lu <hjl@gnu.ai.mit.edu> * libio/libio.h, libio/libioP.h: Support libio in libstdc++. * libio/libio.h (_IO_peekc): Defined as _IO_peekc_unlocked if _IO_MTSAFE_IO is undefined. 1997-09-24 23:27 Richard Henderson <rth@cygnus.com> * elf/dl-runtime.c (fixup): Don't go through elf_machine_relplt, but lookup the value of the target symbol ourselves and call the new elf_machine_fixup_plt. This kills the ELF_FIXUP_RETURN_VALUE hack. (profile_fixup): Likewise, but don't fix up the plt. * elf/rtld.c (_dl_main): ELF_MACHINE_RELOC_NOPLT renamed _JMP_SLOT. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RELOC_NOPLT): Renamed. (elf_alpha_fix_plt): Renamed elf_machine_fixup_plt. * sysdeps/i386/dl-machine.h (elf_machine_relplt): Killed. (ELF_MACHINE_JMP_SLOT): Renamed. (elf_machine_fixup_plt): New function. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. (elf_machine_rela): Moved JMP_SLOT fixup out to elf_machine_fixup_plt. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/stub/dl-machine.h: Update, sorta. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Do profiling. (TRAMPOLINE_TEMPLATE): From the carcas of _RUNTIME_TRAMPOLINE, do both normal and profile code. (elf_machine_rela): Handle r_addend for .got and .plt too.
1997-09-27 02:21:42 +02:00
{
Update. 2000-05-05 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c (_dl_map_object_from_fd): Little of computation of parameter to mprotect and for variable assignments. 2000-05-03 Jes Sorensen <jes@linuxcare.com> * sysdeps/generic/ldsodefs.h (LOOKUP_VALUE_ADDRESS): Check the validity of map before dereferencing it. * elf/dl-reloc.c (RESOLVE_MAP): Define. 2000-05-02 Jes Sorensen <jes@linuxcare.com> * elf/dl-runtime.c (fixup): Add the value returned in the symbol lookup to the arguments to elf_machine_fixup_plt(). * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add Link_map of the symbol being resolved to input argument list and make the function return the pointer to the reloc. * sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Change return valuie to lookup_t and return the value. * sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_fixup_plt): Likewise. Make it an inline function returning value after calling __elf_machine_fixup_plt(). * elf/dl-sym.c (_dl_vsym): Use DL_SYMBOL_ADDRESS() to obtain the symbol address. * elf/dl-symbol.c (_dl_symbol_value): Use LOOKUP_VALUE_ADDRESS to obtain the symbol address. * sysdeps/generic/ldsodefs.h: Add generic DL_SYMBOL_ADDRESS() macro depending on the definition of ELF_FUNCTION_PTR_IS_SPECIAL. * sysdeps/ia64/dl-machine.h: Add DL_SYMBOL_ADDRESS() macro calling _dl_symbol_address() - this way DL_SYMBOL_ADDRESS() turns into an inline on non ia64. 2000-04-28 Jes Sorensen <jes@linuxcare.com> * elf/dl-runtime.c (fixup): Use the portable macros to get the symbol address of an object. * elf/dl-runtime.c (fixup-profile): Use the portable macros to get the symbol address of an object. * elf/dl-libc.c (struct do_dlsym_args): Change loadbase to a lookup_t. * elf/dl-lookup.c (_dl_lookup_symbol): Likewise. (_dl_lookup_symbol_skip): Likewise. (_dl_lookup_versioned_symbol): Likewise. (_dl_lookup_versioned_symbol_skip): Likewise. 2000-04-27 Jes Sorensen <jes@linuxcare.com> * elf/rtld.c (_dl_start): Get the function pointer return address via _dl_start_address for architectures that need a function pointer descriptor rather than just a pointer (ia64). * sysdeps/generic/dl-lookupcfg.h: New file. * sysdeps/ia64/dl-lookupcfg.h: New file. * sysdeps/ia64/dl-machine.h: New file. * sysdeps/ia64/dl-symaddr.c: New file. * sysdeps/ia64/dl-fptr.c: New file. * elf/elf.h: Add IA-64 specific definitions.
2000-05-05 09:15:29 +02:00
return *reloc_addr = value;
Update. 1997-09-27 01:14 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (extra-objs): Depend in before-compile. * configure.in: Locate Perl and substitute with complete path. * config.make.in: Add PERL for substitution. * elf/Makefile (routines): Add dl-addr. * elf/dladdr.c: Move the real code into ... * elf/dl-addr.c: New file. * elf/link.h: Add prototype for _dl_addr. * elf/dladdr.c (dladdr): Change address argument to be const. * elf/dlfcn.h: Likewise. * locale/C_name.c: Add _nl_POSIX_name. * locale/localeinfo.h: Add declaration of _nl_POSIX_name. * locale/findlocale.c (_nl_find_locale): Use _nl_POSIX_name. (_nl_remove_locale): Free name of data set. * locale/setlocale.c (clever_copy): Remove. (new_composite_name): Use _nl_C_name and _nl_POSIX_name in compare. (setname): Only remove old name when it is for category LC_ALL. Change malloc, free, realloc, and memalign hooks for glibc to take another parameter indicating the location of the caller. * malloc/malloc.c: Change hook functions and variables. * malloc/malloc.h: Likewise. * malloc/mcheck.c: Likewise. Make sure later hooked function also get the original caller address. * malloc/mtrace.c: Likewise. (tr_where): If no information in _mtrace_file is given use the information about the caller. * malloc/Makefile (distribute): Replace mtrace.awk by mtrace.pl. Add rules to install mtrace.pl after rewriting. * malloc/mtrace.pl: New file. Based on the old AWK script but with extended functionality. * malloc/mtrace.awk: Removed. * po/fr.po: New version. * string/Makefile: Do use builtins for tester.c and inl-tester.c. * string/tester.c: Rewrite. Split in many small functions to not exceed gcc's limits. * sysdeps/unix/sysv/linux/syscalls.list: Add prctl. 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/bits/string2.h (__stpcpy_small): Don't use casts as lvalues. 1997-09-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/time.texi (Formatting Date and Time): Clarify explanation of strftime flags a bit. Suggested by Robert Bihlmeyer <robbe@orcus.priv.at>. 1997-09-25 00:13 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/libm-ieee754/s_exp2f.c: Protect _GNU_SOURCE definition. Fix typo, it is FLT_MANT_DIG. 1997-09-24 18:52 H.J. Lu <hjl@gnu.ai.mit.edu> * math/atest-exp2.c: Include <stdlib/gmp.h> instead of <gmp.h>. 1997-08-27 08:10 H.J. Lu <hjl@gnu.ai.mit.edu> * libio/libio.h, libio/libioP.h: Support libio in libstdc++. * libio/libio.h (_IO_peekc): Defined as _IO_peekc_unlocked if _IO_MTSAFE_IO is undefined. 1997-09-24 23:27 Richard Henderson <rth@cygnus.com> * elf/dl-runtime.c (fixup): Don't go through elf_machine_relplt, but lookup the value of the target symbol ourselves and call the new elf_machine_fixup_plt. This kills the ELF_FIXUP_RETURN_VALUE hack. (profile_fixup): Likewise, but don't fix up the plt. * elf/rtld.c (_dl_main): ELF_MACHINE_RELOC_NOPLT renamed _JMP_SLOT. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RELOC_NOPLT): Renamed. (elf_alpha_fix_plt): Renamed elf_machine_fixup_plt. * sysdeps/i386/dl-machine.h (elf_machine_relplt): Killed. (ELF_MACHINE_JMP_SLOT): Renamed. (elf_machine_fixup_plt): New function. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. (elf_machine_rela): Moved JMP_SLOT fixup out to elf_machine_fixup_plt. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/stub/dl-machine.h: Update, sorta. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Do profiling. (TRAMPOLINE_TEMPLATE): From the carcas of _RUNTIME_TRAMPOLINE, do both normal and profile code. (elf_machine_rela): Handle r_addend for .got and .plt too.
1997-09-27 02:21:42 +02:00
}
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
LOADADDR is the load address of the object; INFO is an array indexed
by DT_* of the .dynamic section info. */
auto inline void
__attribute__ ((always_inline))
elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
const Elf32_Rel *reloc, const Elf32_Sym *sym,
Elf32_Addr (*resolve) (const Elf32_Sym **ref,
Elf32_Addr reloc_addr,
int noplt))
{
Elf32_Addr *const reloc_addr = (Elf32_Addr *) reloc->r_offset;
Elf32_Addr loadbase;
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_MACHINE_COPY:
loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
break;
default:
_dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
break;
}
}
auto inline Elf32_Addr
__attribute__ ((always_inline))
elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
const Elf32_Rel *reloc, const Elf32_Sym *sym,
Elf32_Addr (*resolve) (const Elf32_Sym **ref,
Elf32_Addr reloc_addr,
int noplt))
{
_dl_signal_error (0, "Elf32_Rela relocation requested -- unused on "
NULL, ELF_MACHINE_NAME);
}
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
Update. 1997-05-24 03:51 Ulrich Drepper <drepper@cygnus.com> * stdlib/Makefile (routines): Add strtol_l, strtoul_l, strtoll_l, strtoull_l, strtof_l, strtod_l, and strtold_l. * stdlib/stdlib.h: Add prototypes for new functions. * stdlib/strtod.c: Change for compiling as strtoX_l. * stdlib/strtol.c: Likewise. * stdlib/strtof.c: Likewise. * stdlib/strtold.c: Likewise. * stdlib/strtod_l.c: New file. * stdlib/strtof_l.c: New file. * stdlib/strtold_l.c: New file. * stdlib/strtol_l.c: New file. * stdlib/strtoul_l.c: New file. * stdlib/strtoll_l.c: New file. * stdlib/strtoull_l.c: New file. * string/Makefile (routines): Add strcasecmp_l and strncase_l. * string/string.h: Add prototypes for new functions. * sysdeps/generic/strcasecmp.c: Change for compiling as strcasecmp_l. * sysdeps/generic/strncase.c: Change for compiling as strncasecmp_l. * sysdeps/generic/strcasecmp_l.c: New file. * sysdeps/generic/strncase_l.c: New file. * wcsmbs/Makefile (routines): Add wcstol_l, wcstoul_l, wcstoll_l, wcstoull_l, wcstod_l, wcstold_l, wcstof_l, wcscasecmp_l, and wcsncase_l. * wcsmbs/wchar.h: Add prototypes for new functions. * wcsmbs/wcscasecmp.c: Change for compiling as wcscasecmp_l. * wcsmbs/wcsncase.c: Change for compiling as wcsncasecmp_l. * wcsmbs/wcscasecmp_l.c: New file. * wcsmbs/wcsncase_l.c: New file. * wcsmbs/wcstof.c: Change for compiling as wcstof_l.c * wcsmbs/wcstold.c: Change for compiling as wcstold_l.c * wcsmcs/wcstod_l.c: New file. * wcsmcs/wcstof_l.c: New file. * wcsmcs/wcstold_l.c: New file. * wcsmcs/wcstol_l.c: New file. * wcsmcs/wcstoul_l.c: New file. * wcsmcs/wcstoll_l.c: New file. * wcsmcs/wcstoull_l.c: New file. * Makeconfig (binfmt-subdir): New variable. Set to `elf' if $(elf) is defined. More to come later when other binary formats are supported. * Makefile (subdirs): Remove elf. Add $(binfmt-subdir). Suggested by Philip Blundell. * stdlib/Makefile (headers): Add fmtmsg.h. (routines): Add fmtmsg. * stdlib/fmtmsg.c: New file. * stdlib/fmtmsg.h: New file. * manual/stdio.texi: Add description of fmtmsg and addseverity. * manual/examples/fmtmsgexpl.c: Example program for fmtmsg documentation. 1997-05-23 15:26 Philip Blundell <pjb27@cam.ac.uk> * resolv/res_query.c (res_querydomain): Avoid potential buffer overrun. Reported by Dan A. Dickey <ddickey@transition.com>. 1997-05-22 18:36 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * elf/dl-support.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Moved functions to ... * elf/dl-misc.c: This new file. * sysdeps/generic/dl-sysdepio.c: Delete file and move functions... * elf/dl-misc.c: ... here. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Delete functions; they now come from elf/dl-misc.c (dl-support.c had contained identical versions). * sysdeps/mach/hurd/dl-sysdepio.c: Delete file; move functions... * sysdeps/mach/hurd/dl-sysdep.c: ... here, but mark them weak so that the regular ones in dl-misc work once we've initialized. * elf/Makefile (dl-routines): Remove dl-sysdepio.c. Add dl-misc.c. 1997-05-22 21:55 Philip Blundell <pjb27@cam.ac.uk> * inet/Makefile (headers): Add netinet/inbits.h. * inet/netinet/in.h: New file. * sysdeps/generic/netinet/inbits.h: Likewise. * sysdeps/unix/sysv/linux/netinet/inbits.h: Likewise. * sysdeps/generic/netinet/ip6.h: Move to... * inet/netinet/ip6.h: ... here. * sysdeps/generic/netinet/icmp6.h: Move to... * inet/netinet/icmp6.h: ... here. * sysdeps/unix/sysv/linux/netinet/in.h: Remove. * sysdeps/generic/netinet/in.h: Remove. 1997-05-22 05:40 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): If we are not looking at the new thread-safe .plt, don't be lazy about relocs. (_dl_runtime_resolve): Fix up arithmetic for new .plt layout. (elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety. * elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Let elf_machine_runtime_setup() decide if we can actually be lazy. * elf/rtld.c (_dl_start): So don't call it. * elf/dl-reloc.c (_dl_relocate_object): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Return lazy. * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_runtime_setup): Update skeleton definition. 1997-05-22 18:45 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/__math.h (logb): Remove second value placed on stack by fxtract. 1997-05-22 13:07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/rpcsvc/rusers.x: Provide and correct prototypes, add cast to (xdrproc_t) where necessary to prevent warnings. 1997-05-22 12:18 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Remove I/O functions. * sunrpc/rpcinfo.c (get_inet_address): Use INADDR_NONE and INADDR_ANY * sysdeps/libm-ieee754/s_cexp.c: Fix typo: string_alias -> * nss/XXX-lookup.c: Add missing explanation.
1997-05-24 04:30:09 +02:00
static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy)
{
extern void _dl_runtime_resolve (Elf32_Word);
Update. 1997-05-24 03:51 Ulrich Drepper <drepper@cygnus.com> * stdlib/Makefile (routines): Add strtol_l, strtoul_l, strtoll_l, strtoull_l, strtof_l, strtod_l, and strtold_l. * stdlib/stdlib.h: Add prototypes for new functions. * stdlib/strtod.c: Change for compiling as strtoX_l. * stdlib/strtol.c: Likewise. * stdlib/strtof.c: Likewise. * stdlib/strtold.c: Likewise. * stdlib/strtod_l.c: New file. * stdlib/strtof_l.c: New file. * stdlib/strtold_l.c: New file. * stdlib/strtol_l.c: New file. * stdlib/strtoul_l.c: New file. * stdlib/strtoll_l.c: New file. * stdlib/strtoull_l.c: New file. * string/Makefile (routines): Add strcasecmp_l and strncase_l. * string/string.h: Add prototypes for new functions. * sysdeps/generic/strcasecmp.c: Change for compiling as strcasecmp_l. * sysdeps/generic/strncase.c: Change for compiling as strncasecmp_l. * sysdeps/generic/strcasecmp_l.c: New file. * sysdeps/generic/strncase_l.c: New file. * wcsmbs/Makefile (routines): Add wcstol_l, wcstoul_l, wcstoll_l, wcstoull_l, wcstod_l, wcstold_l, wcstof_l, wcscasecmp_l, and wcsncase_l. * wcsmbs/wchar.h: Add prototypes for new functions. * wcsmbs/wcscasecmp.c: Change for compiling as wcscasecmp_l. * wcsmbs/wcsncase.c: Change for compiling as wcsncasecmp_l. * wcsmbs/wcscasecmp_l.c: New file. * wcsmbs/wcsncase_l.c: New file. * wcsmbs/wcstof.c: Change for compiling as wcstof_l.c * wcsmbs/wcstold.c: Change for compiling as wcstold_l.c * wcsmcs/wcstod_l.c: New file. * wcsmcs/wcstof_l.c: New file. * wcsmcs/wcstold_l.c: New file. * wcsmcs/wcstol_l.c: New file. * wcsmcs/wcstoul_l.c: New file. * wcsmcs/wcstoll_l.c: New file. * wcsmcs/wcstoull_l.c: New file. * Makeconfig (binfmt-subdir): New variable. Set to `elf' if $(elf) is defined. More to come later when other binary formats are supported. * Makefile (subdirs): Remove elf. Add $(binfmt-subdir). Suggested by Philip Blundell. * stdlib/Makefile (headers): Add fmtmsg.h. (routines): Add fmtmsg. * stdlib/fmtmsg.c: New file. * stdlib/fmtmsg.h: New file. * manual/stdio.texi: Add description of fmtmsg and addseverity. * manual/examples/fmtmsgexpl.c: Example program for fmtmsg documentation. 1997-05-23 15:26 Philip Blundell <pjb27@cam.ac.uk> * resolv/res_query.c (res_querydomain): Avoid potential buffer overrun. Reported by Dan A. Dickey <ddickey@transition.com>. 1997-05-22 18:36 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * elf/dl-support.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Moved functions to ... * elf/dl-misc.c: This new file. * sysdeps/generic/dl-sysdepio.c: Delete file and move functions... * elf/dl-misc.c: ... here. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Delete functions; they now come from elf/dl-misc.c (dl-support.c had contained identical versions). * sysdeps/mach/hurd/dl-sysdepio.c: Delete file; move functions... * sysdeps/mach/hurd/dl-sysdep.c: ... here, but mark them weak so that the regular ones in dl-misc work once we've initialized. * elf/Makefile (dl-routines): Remove dl-sysdepio.c. Add dl-misc.c. 1997-05-22 21:55 Philip Blundell <pjb27@cam.ac.uk> * inet/Makefile (headers): Add netinet/inbits.h. * inet/netinet/in.h: New file. * sysdeps/generic/netinet/inbits.h: Likewise. * sysdeps/unix/sysv/linux/netinet/inbits.h: Likewise. * sysdeps/generic/netinet/ip6.h: Move to... * inet/netinet/ip6.h: ... here. * sysdeps/generic/netinet/icmp6.h: Move to... * inet/netinet/icmp6.h: ... here. * sysdeps/unix/sysv/linux/netinet/in.h: Remove. * sysdeps/generic/netinet/in.h: Remove. 1997-05-22 05:40 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): If we are not looking at the new thread-safe .plt, don't be lazy about relocs. (_dl_runtime_resolve): Fix up arithmetic for new .plt layout. (elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety. * elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Let elf_machine_runtime_setup() decide if we can actually be lazy. * elf/rtld.c (_dl_start): So don't call it. * elf/dl-reloc.c (_dl_relocate_object): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Return lazy. * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_runtime_setup): Update skeleton definition. 1997-05-22 18:45 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/__math.h (logb): Remove second value placed on stack by fxtract. 1997-05-22 13:07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/rpcsvc/rusers.x: Provide and correct prototypes, add cast to (xdrproc_t) where necessary to prevent warnings. 1997-05-22 12:18 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Remove I/O functions. * sunrpc/rpcinfo.c (get_inet_address): Use INADDR_NONE and INADDR_ANY * sysdeps/libm-ieee754/s_cexp.c: Fix typo: string_alias -> * nss/XXX-lookup.c: Add missing explanation.
1997-05-24 04:30:09 +02:00
Update. 1997-09-27 01:14 Ulrich Drepper <drepper@cygnus.com> * Makeconfig (extra-objs): Depend in before-compile. * configure.in: Locate Perl and substitute with complete path. * config.make.in: Add PERL for substitution. * elf/Makefile (routines): Add dl-addr. * elf/dladdr.c: Move the real code into ... * elf/dl-addr.c: New file. * elf/link.h: Add prototype for _dl_addr. * elf/dladdr.c (dladdr): Change address argument to be const. * elf/dlfcn.h: Likewise. * locale/C_name.c: Add _nl_POSIX_name. * locale/localeinfo.h: Add declaration of _nl_POSIX_name. * locale/findlocale.c (_nl_find_locale): Use _nl_POSIX_name. (_nl_remove_locale): Free name of data set. * locale/setlocale.c (clever_copy): Remove. (new_composite_name): Use _nl_C_name and _nl_POSIX_name in compare. (setname): Only remove old name when it is for category LC_ALL. Change malloc, free, realloc, and memalign hooks for glibc to take another parameter indicating the location of the caller. * malloc/malloc.c: Change hook functions and variables. * malloc/malloc.h: Likewise. * malloc/mcheck.c: Likewise. Make sure later hooked function also get the original caller address. * malloc/mtrace.c: Likewise. (tr_where): If no information in _mtrace_file is given use the information about the caller. * malloc/Makefile (distribute): Replace mtrace.awk by mtrace.pl. Add rules to install mtrace.pl after rewriting. * malloc/mtrace.pl: New file. Based on the old AWK script but with extended functionality. * malloc/mtrace.awk: Removed. * po/fr.po: New version. * string/Makefile: Do use builtins for tester.c and inl-tester.c. * string/tester.c: Rewrite. Split in many small functions to not exceed gcc's limits. * sysdeps/unix/sysv/linux/syscalls.list: Add prctl. 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/bits/string2.h (__stpcpy_small): Don't use casts as lvalues. 1997-09-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/time.texi (Formatting Date and Time): Clarify explanation of strftime flags a bit. Suggested by Robert Bihlmeyer <robbe@orcus.priv.at>. 1997-09-25 00:13 David S. Miller <davem@tanya.rutgers.edu> * sysdeps/libm-ieee754/s_exp2f.c: Protect _GNU_SOURCE definition. Fix typo, it is FLT_MANT_DIG. 1997-09-24 18:52 H.J. Lu <hjl@gnu.ai.mit.edu> * math/atest-exp2.c: Include <stdlib/gmp.h> instead of <gmp.h>. 1997-08-27 08:10 H.J. Lu <hjl@gnu.ai.mit.edu> * libio/libio.h, libio/libioP.h: Support libio in libstdc++. * libio/libio.h (_IO_peekc): Defined as _IO_peekc_unlocked if _IO_MTSAFE_IO is undefined. 1997-09-24 23:27 Richard Henderson <rth@cygnus.com> * elf/dl-runtime.c (fixup): Don't go through elf_machine_relplt, but lookup the value of the target symbol ourselves and call the new elf_machine_fixup_plt. This kills the ELF_FIXUP_RETURN_VALUE hack. (profile_fixup): Likewise, but don't fix up the plt. * elf/rtld.c (_dl_main): ELF_MACHINE_RELOC_NOPLT renamed _JMP_SLOT. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RELOC_NOPLT): Renamed. (elf_alpha_fix_plt): Renamed elf_machine_fixup_plt. * sysdeps/i386/dl-machine.h (elf_machine_relplt): Killed. (ELF_MACHINE_JMP_SLOT): Renamed. (elf_machine_fixup_plt): New function. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. (elf_machine_rela): Moved JMP_SLOT fixup out to elf_machine_fixup_plt. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/stub/dl-machine.h: Update, sorta. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Do profiling. (TRAMPOLINE_TEMPLATE): From the carcas of _RUNTIME_TRAMPOLINE, do both normal and profile code. (elf_machine_rela): Handle r_addend for .got and .plt too.
1997-09-27 02:21:42 +02:00
if (lazy)
Update. 1997-05-24 03:51 Ulrich Drepper <drepper@cygnus.com> * stdlib/Makefile (routines): Add strtol_l, strtoul_l, strtoll_l, strtoull_l, strtof_l, strtod_l, and strtold_l. * stdlib/stdlib.h: Add prototypes for new functions. * stdlib/strtod.c: Change for compiling as strtoX_l. * stdlib/strtol.c: Likewise. * stdlib/strtof.c: Likewise. * stdlib/strtold.c: Likewise. * stdlib/strtod_l.c: New file. * stdlib/strtof_l.c: New file. * stdlib/strtold_l.c: New file. * stdlib/strtol_l.c: New file. * stdlib/strtoul_l.c: New file. * stdlib/strtoll_l.c: New file. * stdlib/strtoull_l.c: New file. * string/Makefile (routines): Add strcasecmp_l and strncase_l. * string/string.h: Add prototypes for new functions. * sysdeps/generic/strcasecmp.c: Change for compiling as strcasecmp_l. * sysdeps/generic/strncase.c: Change for compiling as strncasecmp_l. * sysdeps/generic/strcasecmp_l.c: New file. * sysdeps/generic/strncase_l.c: New file. * wcsmbs/Makefile (routines): Add wcstol_l, wcstoul_l, wcstoll_l, wcstoull_l, wcstod_l, wcstold_l, wcstof_l, wcscasecmp_l, and wcsncase_l. * wcsmbs/wchar.h: Add prototypes for new functions. * wcsmbs/wcscasecmp.c: Change for compiling as wcscasecmp_l. * wcsmbs/wcsncase.c: Change for compiling as wcsncasecmp_l. * wcsmbs/wcscasecmp_l.c: New file. * wcsmbs/wcsncase_l.c: New file. * wcsmbs/wcstof.c: Change for compiling as wcstof_l.c * wcsmbs/wcstold.c: Change for compiling as wcstold_l.c * wcsmcs/wcstod_l.c: New file. * wcsmcs/wcstof_l.c: New file. * wcsmcs/wcstold_l.c: New file. * wcsmcs/wcstol_l.c: New file. * wcsmcs/wcstoul_l.c: New file. * wcsmcs/wcstoll_l.c: New file. * wcsmcs/wcstoull_l.c: New file. * Makeconfig (binfmt-subdir): New variable. Set to `elf' if $(elf) is defined. More to come later when other binary formats are supported. * Makefile (subdirs): Remove elf. Add $(binfmt-subdir). Suggested by Philip Blundell. * stdlib/Makefile (headers): Add fmtmsg.h. (routines): Add fmtmsg. * stdlib/fmtmsg.c: New file. * stdlib/fmtmsg.h: New file. * manual/stdio.texi: Add description of fmtmsg and addseverity. * manual/examples/fmtmsgexpl.c: Example program for fmtmsg documentation. 1997-05-23 15:26 Philip Blundell <pjb27@cam.ac.uk> * resolv/res_query.c (res_querydomain): Avoid potential buffer overrun. Reported by Dan A. Dickey <ddickey@transition.com>. 1997-05-22 18:36 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * elf/dl-support.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Moved functions to ... * elf/dl-misc.c: This new file. * sysdeps/generic/dl-sysdepio.c: Delete file and move functions... * elf/dl-misc.c: ... here. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Delete functions; they now come from elf/dl-misc.c (dl-support.c had contained identical versions). * sysdeps/mach/hurd/dl-sysdepio.c: Delete file; move functions... * sysdeps/mach/hurd/dl-sysdep.c: ... here, but mark them weak so that the regular ones in dl-misc work once we've initialized. * elf/Makefile (dl-routines): Remove dl-sysdepio.c. Add dl-misc.c. 1997-05-22 21:55 Philip Blundell <pjb27@cam.ac.uk> * inet/Makefile (headers): Add netinet/inbits.h. * inet/netinet/in.h: New file. * sysdeps/generic/netinet/inbits.h: Likewise. * sysdeps/unix/sysv/linux/netinet/inbits.h: Likewise. * sysdeps/generic/netinet/ip6.h: Move to... * inet/netinet/ip6.h: ... here. * sysdeps/generic/netinet/icmp6.h: Move to... * inet/netinet/icmp6.h: ... here. * sysdeps/unix/sysv/linux/netinet/in.h: Remove. * sysdeps/generic/netinet/in.h: Remove. 1997-05-22 05:40 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): If we are not looking at the new thread-safe .plt, don't be lazy about relocs. (_dl_runtime_resolve): Fix up arithmetic for new .plt layout. (elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety. * elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Let elf_machine_runtime_setup() decide if we can actually be lazy. * elf/rtld.c (_dl_start): So don't call it. * elf/dl-reloc.c (_dl_relocate_object): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Return lazy. * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_runtime_setup): Update skeleton definition. 1997-05-22 18:45 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/__math.h (logb): Remove second value placed on stack by fxtract. 1997-05-22 13:07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/rpcsvc/rusers.x: Provide and correct prototypes, add cast to (xdrproc_t) where necessary to prevent warnings. 1997-05-22 12:18 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Remove I/O functions. * sunrpc/rpcinfo.c (get_inet_address): Use INADDR_NONE and INADDR_ANY * sysdeps/libm-ieee754/s_cexp.c: Fix typo: string_alias -> * nss/XXX-lookup.c: Add missing explanation.
1997-05-24 04:30:09 +02:00
{
/* The GOT entries for functions in the PLT have not yet been filled
in. Their initial contents will arrange when called to push an
offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
and then jump to _GLOBAL_OFFSET_TABLE[2]. */
Update. 2000-03-23 Andreas Jaeger <aj@suse.de> * elf/dl-addr.c: Adjust include paths for ldsodefs location change. * 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-preinit.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-profstub.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-symbol.c: Likewise. * elf/dl-version.c: Likewise. * elf/rtld.c: Likewise. * elf/sprof.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-origin.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/elf/backtracesyms.c: Likewise. * sysdeps/generic/elf/backtracesymsfd.c: Likewise. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/mach/hurd/dl-sysdep.c: Likewise. * sysdeps/powerpc/dl-machine.c: Likewise. * sysdeps/powerpc/elf/libc-start.c: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * elf/ldsodefs.h: Move file to ... * sysdeps/generic/ldsodefs.h: ... here. * sysdeps/generic/ldsodefs.h: Add definition for D_PTR. * sysdeps/mips/elf/ldsodefs.h: New file. * elf/dl-version.c (match_symbol): Use D_PTR to access relocated entries in l_info. (_dl_check_map_versions): Likewise. * elf/dl-reloc.c (_dl_relocate_object): Likewise. * elf/dl-load.c (_dl_init_paths): Likewise. (_dl_map_object): Likewise. * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Likewise. (elf_get_dynamic_info): Likewise. * elf/do-lookup.h (FCT): Likewise. * elf/do-rel.h (elf_dynamic_do_rel): Likewise. * elf/dl-deps.c (_dl_map_object_deps): Likewise. * elf/dl-addr.c (_dl_addr): Likewise. * elf/dl-runtime.c (profile_fixup): Likewise. (fixup): Likewise. * elf/dl-init.c (_dl_init_next): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h (DISTINGUISH_LIB_VERSIONS): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Likewise. (elf_machine_rel): Likewise. * elf/dynamic-link.h (elf_get_dynamic_info): Only change l_info for writable dynamic section.
2000-03-23 21:31:46 +01:00
Elf32_Addr *got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
Update. 1997-05-24 03:51 Ulrich Drepper <drepper@cygnus.com> * stdlib/Makefile (routines): Add strtol_l, strtoul_l, strtoll_l, strtoull_l, strtof_l, strtod_l, and strtold_l. * stdlib/stdlib.h: Add prototypes for new functions. * stdlib/strtod.c: Change for compiling as strtoX_l. * stdlib/strtol.c: Likewise. * stdlib/strtof.c: Likewise. * stdlib/strtold.c: Likewise. * stdlib/strtod_l.c: New file. * stdlib/strtof_l.c: New file. * stdlib/strtold_l.c: New file. * stdlib/strtol_l.c: New file. * stdlib/strtoul_l.c: New file. * stdlib/strtoll_l.c: New file. * stdlib/strtoull_l.c: New file. * string/Makefile (routines): Add strcasecmp_l and strncase_l. * string/string.h: Add prototypes for new functions. * sysdeps/generic/strcasecmp.c: Change for compiling as strcasecmp_l. * sysdeps/generic/strncase.c: Change for compiling as strncasecmp_l. * sysdeps/generic/strcasecmp_l.c: New file. * sysdeps/generic/strncase_l.c: New file. * wcsmbs/Makefile (routines): Add wcstol_l, wcstoul_l, wcstoll_l, wcstoull_l, wcstod_l, wcstold_l, wcstof_l, wcscasecmp_l, and wcsncase_l. * wcsmbs/wchar.h: Add prototypes for new functions. * wcsmbs/wcscasecmp.c: Change for compiling as wcscasecmp_l. * wcsmbs/wcsncase.c: Change for compiling as wcsncasecmp_l. * wcsmbs/wcscasecmp_l.c: New file. * wcsmbs/wcsncase_l.c: New file. * wcsmbs/wcstof.c: Change for compiling as wcstof_l.c * wcsmbs/wcstold.c: Change for compiling as wcstold_l.c * wcsmcs/wcstod_l.c: New file. * wcsmcs/wcstof_l.c: New file. * wcsmcs/wcstold_l.c: New file. * wcsmcs/wcstol_l.c: New file. * wcsmcs/wcstoul_l.c: New file. * wcsmcs/wcstoll_l.c: New file. * wcsmcs/wcstoull_l.c: New file. * Makeconfig (binfmt-subdir): New variable. Set to `elf' if $(elf) is defined. More to come later when other binary formats are supported. * Makefile (subdirs): Remove elf. Add $(binfmt-subdir). Suggested by Philip Blundell. * stdlib/Makefile (headers): Add fmtmsg.h. (routines): Add fmtmsg. * stdlib/fmtmsg.c: New file. * stdlib/fmtmsg.h: New file. * manual/stdio.texi: Add description of fmtmsg and addseverity. * manual/examples/fmtmsgexpl.c: Example program for fmtmsg documentation. 1997-05-23 15:26 Philip Blundell <pjb27@cam.ac.uk> * resolv/res_query.c (res_querydomain): Avoid potential buffer overrun. Reported by Dan A. Dickey <ddickey@transition.com>. 1997-05-22 18:36 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * elf/dl-support.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Moved functions to ... * elf/dl-misc.c: This new file. * sysdeps/generic/dl-sysdepio.c: Delete file and move functions... * elf/dl-misc.c: ... here. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_open_zero_fill, _dl_sysdep_read_whole_file): Delete functions; they now come from elf/dl-misc.c (dl-support.c had contained identical versions). * sysdeps/mach/hurd/dl-sysdepio.c: Delete file; move functions... * sysdeps/mach/hurd/dl-sysdep.c: ... here, but mark them weak so that the regular ones in dl-misc work once we've initialized. * elf/Makefile (dl-routines): Remove dl-sysdepio.c. Add dl-misc.c. 1997-05-22 21:55 Philip Blundell <pjb27@cam.ac.uk> * inet/Makefile (headers): Add netinet/inbits.h. * inet/netinet/in.h: New file. * sysdeps/generic/netinet/inbits.h: Likewise. * sysdeps/unix/sysv/linux/netinet/inbits.h: Likewise. * sysdeps/generic/netinet/ip6.h: Move to... * inet/netinet/ip6.h: ... here. * sysdeps/generic/netinet/icmp6.h: Move to... * inet/netinet/icmp6.h: ... here. * sysdeps/unix/sysv/linux/netinet/in.h: Remove. * sysdeps/generic/netinet/in.h: Remove. 1997-05-22 05:40 Richard Henderson <rth@tamu.edu> * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): If we are not looking at the new thread-safe .plt, don't be lazy about relocs. (_dl_runtime_resolve): Fix up arithmetic for new .plt layout. (elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety. * elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Let elf_machine_runtime_setup() decide if we can actually be lazy. * elf/rtld.c (_dl_start): So don't call it. * elf/dl-reloc.c (_dl_relocate_object): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Return lazy. * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/powerpc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/stub/dl-machine.h (elf_machine_runtime_setup): Update skeleton definition. 1997-05-22 18:45 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/__math.h (logb): Remove second value placed on stack by fxtract. 1997-05-22 13:07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sunrpc/rpcsvc/rusers.x: Provide and correct prototypes, add cast to (xdrproc_t) where necessary to prevent warnings. 1997-05-22 12:18 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Remove I/O functions. * sunrpc/rpcinfo.c (get_inet_address): Use INADDR_NONE and INADDR_ANY * sysdeps/libm-ieee754/s_cexp.c: Fix typo: string_alias -> * nss/XXX-lookup.c: Add missing explanation.
1997-05-24 04:30:09 +02:00
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* This function will get called to fix up the GOT entry indicated by
the offset on the stack, and then jump to the resolved address. */
got[2] = (Elf32_Addr) &_dl_runtime_resolve;
}
return lazy;
}
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
#define RTLD_START #error need some startup code