2002-02-01 H.J. Lu <hjl@gnu.org>
* sysdeps/mips/atomicity.h (exchange_and_add): Use branch
likely.
(atomic_add): Likewise.
(compare_and_swap): Return 0 only when failed to compare. Use
branch likely.
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use
branch likely.
2002-02-03 kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/sh/dl-machine.h (elf_machine_rela): Fix a typo.
2002-02-02 Ulrich Drepper <drepper@redhat.com>
* elf/dl-minimal.c (__strsep): New minimal implementation.
* elf/dl-object.c (_dl_new_object): Avoid using strrchr. We have
more information.
* elf/rtld.c (dl_main): Avoid strrchr.
* sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Use the
result of readlink. Search from the back for '/'.
* elf/do-rel.h (elf_dynamic_do_rel): Help the compiler recognize
code which is never used when relocating ld.so itself.
(_ELF_DYNAMIC_DO_RELOC): Help the compiler optimize a bit.
2002-02-01 Ulrich Drepper <drepper@redhat.com>
* elf/rtld.c (_dl_start): Mark as internal_function.
* sysdeps/i386/dl-machine.h (RTLD_START): Pass parameter for _dl_start
in register.
(elf_machine_rel): Cleanup and minor optimization for RTLD_BOOTSTRAP.
General pretty printing.
* elf/dblloadmod2.c: Likewise.
* elf/dblloadmod3.c: Likewise.
* elf/reldepmod5.c: Likewise.
* elf/reldepmod6.c: Likewise.
* elf/dl-conflict.c (_dl_resolve_conflicts): Add unused attribute
for resolve_conflict_map since RESOLVE_CONFLICT_FIND_MAP is not
used on all architectures.
* sunrpc/svc_tcp.c: Add noreturn attribute for
svctcp_rendezvous_abort.
* sunrpc/svc_unix.c: Likewise for svcunix_rendezvous_abort.
* sysdeps/generic/strstr.c (strstr): Add paranthese for assignment
to avoid warning.
2001-12-11 Jakub Jelinek <jakub@redhat.com>
* elf/Makefile (dl-routines): Add conflict.
(rtld-ldscript-in, rtld-ldscript, rtld-parms): Remove.
(ld.so): Add _begin local symbol.
* elf/elf.h (DT_VALTAGIDX, DT_VALNUM, DT_ADDRTAGIDX, DT_ADDRNUM):
Define.
* elf/dl-deps.c (_dl_build_local_scope): New.
(_dl_map_object_deps): If LD_TRACE_PRELINKING, compute local scopes
of all libraries.
* elf/do-rel.h (VALIDX): Define.
(elf_dynamic_do_rel): If ELF_MACHINE_PLT_REL is defined, don't do
lazy binding for RELA. If DT_GNU_PRELINKED, DT_RELACOUNT relocations
can be skipped.
* elf/dl-conflict.c: New file.
* elf/dl-lookup.c (_dl_debug_bindings): New.
(_dl_lookup_symbol): Use _dl_debug_bindings. Reference_name is always
non-NULL.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-runtime.c (PLTREL): If ELF_MACHINE_PLT_REL is defined,
define to ElfW(Rel).
* elf/dynamic-link.h (elf_get_dynamic_info): Record selected dynamic
tags in the DT_VALRNGLO..DT_VALRNGHI and DT_ADDRRNGLO..DT_ADDRRNGHI
ranges.
Don't adjust address dynamic tags if l_addr is 0.
* elf/rtld.c (_dl_trace_prelink, _dl_trace_prelink_map): New variables.
(_dl_start): Skip ELF_DYNAMIC_RELOCATE if ld.so is prelinked.
(VALIDX, ADDRIDX): Define.
(_dl_start_final): Initialize _dl_rtld_map's l_map_start and l_map_end.
(dl_main): Print library list for LD_TRACE_PRELINKING.
If prelinking information can be used, skip relocating libraries and
call _dl_resolve_conflicts instead.
(process_envvars): Handle LD_TRACE_PRELINKING envvar.
* elf/dl-load.c (_dl_map_object): Don't create fake libs
if LD_TRACE_PRELINKING.
* include/link.h (struct link_map) [l_info]: Add DT_VALNUM
+ DT_ADDRNUM.
* sysdeps/generic/ldsodefs.h (_dl_trace_prelink_map): New declaration.
(DL_DEBUG_PRELINK): Define.
(_dl_resolve_conflicts): Add prototype.
* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Reinitialize
.plt for prelinked libraries where prelinking info cannot be used.
(elf_machine_rela): If relocating R_ALPHA_JMP_SLOT in .gnu.conflict
section, use RESOLVE_CONFLICT_FIND_MAP to find out reloc's link_map.
* sysdeps/arm/bits/link.h: New file.
* sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_ARM_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/i386/bits/link.h: New file.
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_386_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): If relocating
conflicts, skip finaladdr computation. Use RESOLVE_CONFLICT_FIND_MAP
to find out map for R_PPC_JMP_SLOT relocs.
* sysdeps/sparc/sparc32/dl-machine.h (VALIDX): Define.
(OPCODE_BA): Define.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
(sparc_fixup_plt): Renamed from elf_machine_fixup_plt.
(elf_machine_fixup_plt): Call sparc_fixup_plt.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Call sparc_fixup_plt for R_SPARC_JMP_SLOT.
* sysdeps/sparc/sparc64/dl-machine.h (VALIDX): Define.
(sparc64_fixup_plt): Fix a typo.
(elf_machine_rela): Set value to 0 if relocating conflicts.
Handle R_SPARC_JMP_SLOT relocs when relocating conflicts.
(elf_machine_runtime_setup): Reinitialize .plt for prelinked
libraries where prelinking info cannot be used.
* sysdeps/sh/bits/link.h: New file.
* sysdeps/sh/dl-machine.h (elf_machine_runtime_setup): Save original
content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_SH_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-32/bits/link.h: New file.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/s390/s390-64/bits/link.h: New file.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_390_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
* sysdeps/x86_64/bits/link.h: New file.
* sysdeps/x86_64/dl-machine.h (elf_machine_runtime_setup):
Save original content of .got[1].
(elf_machine_lazy_rel): Reinitialize R_X86_64_JMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
2001-11-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-reloc.c (_dl_relocate_object): Avoid iterating over
program header twice. Construct list with the needed information.
2001-11-09 Ulrich Drepper <drepper@redhat.com>
* elf/dl-minimal.c (realloc): Handle NULL for first parameter
correctly.
* elf/dl-load.c (is_dst): New function.
(_dl_dst_count): Use is_dst to check for DST variable.
(_dl_dst_substitute): Likewise.
2001-11-09 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (_dl_map_object_from_fd): Delete code to remove
from object list when DF_1_NOOPEN is seen. This is done in lose.
2001-11-06 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (_dl_map_object_from_fd): Don't call
_dl_signal_error directly, always use lose. Set fd to -1 after
file is closed.
(lose): Don't call close if fd == -1.
* elf/dl-profile.c: Replace state variable with simple flag named
running. Remove commented-out code.
* elf/dl-reloc.c (_dl_relocate_object): Likewise.
* elf/elf.h: Add dynamic tag definitions for prelinking.
* elf/rtld.c (process_envvars): Avoid using array of string pointers.
Rewrite code to remove environment varables for SUID binaries.
Small optimization in LD_PROFILE handling.
* sysdeps/generic/unsecvars.h: Adjust format for process_envvars
changes.
* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
* sysdeps/generic/dl-sysdep.c: Don't initialize _dl_cpuclock_offset.
* elf/dl-reloc.c (_dl_reloc_bad_type): Rewrite to not use writable
strings. Change type of second parameter.
* sysdeps/generic/ldsodefs.h: Adjust _dl_reloc_bad_type prototype
for last change.
2001-11-01 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (_dl_map_object): Correct test of DF_1_NODEFLIB
for rtld_search_dirs content. Minor optimizations.
2001-10-31 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (_dl_map_object): Make code a bit more compact by
avoiding unnecessary duplication.
2001-10-31 Jakub Jelinek <jakub@redhat.com>
* elf/dl-load.c (_dl_map_object): If library was found using
LD_LIBRARY_PATH, don't try RUNPATH list.
2001-10-29 Kevin Ryde <user42@zip.com.au>
2001-10-26 Ulrich Drepper <drepper@redhat.com>
* string/strxfrm.c [USE_IN_EXTENDED_LOCALE_MODEL]: Correctly get
nrules value.
2001-10-24 H.J. Lu <hjl@gnu.org>
* sysdeps/generic/bits/dlfcn.h (DL_CALL_FCT): Cast to void *.
Use __BEGIN_DECLS/__END_DECLS around prototypes.
* sysdeps/mips/bits/dlfcn.h (DL_CALL_FCT): Likewise.
2001-10-21 Jim Meyering <meyering@lucent.com>
* malloc/obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
this code would end up calling gettext even in packages built
with --disable-nls.
* posix/getopt.c (_): Likewise.
* posix/regex.c (_): Likewise.
2001-10-26 Ulrich Drepper <drepper@redhat.com>
* resolv/gethnamaddr.c (gethostbyaddr): Use ip6.addr for reverse
lookup not ip6.int.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
Reported by Martin.v.Loewis@t-online.de [PR libc/2598].
2001-10-19 Jakub Jelinek <jakub@redhat.com>
* misc/sys/cdefs.h (__attribute_used__): Define.
* elf/rtld.c (_dl_start): Add __attribute_used__.
* elf/dl-runtime.c (fixup, profile_fixup): Likewise.