about summary refs log tree commit diff
path: root/elf/dl-load.c
Commit message (Collapse)AuthorAgeFilesLines
* (struct filebuf): For buf element to have the alignment of ElfXX_Ehdr since ↵Ulrich Drepper2002-10-231-1/+1
| | | | this is what will be stored in it.
* * elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.Roland McGrath2002-10-171-6/+4
| | | | | | | | | | | | | | | | * elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro to signal error if an IE-model TLS reloc resolved to a dlopen'd module. * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela): Call it after performing TPOFF relocs. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. * elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op). * elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash when closing a partially-initialized object. * elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose instead of _dl_fatal_printf when we see PT_TLS.
* * elf/dl-load.c (_dl_dst_count, _dl_dst_substitute): Handle $LIBRoland McGrath2002-10-141-4/+5
| | | | | | dynamic string tag. * elf/Makefile ($(objpfx)trusted-dirs.st): Make the output define DL_DST_LIB based on $(slibdir).
* Update.Ulrich Drepper2002-10-121-20/+18
| | | | | | | | | * elf/dl-load.c (_dl_map_object_from_fd): Remove unnecessarily duplicated variable c. * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL if possible. Add hack to prevent the compiler from clobbering the signal context.
* * elf/dl-load.c (_dl_map_object_from_fd): Use l_addr instead ofRoland McGrath2002-09-121-1/+1
| | | | l_map_start to adjust l_tls_initimage.
* Update.Ulrich Drepper2002-08-251-8/+15
| | | | * elf/dl-load.c: Fix typo in comment. Add a few more __builtin_expect.
* Update.Ulrich Drepper2002-08-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-24 Ulrich Drepper <drepper@redhat.com> * locale/programs/charmap.c (charmap_new_char): Don't use ULONG_MAX as maximum UCS4 value. * sysdeps/unix/sysv/linux/ia64/sys/user.h: New file. * sysdeps/generic/strtol.c: We don't need the isascii test in glibc. * malloc/hooks.c (public_sET_STATe): use size_t as type for i. * malloc/malloc.c (mALLINFo): Likewise. * libio/wstrops.c (_IO_wstr_pbackfail): Use WEOF in comparison. * libio/wfileops.c (_IO_wfile_overflow): Use EOF not WEOF when examining result of _IO_do_flush call. * stdio-common/vfprintf.c (vfprintf): Use correct type in va_arg. Use prec not spec when sizing buffers. * catgets/open_catalog.c (__open_catalog): Add casts to avoid warnings. * locale/loadarchive.c (_nl_load_locale_from_archive): Likewise. * locale/loadlocale.c (_nl_intern_locale_data): Likewise. * stdio-common/vfscanf.c (inchar): Likewise. * misc/efgcvt_r.c (fcvt_r): Likewise. * elf/dl-misc.c (_dl_debug_vdprintf): Likewise. * elf/readlib.c (process_file): Likewise. * elf/sprof.c (load_profdata): Likewise. * sysdeps/ia64/hp-timing.h (HP_TIMING_PRINT): Likewise. * locale/programs/linereader.c (get_toplvl_escape): Likewise. * locale/programs/charmap.c (charmap_read): Likewise. * libio/fileops.c: Likewise. * libio/fmemopen.c: Likewise. * stdlib/strtod.c: Likewise. * elf/dl-load.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c (process_block): Likewise. * sysdeps/unix/sysv/linux/ia64/Makefile: Define _ASM_IA64_CURRENT_H macro to calm down the compiler. * iconv/gconv_cache.c (__gconv_load_cache): Add cast to avoid warning. * sysdeps/ia64/elf/initfini.c: Don't use newlines embedded in string. * sysdeps/unix/sysv/linux/i386/sysdep.S: Update comment regarding placement of errno definition. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * resolv/nss_dns/dns-host.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. 2002-08-16 Paul Eggert <eggert@twinsun.com> * resolv/gethnamaddr.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. * resolv/res_query.c (MAXPACKET): Likewise. architectures.
* * elf/dl-load.c (lose): Remove [!SHARED] conditional from null checkRoland McGrath2002-08-151-3/+2
| | | | on L->l_prev; it can happen under rtld --verify too.
* Update.Ulrich Drepper2002-08-081-1/+1
| | | | | * elf/dl-load.c (_dl_map_object_from_fd): Add missing \n in error message.
* * Makerules (cpp-srcs-left): When setting this to runRoland McGrath2002-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppflags-iterator.mk, must append .c to $(tests) and $(xtests) words. Combine the two loops into one on the concatenated list, including those as well as $(test-srcs). * elf/dl-minimal.c (__libc_memalign): Guts of malloc moved here, since we align here with optimally minimal waste anyway. (malloc): Just call that. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Set l_tls_offset to the right variable. * elf/dl-load.c (_dl_map_object_from_fd): Use p_vaddr, not p_offset, to compute memory location for l_tls_initimage. * elf/rtld.c (_dl_start): Likewise. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise. * libio/oldiopopen.c: Move #include's before #if SHLIB_COMPAT, because the .d file is generated in the non-shared case and so fails to catch them otherwise. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): New function, split out of _dl_allocate_tls. (_dl_allocate_tls_init): Likewise. (_dl_allocate_tls): Call those. * sysdeps/generic/ldsodefs.h: Declare them with attribute_hidden. * elf/rtld.c (dl_main): Call them separately instead of calling _dl_allocate_tls. Delay _dl_allocate_tls_init until after relocation is finished, so that the initializer data has been relocated before we copy it into the main thread's TLS block. * sysdeps/generic/dl-tls.c (_dl_allocate_tls): Fix off-by-one error in loop conditions, prevented the last used module from being initialized.
* * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.Roland McGrath2002-08-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file, which does the right thing when __thread support is available. * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]: Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop', `p_h_errno', `p_resp', and `p_res' members. * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]: Don't initialize `p_errnop' and `p_h_errnop' members. (__pthread_reset_main_thread): Likewise. (__pthread_initialize_manager): Likewise. * manager.c (__pthread_manager, pthread_handle_create): Likewise. * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]: Don't initialize `p_resp' member. (__pthread_reset_main_thread): Likewise. * manager.c (pthread_handle_create): Likewise. * specific.c (libc_internal_tsd_set, libc_internal_tsd_get): Conditionalize these on [!(USE_TLS && HAVE___THREAD)]. * errno.c [USE_TLS && HAVE___THREAD] (__h_errno_location, __res_state): Don't define these at all. * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments! (INSTALL_NEW_DTV, GET_DTV): Likewise. * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise. * weaks.c: Don't include <errno.h> here. 2002-08-01 Roland McGrath <roland@redhat.com> * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of TLS_INIT_TP. (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall. (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both. (TLS_INIT_TP): Use that.
* Update.Ulrich Drepper2002-07-161-2/+6
| | | | | * elf/dl-load.c (_dl_map_object_from_fd): If loaded object uses TLS fail is USE_TLS is not defined.
* Update.Ulrich Drepper2002-04-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-24 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c (open_verify): Correct __lseek parameters. Patch by Simon Hildrew <simon@hildrew.net> [PR libc/3354]. 2002-04-23 H.J. Lu <hjl@gnu.org> * include/math.h (isfinite): Fix a typo. 2002-04-24 Ulrich Drepper <drepper@redhat.com> * libio/bug-ungetwc2.c (test_locale): Use the de_DE.UTF-8 locale which is created by the test suite. 2002-04-20 Bruno Haible <bruno@clisp.org> * iconvdata/iso-2002-kr.c (MAX_NEEDED_FROM): Set to 4. (BODY for FROM_LOOP): Fix comparisons between inptr and inend. 2002-04-20 Bruno Haible <bruno@clisp.org> * iconvdata/johab.c (BODY for FROM_LOOP): Change type of i, m, f, to avoid gcc warning. 2002-04-20 Bruno Haible <bruno@clisp.org> * iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Fix modification mask of data->__statep->__count. 2002-04-20 Bruno Haible <bruno@clisp.org> * iconvdata/euc-jisx0213.c (BODY for TO_LOOP): Really ignore Unicode tag characters. * iconvdata/shift_jisx0213.c (BODY for TO_LOOP): Likewise. * sysdeps/unix/sysv/linux/x86_64/ldconfig.h: New file. * sysdeps/unix/sysv/linux/x86_64/dl-cache.h: New file.
* Update.Ulrich Drepper2002-03-011-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-03-01 Ulrich Drepper <drepper@redhat.com> * elf/Makefile (dl-routines): Add dl-origin. (elide-routines.os): Add dl-origin. * elf/Versions [ld] (GLIBC_PRIVATE): Add _dl_get_origin. * elf/dl-debug.c (_dl_debug_initialize): Add missing INTUSE around _dl_debug_state. * include/libc-symbols.c: Define attribute_hidden depending on HAVE_VISIBILITY_ATTRIBUTE. Add definition of INTVARDEF. * elf/dl-deps.c: Use INTUSE with __libc_enable_secure. * elf/dl-load.c: Likewise. * elf/rtld.c: Likewise. * include/unistd.h: Declare __libc_enable_secure_internal. * sysdeps/generic/dl-sysdep.c: Use INTVARDEF with __libc_enable_secure. Use INTUSE with __libc_enable_secure. * sysdeps/mach/hurd/dl-sysdep.c: Likewise. * elf/dl-deps.c: Use INTUSE with _dl_out_of_memory. * elf/dl-error.c: Likewise, * sysdeps/generic/ldsodefs.h: Declare _dl_out_of_memory_internal. * elf/dl-dst.h [_RTLD_GLOBAL]: Define _dl_get_origin to use INTUSE. * sysdeps/generic/dl-origin.c: Undefine _dl_get_origin macro before function definition. Use INTDEF with _dl_get_origin. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * elf/dl-init.c: Use INTUSE with _dl_starting_up. * elf/rtld.c: Likewise. Use INTVARDEF for _dl_starting_up. * elf/dl-profile.c: Use INTDEF for _dl_mcount. * elf/dl-runtime.c: Use INTUSE with _dl_mcount. * sysdeps/generic/ldsodefs.h: Declare _dl_mcount_internal. * elf/dl-conflict.c: Use rtld_progrname instead of _dl_argv[0]. * 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-reloc.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc-32/dl-machine.h: Likewise. * sysdeps/sparc/sparc-64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. * elf/rtld.c: Use INTDEF for _dl_argv. Use rtld_progrname instead of _dl_argv[0]. Use INTUSE with _dl_argv. * sysdeps/generic/dl-sysdep.c: Use INTUSE with _dl_argv. * sysdeps/generic/ldsodefs.h: Define rtld_progname macro.
* Update.Ulrich Drepper2002-02-281-0/+7
| | | | | * elf/dl-load.c (_dl_map_object_from_fd): Always add SONAME to l_libname if profiling is enabled [PR libc/2916].
* Update.Ulrich Drepper2002-02-131-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/dl-tls.c (TLS_DTV_UNALLOCATED): Renamed from TLS_DTV_UNALLOCATE. (oom): New function. (_dl_next_tls_modid): Rewrite to handle dl_tls_dtv_slotinfo_list. (_dl_determine_tlsoffset): Likewise. (_dl_allocate_tls): Likewise. (__TLS_GET_ADDR): Define if not already defined. (_dl_tls_symaddr): New function. (allocate_and_init): New function. (__tls_get_addr): Actually implement handling of generation counter and deferred allocation. * sysdeps/generic/ldsodefs.h (_rtld_global): Remove _dl_initimage_list, add _dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and _dl_tls_generation. Define TLS_SLOTINFO_SURPLUS and DTV_SURPLUS. Declare _dl_tls_symaddr. * sysdeps/i386/dl-tls.h: Disable __tls_get_addr handling unless SHARED. * include/link.h (struct link_map): Remove l_tls_nextimage and l_tls_previmage. * elf/dl-sym.c (_dl_sym): After successful lookup call _dl_tls_symaddr instead of DL_SYMBOL_ADDRESS for STT_TLS symbols. (_dl_vsym): Likewise. * elf/rtld.c (_dl_start_final): Adjust initdtv initialization for new layout. (dl_main): Allow PT_TLS be present for empty segment. Remove nextimage list handling. Instead add all modules using TLS to dl_tls_dtv_slotinfo_list. * elf/dl-open.c (dl_open_worker): After successfully loading all objects add those with TLS to the dl_tls_dtv_slotinfo_list list. * elf/dl-load.c (_dl_map_object_from_fd): If PT_TLS entry is for an empty segment don't do anything. Remove handling of initimage list. * elf/Versions [ld] (GLIBC_2.0): Add __libc_memalign. (GLIBC_PRIVATE): Add _dl_tls_symaddr. * elf/dl-minimal.c: Define __libc_memalign. * elf/dl-support.c: Remove _dl_initimage_list. Add _dl_tls_dtv_slotinfo_list, _dl_tls_static_nelem, and _dl_tls_generation. * include/stdlib.h: Declare __libc_memalign. * elf/Makefile: Add rules to build and run tst-tls4 and tst-tls5. * elf/tst-tls4.c: New file. * elf/tst-tls5.c: New file. * elf/tst-tlsmod2.c: New file. * elf/tls-macros.h: asms using ___tls_get_addr destroy %ecx and %edx. * elf/tst-tlsmod1.c: Don't define variables unles USE_TLS. * elf/tst-tls1.c: Use test-skeleton.c. * elf/tst-tls2.c: Likewise. * elf/tst-tls3.c: Likewise. * elf/dl-conflict.c (RESOLVE_MAP): Return NULL not 0. * sysdeps/mips/machine-gmon.h: Update MCOUNT for current GCC behavior.
* Update.Ulrich Drepper2002-02-111-6/+6
| | | | | | | | | | * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): More changes required by passing pointer to last element of the list. * elf/dl-load.c (_dl_map_object_from_fd): Move adjustment of l_tls_initimage to a place where it actually is performed. * elf/tls-macros.h: ...here. New file.
* (_dl_map_object_from_fd): Store alignment requirement along with the other ↵Ulrich Drepper2002-02-071-3/+8
| | | | info in the link map. Change queueing of init images for double linked list. Use _dl_next_tls_modid to compute l_tls_modid.
* Update.Andreas Jaeger2002-02-061-18/+18
| | | | | | | | | | | | | | | 2002-02-06 Andreas Jaeger <aj@suse.de> * include/libc-symbols.h (INTUSE): Renamed from INT. * elf/dl-deps.c: Change users. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/rtld.c: Likewise. * elf/dl-version.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-init.c: Likewise.
* Update.Ulrich Drepper2002-02-061-1/+5
| | | | | | | | | * elf/dl-load.c (_dl_map_object_from_fd): Prevent dynamically loading modules with the DF_STATIC_TLS flag set. * elf/dynamic-link.h (elf_get_dynamic_info): Initialize l_flags element. * include/link.h (struct link_map): Add l_flags field. * elf/elf.h (DF_STATIC_TLS): New definition.
* Update.Ulrich Drepper2002-02-051-0/+30
| | | | | | * elf/dl-load.c (_dl_map_object_from_fd): Handle PT_TLS program header entry. * elf/dl-support.c: Define _dl_initimage_list and _dl_tls_module_cnt.
* Update.Ulrich Drepper2002-02-031-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2002-02-031-29/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ld.so to not use functions which are exported. One cannot interpose them anyway. Use INT() to mark uses, INTDEF() to mark definitions. * include/libc-symbols.h: Define INT and INTDEF. * sysdeps/generic/ldsodefs.h: Declare _dl_debug_printf_internal, _dl_signal_error_internal, _dl_map_object_internal, _dl_map_object_deps_internal, _dl_lookup_symbol_internal, _dl_lookup_versioned_symbol_internal, _dl_relocate_object_internal, _dl_debug_state_internal, _dl_start_profile_internal, and _dl_unload_cache_internal. * include/dlfcn.h: Declare _dl_catch_error_internal. * elf/rtld.c: Use INT for calls to any of the *_internal functions above. Add INTDEF to function definitions. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: 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-misc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/alpha/dl-machine.h (RTLD_START): Call _dl_init_internal instead of _dl_init. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/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/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-start.S (_dl_start_user): Likewise. * elf/Versions: Don't export _dl_check_all_versions, _dl_sysdep_start, and _dl_debug_initialize.
* Update.Ulrich Drepper2002-02-021-24/+36
| | | | | | | | | | | | | | 2002-02-02 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/dl-environ.c (unsetenv): Optimize. Don't use strncmp. * elf/dl-load.c (is_dst): Optimize. Don't call strncmp twice. * elf/rtld.c (process_dl_debug): Optimize. Avoid calls to strncmp, strspn, and strcspn. (process_envvars): Don't use strcspn. * elf/dl-load.c (_dl_dst_count): Fix possible endless loop. (_dl_dst_substitute): Likewise.
* Update.Ulrich Drepper2002-01-311-57/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-01-30 Ulrich Drepper <drepper@redhat.com> * Versions.def [ld]: Add GLIBC_2.3. * elf/dl-addr.c: Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. * elf/dl-close.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.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-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-sym.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * elf/do-rel.h: Likewise. * elf/dynamic-link.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-fptr.c: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/getclktck.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. * malloc/thread-m.h: Spinlock definitions for x86/x86_64.
* Update.Ulrich Drepper2002-01-291-9/+3
| | | | | * elf/dl-load.c (_dl_map_object): Remove incorrect optimization for SHARED code. Reported by Ben Collins <bcollins@debian.org>.
* Update.Ulrich Drepper2001-12-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (_dl_map_object_from_fd): Remove use of _dl_pf_to_prot. Use arithmetic ↵Ulrich Drepper2001-11-101-24/+12
| | | | operation using PF_TO_PROT macro.
* (is_dst): Pretty printing.Ulrich Drepper2001-11-101-2/+2
|
* Update.Ulrich Drepper2001-11-101-35/+34
| | | | | | | | | | 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.
* (lose): Remove some unnecessary code. The new object is always the last in ↵Ulrich Drepper2001-11-091-4/+8
| | | | the list.
* Update.Ulrich Drepper2001-11-091-13/+0
| | | | | | | 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.
* Update.Ulrich Drepper2001-11-071-12/+11
| | | | | | | | | 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.
* Update.Ulrich Drepper2001-11-071-82/+154
| | | | | | | | 2001-11-06 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c (decompose_rpath): Optimize error handling for size. (_dl_init_paths): Likewise. (_dl_map_object_from_fd): Likewise.
* Update.Ulrich Drepper2001-11-011-21/+40
| | | | | | | 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.
* Update.Ulrich Drepper2001-11-011-6/+4
| | | | | | | | | | | | | | 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>
* Update.Ulrich Drepper2001-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-18 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (ptmalloc_init): Handle _environ==NULL. Reported by B. D. Elliott <bde@nwlink.com> [PR libc/2541]. 2001-09-18 Andreas Schwab <schwab@suse.de> * elf/dl-load.c (_dl_map_object_from_fd): Update handling of scope list, now that l_scope is a pointer. * elf/dl-open.c (dl_open_worker): Fix thinko when enlarging the scope list. 2001-09-18 kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h (elf_machine_rela): Fix reverse condition. (elf_machine_rela_relative): Add a missing declaration. 2001-09-18 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed: New. * sysdeps/unix/sysv/linux/configure.in: Add ia64 and s390 ldd-rewrite scripts. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * elf/ldd.bash.in: Update copyright message. 2001-09-17 H.J. Lu <hjl@gnu.org> * hurd/hurdmalloc.c (bcopy): Removed. (realloc): Replace bcopy with memcpy. * hurd/path-lookup.c (file_name_path_scan): Likewise. * resolv/gethnamaddr.c (map_v4v6_address): Likewise. * sunrpc/rpcinfo.c (pmapdump): Likewise. * resolv/gethnamaddr.c (getanswer): Replace bcopy with memmove. (gethostbyaddr): Likewise. * sunrpc/rpcinfo.c (get_inet_address): Likewise. 2001-09-18 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/eval.c: Removed.
* Update.Ulrich Drepper2001-09-081-1/+2
| | | | | | | | | 2001-09-08 Ulrich Drepper <drepper@redhat.com> * elf/dl-object.c: Avoid allocating extra memory block for name. * elf/dl-close.c (_dl_close): Don't free l_libname if it is no allocated separately. * elf/dl-load.c (_dl_map_object_from_fd): Likewise.
* Update.Ulrich Drepper2001-09-051-13/+20
| | | | | | | | | | | | | | | | | | | 2001-09-04 Ulrich Drepper <drepper@redhat.com> Correct very misleading message for error in failed runtime relocation. * elf/dl-error.c (_dl_signal_error): Take extra parameter to describe place of the error. (_dl_signal_cerror): Likewise. * sysdeps/generic/ldsodefs.h: Adjust prototypes. * elf/dl-close.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise.
* (_dl_map_object_from_fd): Use correct symbolic constant in mprotect call.Ulrich Drepper2001-08-111-1/+1
|
* Update.Ulrich Drepper2001-08-111-35/+33
| | | | | | | * elf/dl-open.c (add_to_global): Remove stale comment. * elf/dl-load.c (fillin_rpath): In SUID binaries, don't mark non-system-dirs in LD_LIBRARY_PATH as nonexisting, simply drop them.
* Update.Ulrich Drepper2001-07-231-4/+6
| | | | | | * elf/dl-load.c (_dl_dst_count): In SUID binaries expand $ORIGIN if it is alone. (_dl_dst_substitute): Likewise.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2001-05-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-05-18 Jakub Jelinek <jakub@redhat.com> * elf/dl-lookup.c (PROTECTED): Remove defines. (add_dependency): Mark it with internal_function. (_dl_do_lookup, _dl_do_lookup_versioned): New functions. (_dl_lookup_symbol, _dl_lookup_symbol_skip, _dl_lookup_versioned_symbol, _dl_lookup_versioned_symbol_skip): Use it if we don't want do_lookup* inlined. 2001-05-18 Jakub Jelinek <jakub@redhat.com> * include/link.h (struct r_scope_elem): Remove r_duplist and r_nduplist fields. * elf/dl-load.c (_dl_map_object_from_fd): Don't initialize them. * elf/dl-lookup.c (_dl_lookup_symbol_skip): Look in r_list, not r_duplist. (_dl_lookup_versioned_symbol_skip): Likewise. * elf/dl-deps.c (struct list): Remove dup field, rename unique to next. (_dl_map_object_deps): Don't compute duplicate list. * elf/dl-symbol.c: Removed. * elf/Makefile (routines): Remove dl-symbol. 2001-05-22 Ulrich Drepper <drepper@redhat.com> * po/el.po: Update from translation team. * po/sv.po: Likewise.
* Update.Ulrich Drepper2001-03-201-19/+22
| | | | * elf/dl-load.c: Various little optimizations.
* Update.Ulrich Drepper2001-03-201-61/+62
| | | | | | | | | 2001-03-19 Ulrich Drepper <drepper@redhat.com> * elf/dl-dst.h (DL_DST_COUNT): Add __builtin_expect. * elf/dl-load.c (_dl_dst_count): Make DST recognition more robust. (_dl_dst_substitute): Likewise.
* Update.Ulrich Drepper2001-03-171-1/+1
| | | | | | | 2001-03-16 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Internationalize.
* Update.Ulrich Drepper2001-03-171-3/+1
| | | | | | | 2001-02-06 Jakub Jelinek <jakub@redhat.com> * elf/dl-load.c (_dl_map_object): Don't test l_opencount when looking for name matches.
* Update.Ulrich Drepper2001-03-161-12/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-12 Jakub Jelinek <jakub@redhat.com> * csu/Makefile (abi-tag.h): Define OS and version separately, allow version to be overriden from config.h. * csu/abi-note.S: Use OS and version separately, include config.h. * elf/dl-load.c (_dl_osversion): New. (_dl_map_object_from_fd): Kill some warnings. (open_verify): Check .note.ABI-tag of the library if present. * elf/Makefile (CPPFLAGS-dl-load.c): Add -I$(csu-objpfx). * elf/cache.c (struct cache_entry): Add osversion. (print_entry): Print osversion. (print_cache): Pass osversion to it. (compare): Sort according to osversion. (save_cache): Set osversion. (add_to_cache): Add osversion argument. * sysdeps/generic/ldconfig.h (add_to_cache, process_file, process_elf_file): Add osversion argument. * elf/readlib.c (process_file): Likewise. * sysdeps/generic/readelflib.c (process_elf_file): Likewise. * sysdeps/unix/sysv/linux/ia64/readelflib.c (process_elf_file, process_elf32_file, process_elf64_file): Likewise. * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file, process_elf32_file, process_elf64_file): Likewise. * sysdeps/unix/sysv/linux/sparc/readelflib.c (process_elf_file, process_elf32_file, process_elf64_file): Likewise. * elf/ldconfig.c (manual_link): Pass it. (search_dir): Issue diagnostic if two libs with the same soname in the same directory have different .note.ABI-tag. Record osversion in dlib_entry and use it from there. (struct lib_entry): Remove. (struct dlib_entry): Add osversion. * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Check osversion. * sysdeps/generic/dl-cache.h (struct file_entry_new): Replace __unused field with osversion. * sysdeps/generic/ldsodefs.h (_dl_osversion): Declare. * sysdeps/unix/sysv/linux/init-first.c: Include ldsodefs.h. * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Save kernel version in _dl_osversion. * sysdeps/unix/sysv/linux/configure.in: Define __ABI_TAG_VERSION. * Makerules (build-shlib-helper, build-module-helper): New. (build-shlib, build-module-helper): Make sure .note.ABI-tag comes early. * config.h.in (__ABI_TAG_VERSION): Add. * elf/dl-minimal.c (__strtoul_internal): Set endptr on return. * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): Handle LD_ASSUME_KERNEL. * sysdeps/unix/sysv/linux/dl-librecon.h: New.
* Update.Ulrich Drepper2001-03-011-1/+1
| | | | | | | | | | | 2001-03-01 Ulrich Drepper <drepper@redhat.com> * elf/dl-load.c: Pretty printing. * elf/dl-object.c (_dl_new_object): Don't add the loader's scope twice. * elf/dl-misc.c (_dl_debug_vdprintf): Fix typo visible on 64-bit