2002-04-13 Ulrich Drepper <drepper@redhat.com>
* elf/do-lookup.h [!VERSIONED]: Add new parameter flags. Use it to
check whether the caller prefers getting the most recent version of
a symbol of the earliest version.
* elf/dl-lookup.c: Adjust all callers of do_lookup. Change
_dl_do_lookup to also take the new parameter and pass it on.
Change 'explicit' parameter of _dl_lookup_symbol and
_dl_lookup_versioned_symbol to flags. Adjust tests.
* sysdeps/generic/ldsodefs.h: Adjust prototypes.
* elf/dl-libc.c: Adjust all callers of _dl_lookup_symbol and
_dl_lookup_versioned_symbol.
* elf/dl-reloc.c: Likewise.
* elf/dl-runtime.c: Likewise.
* elf/dl-sym.c: Likewise.
* sysdeps/mips/dl-machine.h: Likewise.
2002-03-13 Wolfram Gloger <wg@malloc.de>
* malloc/malloc.c (sYSMALLOc): Don't change brk if mmap failed.
2002-03-02 Andreas Schwab <schwab@suse.de>
* stdio-common/vfprintf.c (process_arg): Fix decimal format with
'h' flag and positional arg.
* stdio-common/tst-printf.c (rfg3): New function to test
positional arguments.
(main): Fix some warnings.
2002-03-13 Jakub Jelinek <jakub@redhat.com>
* elf/dl-minimal.c (_itoa): Use _itoa_lower_digits_internal if SHARED.
* elf/dl-reloc.c (_dl_reloc_bad_type): Likewise.
2002-02-03 Andreas Schwab <schwab@suse.de>
* sysdeps/posix/readv.c: Use ssize_t for bytes_read.
* sysdeps/posix/writev.c: Use ssize_t for bytes_written. Fix comment.
2002-02-03 Thorsten Kukuk <kukuk@suse.de>
* sysdeps/posix/writev.c: Check for ssize_t overflow, don't use
alloca if the memory reqirements are too high.
2002-02-03 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (decompose_rpath): Avoid using strstr.
* elf/dl-minimal.c (_strerror_r): Use _itoa instead of _itoa_word since
the former is available anyway and speed isn't important here.
* elf/dl-misc.c (_dl_debug_vdprintf): Likewise.
* elf/dl-version.c (match_symbol): Likewise.
(_dl_check_map_versions): Likewise.
* elf/rtld.c (process_envvars): Likewise.
(print_statistics): Likewise.
* sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Likewise.
* elf/dl-minimal.c (_itoa): Always define it. Make it work for all
bases. Add assert to catch uses of unimplemented features.
(__strsep): Add assert to catch uses of unimplemented features.
* elf/dl-object.c (_dl_new_object): Don't use rawmemchr. Use strchr
and avoid inline optimization.
* elf/rtld.c (process_envvars): Likewise.
* elf/dl-open.c: Don't include <stdio-common/_itoa.h>.
* elf/dl-profile.c (_dl_start_profile): Help compiler to avoid ffs.
* elf/rtld.c (dl_main): Avoid strsep inline optimization.
* stdio-common/_itoa.h: Minor simplifications of the code.
* stdio-common/_itoa.c: Likewise.
* elf/dl-reloc.c (_dl_relocate_object): Use _dl_debug_printf
instead of _dl_printf for debugging info output.
* sysdeps/mips/atomicity.h (exchange_and_add): Use branch likely.
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.
* 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/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-08-11 Ulrich Drepper <drepper@redhat.com>
* malloc/malloc.c (ptmalloc_init): Don't call getenv five times.
Instead use new function next_env_entry which iterates over the
environment once.
* sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Only set
_dl_profile_map for the right object.
* elf/dl-reloc.c (_dl_relocate_object): Allocate l_reloc_result
only if consider_profiling is != 0, not if _dl_profile != NULL.
* sysdeps/generic/dl-environ.c (_dl_next_ld_env_entry): Optimize a bit.
Now returns pointer to first character set "LD_".
* elf/rtld.c (process_envvars): Adjust for change above.
* sysdeps/unix/sysv/linux/dl-librecon.h (EXTRA_LD_ENVVARS): Likewise.
* sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS):
Likewise.
2001-08-10 Wolfram Gloger <wg@malloc.de>
* malloc/malloc.c (grow_heap): Use mmap() rather than mprotect()
to allocate new memory, for better performance with Linux-2.4.x.
2001-07-06 Paul Eggert <eggert@twinsun.com>
* manual/argp.texi: Remove ignored LGPL copyright notice; it's
not appropriate for documentation anyway.
* manual/libc-texinfo.sh: "Library General Public License" ->
"Lesser General Public License".
2001-07-06 Andreas Jaeger <aj@suse.de>
* All files under GPL/LGPL version 2: Place under LGPL version
2.1.
* intl/Makefile (tests): Depend in mtrace-tst-gettext.
Make this a new rule depending on tst-gettext.out and run mtrace.
* intl/tst-gettext.c: Call mtrace.
* intl/tst-gettext.sh: Put MALLOC_TRACE in environment of tst-gettext.
* elf/dl-reloc.c: Add a few more __builtin_expect.
* configure.in: Remove --with-gettext option.
* intl/dcigettext.c (free_mem): Correct freeing of
_nl_domain_bindings list.
2000-08-26 Ulrich Drepper <drepper@redhat.com>
* elf/Makefile (distribute): Add unloadmod.c, reldepmod1.c,
reldepmod2.c, reldepmod3.c, and reldepmod4.c.
(tests): Add unload, reldep, reldep2, and reldep3.
(modules-names): Add unloadmod, reldepmod1, reldepmod2, reldepmod3,
and reldepmod4.
Add rules to build and run unload, reldep, reldep2, and reldep3.
* elf/dl-lookup.c (_dl_lookup_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_symbol_skip): Remove relocation dependency stuff. This
can never happen here.
(_dl_lookup_versioned_symbol): Add new parameter explicit.
Don't create relocation dependency if it is nonzero.
(_dl_lookup_versioned_symbol_skip): Remove relocation dependency
stuff. This can never happen here.
* sysdeps/generic/ldsodefs.h: Change prototypes.
* elf/dl-reloc.c (RESOLVE_MAP): Pass 0 in explicit parameter to
_dl_lookup_up and _dl_lookup_versioned_symbol.
(RESOLV): Likewise.
* elf/dl-runtime.c (fixup): Likewise.
(profile_fixup): Likewise.
* elf/dl-libc.c (do_dlsym): Pass 1 in explicit parameter to
_dl_lookup_symbol.
* elf/dl-symbol.c (_dl_symbol_value): Likewise.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-sym.c (_dl_sym): Pass 1 in explicit parameter to
_dl_lookup_symbol if handle is not RTLD_DEFAULT. Always compute
and pass down the caller map.
(_dl_vsym): Likewise.
* elf/reldep.c: New file.
* elf/reldep2.c: New file.
* elf/reldep3.c: New file.
* elf/reldepmod1.c: New file.
* elf/reldepmod2.c: New file.
* elf/reldepmod3.c: New file.
* elf/reldepmod4.c: New file.
* elf/unload.c: New file.
* elf/unloadmod.c: New file.
* elf/do-lookup.h: Remove unused undef_name parameter.
* elf/dl-lookup.c: Adjust callers.
2000-05-21 H.J. Lu <hjl@gnu.org>
* elf/do-lookup.h (do_lookup_versioned): Replace reloc_type parameter
with noexec and noplt parameter.
(do_lookup): Likewise.
* elf/dl-lookup.c (_dl_lookup_symbol): Change for new parameters of
do_lookup. Support STV_PROTECTED.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-reloc.c (RESOLVE): Check STB_LOCAL instead of ST_VISIBILITY.
* elf/dl-runtime.c (profile_fixup): Fix a typo in comment.
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.
1999-12-18 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/setrlimit.c: Declare local variable
result if necessary.
* sysdeps/unix/sysv/linux/i386/bits/resource.h: Don't depend on the
unreliable kernel headers.
* sysdeps/unix/sysv/linux/bits/resource.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/resource.h: New file.
* sysdeps/unix/sysv/linux/mips/bits/resource.h: New file.
1999-12-18 Andreas Jaeger <aj@suse.de>
* config.make.in (datadir): Added.
Closes PR libc/1491. Patch by dervishd@jazzfree.com.
1999-12-18 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Save and
set errno.
* sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise.
1999-12-18 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/fxstat64.c: Rewrite to use fstat64
syscall if available.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise for lstat64.
* sysdeps/unix/sysv/linux/xstat64.c: Likewise for stat64.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_STAT64_SYSCALL): New.
1999-12-17 Scott Bambrough <scottb@netwinder.org>
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): New macro to force a
cache flush.
* elf/dl-reloc.c (_dl_relocate_object): Add call to flush cache
after .text segment fixups.
1999-12-16 Andreas Jaeger <aj@suse.de>
* rt/aio.h: Remove erroneous __restrict declarations.
1999-12-18 Ulrich Drepper <drepper@cygnus.com>
* scripts/rellns-sh: Find pwd program also in /usr/bin and let shell
do the job if it is there neither.
Patch by David R. Conrad <drc@adni.net> (PR libc/1485).
1999-12-16 Andreas Jaeger <aj@suse.de>
* sysdeps/ieee754/bits/nan.h (NAN): Rename union to avoid
duplicate definition with function __nan.
Closes PR libc/1487 reported by <diana@kai.com>.
* string/bits/string2.h (__strsep): Help gcc optimizing string access.
* 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.