summaryrefslogtreecommitdiff
path: root/elf/dl-close.c
AgeCommit message (Collapse)Author
2008-01-31Updated to fedora-glibc-20080131T0821cvs/fedora-glibc-2_7_90-4Jakub Jelinek
2007-09-29Updated to fedora-glibc-20070929T1859cvs/fedora-glibc-2_6_90-16Jakub Jelinek
2007-07-31Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1Jakub Jelinek
2007-07-07 * elf/dl-close.c (free_mem): Free _dl_scope_free_list.Jakub Jelinek
* include/link.h: Don't include rtld-lowlevel.h. (struct link_map): Remove l_scope_lock. * sysdeps/generic/ldsodefs.h: Don't include rtld-lowlevel.h. (_dl_scope_free_list): New field (variable) in _rtld_global. (DL_LOOKUP_SCOPE_LOCK): Remove. (_dl_scope_free): New prototype. * elf/dl-runtime.c (_dl_fixup): Don't use __rtld_mrlock_*lock. Don't pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x. (_dl_profile_fixup): Likewise. * elf/dl-sym.c (do_sym): Likewise. Use wrapped _dl_lookup_symbol_x whenever !RTLD_SINGLE_THREAD_P, use THREAD_GSCOPE_SET_FLAG and THREAD_GSCOPE_RESET_FLAG around it. * elf/dl-close.c (_dl_close_worker): Don't use __rtld_mrlock_{change,done}. Call _dl_scope_free on the old scope. Make sure THREAD_GSCOPE_WAIT () happens if any old scopes were queued or if l_scope_mem has been abandoned. * elf/dl-open.c (_dl_scope_free): New function. (dl_open_worker): Use it. Don't use __rtld_mrlock_{change,done}. * elf/dl-support.c (_dl_scope_free_list): New variable. * elf/dl-lookup.c (add_dependency): Remove flags argument. Remove DL_LOOKUP_SCOPE_LOCK handling. (_dl_lookup_symbol_x): Adjust caller. Remove DL_LOOKUP_SCOPE_LOCK handling. * elf/dl-object.c (_dl_new_object): Don't use __rtld_mrlock_initialize.
2007-07-072007-06-09 Ulrich Drepper <drepper@redhat.com>Jakub Jelinek
* elf/do-lookup.h (do_lookup_x): Read r_nlist before r_list and make sure gcc doesn't mess around with this. 2007-06-08 Ulrich Drepper <drepper@redhat.com> * elf/dl-lookup.c (_dl_lookup_symbol_x): Remove use of r_nlist. 2007-06-08 Jakub Jelinek <jakub@redhat.com> * elf/dl-close.c (_dl_close_worker): Remove all to be removed libraries from the global scope at once and call THREAD_GSCOPE_WAIT 2007-05-18 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close_worker): When removing object from global scope, wait for all lookups to finish afterwards. * elf/dl-open.c (add_to_global): When global scope array must grow, allocate a new one and free old array only after all lookups finish. * elf/dl-runtime.c (_dl_fixup): Protect using global scope. (_dl_lookup_symbol_x): Likewise. * elf/dl-support.c: Define _dl_wait_lookup_done. * sysdeps/generic/ldsodefs.h (struct rtld_global): Add _dl_wait_lookup_done. nptl/ 2007-05-28 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit insn suffix. (THREAD_GSCOPE_GET_FLAG): Remove. * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove. * allocatestack.c (__wait_lookup_done): Revert 2007-05-24 changes. * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag. (THREAD_GSCOPE_GET_FLAG): Remove. (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag instead of THREAD_GSCOPE_GET_FLAG. (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after it. * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. 2007-05-24 Richard Henderson <rth@redhat.com> * descr.h (struct pthread): Add header.gscope_flag. * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT): Define. 2007-05-26 Ulrich Drepper <drepper@redhat.com> * allocatestack.c: Revert last change. * init.c: Likewise. * sysdeps/i386/tls.h: Likewise. * sysdeps/x86_64/tls.h: Likewise. 2007-05-24 Jakub Jelinek <jakub@redhat.com> * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag. (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define. (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define. * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use PTR_DEMANGLE. (THREAD_GSCOPE_GET_FLAG): Define. * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define. * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG instead of ->header.gscope_flag directly. 2007-05-21 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Remove ptr_wait_lookup_done again. * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here. (__pthread_initialize_minimal_internal): Initialize _dl_wait_lookup_done pointer in _rtld_global directly. * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): Remove code to code _dl_wait_lookup_done. * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not encrypted for now. 2007-05-19 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (__wait_lookup_done): New function. * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add ptr_wait_lookup_done. * init.c (pthread_functions): Initialize .ptr_wait_lookup_done. * pthreadP.h: Declare __wait_lookup_done. * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag. Define macros to implement reference handling of global scope. * sysdeps/x86_64/tls.h: Likewise. * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): Initialize GL(dl_wait_lookup_done).
2007-05-15Updated to fedora-glibc-20070515T2025Roland McGrath
2006-10-29Updated to fedora-glibc-20061029T2155cvs/fedora-glibc-2_5_90-3Jakub Jelinek
2006-10-27Updated to fedora-glibc-20061027T1902cvs/fedora-glibc-2_5_90-2Jakub Jelinek
2006-10-25Updated to fedora-glibc-20061025T1857cvs/fedora-glibc-2_5_90-1Jakub Jelinek
2006-09-19Updated to fedora-glibc-20060919T1816Jakub Jelinek
2005-04-27Updated to fedora-glibc-20050427T1043Jakub Jelinek
2005-03-19Updated to fedora-glibc-20050319T1907cvs/fedora-glibc-2_3_4-15Jakub Jelinek
2005-03-03Updated to fedora-glibc-20050303T1335Jakub Jelinek
2005-02-08Updated to fedora-glibc-20050208T0948cvs/fedora-glibc-2_3_4-6Jakub Jelinek
2004-10-142.3.3-68Jakub Jelinek
2004-10-14Updated to fedora-glibc-20041014T0548Jakub Jelinek
2004-08-04(do_release_all): Add __libc_freeres_fn_section.Ulrich Drepper
2004-03-07Update.Ulrich Drepper
2004-03-07 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/ldsodefs.h: Move _dl_initial_searclist, _dl_hp_timing_overhead, _dl_init_all_dirs, and the content of dl-procinfo.c from _rtld_global to _rtld_global_ro. * elf/rtld.c: Adjust initializer for _rtld_global_ro. * elf/dl-close.c: Use GLRO instead of GL where appropriate. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * sysdeps/i386/dl-procinfo.h: Likewise. * sysdeps/i386/i686/hp-timing.h: Likewise. * sysdeps/ia64/hp-timing.h: Likewise. * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise. * sysdeps/sparc/sparc64/hp-timing.h: Likewise. * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise.
2004-03-06Update.Ulrich Drepper
* elf/Versions: Remove functions which are not exported anymore. * dlfcn/dlerror.c: Call ld.so functions through GLSO. * dlfcn/dlinfo.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-sym.c: Likewise. * sysdeps/generic/libc-start.c: Likewise. * elf/dl-debug.c: Remove *_internal definition. Don't use INTUSE for functions which are not exported anymore. * 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-profile.c: Likewise. * elf/dl-profstub.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * include/dlfcn.h: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-fptr.c: Likewise. * sysdeps/generic/dl-origin.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/dl-tls.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/i386/dl-tls.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * elf/rtld.c: Likewise. Export function though _rtld_global_ro. * generic/dl-fptr.c: Likewise. * mach/hurd/dl-sysdep.c: Likewise. * unix/sysv/linux/ia64/dl-static.c: Likewise. * unix/sysv/linux/ia64/getpagesize.c: Likewise. * unix/sysv/linux/m68k/getpagesize.c: Likewise. * unix/sysv/linux/sparc/sparc32/getpagesize.c: Likewise.
2004-03-05Update.Ulrich Drepper
* sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h: Likewise. * sysdeps/powerpc/powerpc32/dl-machine.c: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/alpha/dl-machine.h: Likewise.
2004-01-27Update.Ulrich Drepper
2004-01-26 David Mosberger <davidm@hpl.hp.com> * elf/link.h (struct dl_phdr_info): Fix typo in comment. * elf/rtld.c (dl_main): After incrementing dl_nloaded, also increment dl_load_adds. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Replace GL(dl_load_subs) with equivalent GL(dl_load_adds - GL(dl_nloaded). (dl_iterate_phdr): Likewise. * elf/dl-close.c (_dl_close): Delete increment of GL(dl_load_subs). * elf/dl-support.c: Remove global variable _dl_load_subs. * sysdeps/generic/ldsodefs.h (struct rtld_global): Remove _dl_load_subs member. 2004-01-27 Jakub Jelinek <jakub@redhat.com> * elf/rtld.c (_dl_start_final): Don't set l_relro_* here. (_dl_start): And neither here. (dl_main): Set GL(dl_loaded)->l_relro_* and GL(dl_rtld_map)->l_relro_*.
2004-01-24Update.Ulrich Drepper
2004-01-23 David Mosberger <davidm@hpl.hp.com> * sysdeps/generic/ldsodefs.h (struct rtld_global): Add members _dl_load_adds and _dl_load_subs. * elf/dl-support.c (_dl_load_adds): New variable. (_dl_load_subs): Likewise. * elf/dl-object.c (_dl_new_object): Increment dl_load_adds. * elf/dl-close.c (_dl_close): Increment dl_load_subs. * elf/link.h (struct dl_phdr_info): Add members dlpi_adds and dlpi_subs. * include/link.h: Likewise. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Initialize dlpi_adds and dlpi_subs members. (dl_iterate_phdr): Likewise. * elf/tst-dlmodcount.c: New file. * elf/Makefile (distribute): Mention tst-dlmodcount.c. (tests): If build-shared, mention tst-dlmodcount. ($(objpfx)tst-dlmodcount): If build-shared, build and run tst-dlmodcount.
2003-04-27Update.Ulrich Drepper
2003-04-26 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c [USE_TLS && TLS_TCB_AT_TP] (_dl_close): Reimplement tracking of freed memory in static TLS block. * elf/Makefile: Add rules to build and run tst-tls13. * elf/tst-tls13.c: New file. * elf/tst-tlsmod13.c: New file. * elf/tst-tlsmod13a.c: New file. * elf/tst-tls8.c: Adjust types of variables to avoid warnings. * elf/dl-reloc.c: Pretty printing.
2003-04-26Update.Ulrich Drepper
2003-04-26 Andreas Schwab <schwab@suse.de> * elf/dl-close.c (remove_slotinfo): Fix missing parens.
2003-04-25Update.Ulrich Drepper
2003-04-22 Jakub Jelinek <jakub@redhat.com> * include/link.h (NO_TLS_OFFSET): Define to 0 if not defined. * elf/dl-close.c (_dl_close): Use NO_TLS_OFFSET. * elf/dl-object.c (_dl_new_object): Initialize l_tls_offset to NO_TLS_OFFSET. * elf/rtld.c (_dl_start_final, _dl_start): Likewise. * elf/dl-reloc.c (CHECK_STATIC_TLS): Use NO_TLS_OFFSET. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Likewise. * sysdeps/powerpc/dl-tls.h (TLS_TPREL_VALUE): Don't subtract TLS_TCB_SIZE.
2003-03-16* nscd/cache.c (cache_search): Give first arg type `request_type'.Roland McGrath
* nscd/nscd.h: Update decl. * nscd/nscd_getpw_r.c (nscd_getpw_r): Add casts for signedness. * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. * elf/dl-close.c (_dl_close): Likewise. * sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): int -> size_t * io/fts.c (fts_build): Likewise. * elf/cache.c (add_to_cache): Likewise. * locale/programs/locarchive.c (show_archive_content): Likewise. * posix/fnmatch.c (fnmatch): Tweak __builtin_expect use. * include/ctype.h (__ctype_b_loc): Tweak type punning to make gcc 3.3 happy. (__ctype_toupper_loc, __ctype_tolower_loc): Likewise.
2003-01-27Update.Ulrich Drepper
2003-01-26 Andreas Schwab <schwab@suse.de> * sysdeps/wordsize-32/divdi3.c: Export the functions only as compatibility symbols. Remove INTDEF for __divdi3. * sysdeps/wordsize-32/lldiv.c: Don't use __divdi3_internal. * sysdeps/powerpc/powerpc32/divdi3.c: Remove. * sysdeps/powerpc/powerpc32/Makefile (CPPFLAGS-divdi3.c): Don't define. * sysdeps/powerpc/powerpc32/Dist: Remove divdi3.c. 2003-01-24 Jakub Jelinek <jakub@redhat.com> * elf/tls-macros.h: Add SPARC 32-bit definitions. * sysdeps/sparc/sparc32/elf/configure.in: Add TLS check. * sysdeps/sparc/sparc32/dl-machine.h: Add dl_machine_h guards for the first half of the header. Include tls.h. (elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs too. (elf_machine_rela): Handle TLS relocs. * sysdeps/sparc/dl-tls.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Add cancellation support. * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Use %g6 instead of %g7. * sysdeps/sparc/sparc32/memchr.S: Likewise. * sysdeps/sparc/sparc32/memcpy.S: Likewise. * sysdeps/sparc/sparc32/strcat.S: Likewise. * sysdeps/sparc/sparc32/strchr.S: Likewise. * sysdeps/sparc/sparc32/strcmp.S: Likewise. * sysdeps/sparc/sparc32/strcpy.S: Likewise. * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. * sysdeps/sparc/sparc64/hp-timing.h: Likewise. * sysdeps/sparc/sparc64/memcpy.S: Likewise. * sysdeps/sparc/sparc64/stpcpy.S: Likewise. * sysdeps/sparc/sparc64/stpncpy.S: Likewise. * sysdeps/sparc/sparc64/strcat.S: Likewise. * sysdeps/sparc/sparc64/strchr.S: Likewise. * sysdeps/sparc/sparc64/strcmp.S: Likewise. * sysdeps/sparc/sparc64/strcpy.S: Likewise. * sysdeps/sparc/sparc64/strncmp.S: Likewise. * sysdeps/sparc/sparc64/strncpy.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. 2003-01-24 Andreas Schwab <schwab@suse.de> * elf/dl-close.c (_dl_close): Don't relocate DT_FINI_ARRAY elements, and process them backwards. * elf/Makefile ($(objpfx)tst-array4): New target. ($(objpfx)tst-array4.out): Likewise. (tests) [$(have-initfini-array) = yes]: Add tst-array4. * elf/tst-array4.c: New file. * elf/tst-array4.exp: Likewise. 2003-01-24 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: New file. 2003-01-27 Guido Guenther <agx@sigxcpu.org> * sysdeps/unix/sysv/linux/mips/sysdep.h (SYSCALL_ERROR_LABEL): Define. * sysdeps/unix/sysv/linux/mips/pread.c: Add support for cancellation handling and handle both __NR_pread64 and __NR_pread. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Add support for cancellation handling and handle both __NR_pwrite64 and __NR_pwrite. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/mips/sysdep.S: Don't set errno in the _LIBC_REENTRANT case, use register names consistently. 2003-01-27 Wolfram Gloger <wg@malloc.de> * malloc/hooks.c (mem2chunk_check): Check alignment of mem pointer, not of the computed chunk. Bug report from Carlos O'Donell <carlos@baldric.uwo.ca>.
2003-01-13Update.Ulrich Drepper
* elf/dl-close.c (_dl_close): Type typo, must be == not = in search for removed searchlist. Reported by Roland McGrath.
2003-01-12Update.Ulrich Drepper
2003-01-11 Jim Meyering <jim@meyering.net> * io/ftw.c [HAVE_CONFIG_H]: Include <config.h>. [HAVE_SYS_PARAM_H || _LIBC]: Guard inclusion of <sys/param.h>. Include <sys/stat.h>, not <include/sys/stat.h>, if !_LIBC. [!_LIBC] (__chdir, __closedir, __fchdir, __getcwd, __opendir): Define. [!_LIBC] (__readdir64, __tdestroy, __tfind, __tsearch): Define. [!_LIBC] (internal_function, dirent64, MAX): Define. (__set_errno): Define if not already defined. (open_dir_stream): When FTW_CHDIR is enabled, invoke opendir on the basename, not the entire file name. (process_entry): When FTW_CHDIR is enabled, invoke XSTAT or LXSTAT on the basename, not the entire file name. 2003-01-12 Ulrich Drepper <drepper@redhat.com> * string/tester.c (test_strcpy): Disable last added strcpy until it is fixed. 2003-01-11 Philip Blundell <philb@gnu.org> * sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support. 2003-01-11 Andreas Schwab <schwab@suse.de> * Makerules: Add vpath for %.dynsym and %.so so that the implicit rule chaining for check-abi works. 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER): Add non-PIC case. 2003-01-11 Jakub Jelinek <jakub@redhat.com> * elf/tls-macros.h [__ia64__] (__TLS_CALL_CLOBBERS): Define. [__ia64__] (TLS_LE, TLS_IE): Fix typos. Add ;; at start of asm if gp is used early. [__ia64__] (TLS_LD, TLS_GD): Likewise. Use __TLS_CALL_CLOBBERS. * elf/Makefile ($(objpfx)tst-tlsmod5.so, $(objpfx)tst-tlsmod6.so): Ensure libc.so in DT_NEEDED. * sysdeps/alpha/dl-machine.h (elf_machine_rela): Move CHECK_STATIC_TLS before l_tls_offset use. * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage) [TLS_DTV_AT_TP]: Allocate TLS_PRE_TCB_SIZE bytes below result. (_dl_deallocate_tls) [TLS_DTV_AT_TP]: Adjust before freeing. * sysdeps/generic/libc-tls.c (__libc_setup_tls): If TLS_INIT_TP_EXPENSIVE is not defined, allocate even if no PT_TLS segment has been found. If TLS_DTV_AT_TP, allocate TLS_PRE_TCB_SIZE bytes below result and add tcb_offset to memsz. * sysdeps/ia64/dl-tls.h (__tls_get_addr): New prototype. * sysdeps/ia64/dl-machine.h: Include tls.h. (elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs too. (elf_machine_rela): Assume if sym_map != NULL sym is non-NULL too. Handle R_IA64_DTPMOD*, R_IA64_DTPREL* and R_IA64_TPREL* relocations. * sysdeps/ia64/libc-tls.c: New file. 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/powerpc64/sysdep.h (PSEUDO_RET): Add branch hit. * sysdeps/unix/sysv/linux/powerpc/bits/stat.h (STAT_VER_LINUX): Fix type. Move definition out of #if. * sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: New file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Add cancellation support. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Remove ftruncate64, pread64, pwrite64, truncate64 entries. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (INLINE_SYSCALL): New version that supports function call like syscalls. Add __builtin_expect. (LOADARGS_n): Add argument size safety checks. (INTERNAL_SYSCALL): New Macro. * sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: New file. * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [__PPC_ELF_H]: Avoid redefinition of elf_fpreg_t and elf_fpregset_t. 2003-01-12 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Add several asserts. Correct and simplify test for unloading. If loader of a DSO is unloaded do not use its scope anymore. Fall back to own scope and adjust opencounts. Fix several comments. * elf/dl-deps.c (_dl_map_object_deps): Always allocate memory for the l_searchlist, not only for l_initfini. * elf/dl-lookup.c (add_dependencies): Avoid creating relocation dependencies if objects cannot be removed. Remove object with the definition as not unloadable if necessary. * elf/reldep6.c: Create relocation dependency before closing the first module. 2003-01-10 Guido Günther <agx@sigxcpu.org> * elf/Makefile: Add rules to build and run reldep9 test. * elf/reldep9.c: New file. * elf/reldep9mod1.c: New file. * elf/reldep9mod2.c: New file. * elf/reldep9mod3.c: New file. 2003-01-09 Jakub Jelinek <jakub@redhat.com> * elf/Makefile: Add rules to build and run nodelete2 test. * elf/nodelete2.c: New file. * elf/nodel2mod1.c: New file. * elf/nodel2mod2.c: New file. * elf/nodel2mod3.c: New file. 2003-01-09 Jakub Jelinek <jakub@redhat.com>
2002-12-30(_dl_close): Handle relocation dependencies among the to-be-deleted objects ↵Ulrich Drepper
right away instead of later separately. The latter fails because the scope data structures of the DSO might already have gone.
2002-12-06Update.Ulrich Drepper
2002-12-06 Ulrich Drepper <drepper@redhat.com> * misc/syslog.c (log_cleanup): New function. (openlog): Use log_cleanup instead of __libc_mutex_unlock. (closelog): Likewise. * elf/dl-close.c: Use __rtld_lock_* macros instead of __libc_lock_*. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-misc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-support.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/bits/libc-lock.h: Define __rtld_lock_* macros. * sysdeps/mach/bits/libc-lock.h: Likewise. * sysdeps/mach/hurd/bits/libc-lock.h: Likewise. * dirent/bug-readdir1.c (main): Don't call closedir, just close
2002-12-04* sysdeps/generic/ldsodefs.h (struct rtld_global): Move all [USE_TLS]Roland McGrath
members to the end, so a libpthread compiled with !USE_TLS will still find other members properly. * sysdeps/i386/i486/bits/string.h (__strcpy_g): Add dummy output operand for DEST memory. Fix dummy input operand to use SRC. Reported by Davin McCall <davmac@ozonline.com.au>. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Account for TCB alignment when initializing the DTV entry. * elf/dl-load.c (_dl_map_object_from_fd): If we hit a TLS segment when TLS has not been set up, try to set it up if we can. * elf/tst-tls4.c: Revert last change. * elf/tst-tls5.c: Likewise. * elf/tst-tls6.c: Likewise. * elf/tst-tls7.c: Likewise. * elf/tst-tls8.c: Likewise. * elf/tst-tls9.c: Likewise. * sysdeps/generic/dl-tls.c [SHARED] (_dl_tls_setup): New function. * sysdeps/generic/ldsodefs.h: Declare it. * elf/Versions (ld: GLIBC_PRIVATE): Add it. * sysdeps/generic/libc-tls.c (init_slotinfo): New static inline function, broken out of __libc_setup_tls. (init_static_tls): Likewise. (__libc_setup_tls): Call them. (_dl_tls_setup): New function, uses new subroutines. * elf/dl-close.c (free_slotinfo): Make argument pointer to pointer. Clear the pointer when returning true. (libc_freeres_fn) [SHARED]: If GL(dl_initial_dtv) is null, free the first element of the slotinfo list too. * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Define only if [SHARED]. * sysdeps/generic/ldsodefs.h (_dl_next_tls_modid): Declare as hidden. (_dl_determine_tlsoffset): Likewise. * elf/rtld.c (_dl_initial_error_catch_tsd): Renamed from startup_error_tsd, made global. (dl_main): Update initialization. * elf/dl-tsd.c: Likewise. * sysdeps/generic/ldsodefs.h: Declare it.
2002-12-03* elf/tst-tls4.c: Define an unused TLS variable here, so that no lazyRoland McGrath
TLS setup is required. * elf/tst-tls5.c: Likewise. * elf/tst-tls6.c: Likewise. * elf/tst-tls7.c: Likewise. * elf/tst-tls8.c: Likewise. * elf/tst-tls9.c: Likewise. * elf/rtld.c (dl_main): Remove [! SHARED] conditional from `if (GL(dl_tls_max_dtv_idx) > 0)' tests for doing TLS setup. * elf/dl-close.c (libc_freeres_fn): Check GL(dl_tls_dtv_slotinfo_list) for being null before calling free_slotinfo. * elf/dl-load.c (_dl_map_object_from_fd) [SHARED]: For PT_TLS in dynamic loading, bail with error if GL(dl_tls_max_dtv_idx) is zero.
2002-11-01* include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):Roland McGrath
New macros. * elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove text_set_element. * elf/dl-libc.c (free_mem): Likewise. * iconv/gconv_conf.c (free_mem): Likewise. * iconv/gconv_db.c (free_mem): Likewise. * iconv/gconv_dl.c (free_mem): Likewise. * iconv/gconv_cache.c (free_mem): Likewise. * intl/finddomain.c (free_mem): Likewise. * intl/dcigettext.c (free_mem): Likewise. * locale/setlocale.c (free_mem): Likewise. * misc/fstab.c (fstab_free): Likewise. * nss/nsswitch.c (free_mem): Likewise. * posix/regcomp.c (free_mem): Likewise. * resolv/gai_misc.c (free_res): Likewise. * stdlib/fmtmsg.c (free_mem): Likewise. * sunrpc/clnt_perr.c (free_mem): Likewise. * sysdeps/generic/setenv.c (free_mem): Likewise. * sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise. * sysdeps/pthread/aio_misc.c (free_res): Likewise. * time/tzset.c (free_mem): Likewise. * malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section. * locale/loadarchive.c (_nl_archive_subfreeres): Likewise. * malloc/set-freeres.c (__libc_freeres): Likewise. * login/getutent.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutent): Allocate buffer the first time it is run. * login/getutid.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutid): Allocate buffer the first time it is run. * login/getutline.c: Include stdlib.h instead of stddef.h. (buffer): Change into pointer to utmp, add libc_freeres_ptr. (__getutline): Allocate buffer the first time it is run. * malloc/mtrace.c (malloc_trace_buffer): Change into char *. (mtrace): Allocate malloc_trace_buffer. * resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf. * resolv/ns_print.c (ns_sprintrrf): Decrease size of t. * string/strerror.c: Include libintl.h and errno.h. (buf): New variable. (strerror): Only allocate buffer if actually needed (unknown error). * time/tzfile.c (transitions): Add libc_freeres_ptr. (freeres): Remove. 2002-10-25 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h (libc_freeres_ptr): New macro. * malloc/set-freeres.c (__libc_freeres_ptrs): Define using symbol_set_define. (__libc_freeres): Free all pointers in that section. * Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed commands when creating .lds script. (LDSEDCMD-c.so): New variable. * inet/rcmd.c (ahostbuf): Change into char *. Add libc_freeres_ptr. (rcmd_af): Use strdup to allocate ahostbuf. * inet/rexec.c (ahostbuf): Change into char *. Add libc_freeres_ptr. (rexec_af): Use strdup to allocate ahostbuf. * stdio-common/reg-printf.c (printf_funcs): Remove. (__printf_arginfo_table): Change into printf_arginfo_function **. Add libc_freeres_ptr. (__register_printf_function): Allocate __printf_arginfo_table and __printf_function_table the first time it is called. * stdio-common/printf-parse.h (__printf_arginfo_table): Change into printf_arginfo_function **. (parse_one_spec): Add __builtin_expect. * grp/fgetgrent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * inet/getnetgrent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * intl/localealias.c (libc_freeres_ptr): Define if !_LIBC. (string_space, map): Add libc_freeres_ptr. (free_mem): Remove. * misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr. (free_mem): Remove. * misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr. (free_mem): Remove. * crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC. (buffer): Add libc_freeres_ptr. (free_mem): Remove for _LIBC. * nss/getXXbyYY.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * nss/getXXent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * pwd/fgetpwent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr. (free_mem): Remove. * shadow/fgetspent.c (buffer): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add libc_freeres_ptr. (free_mem): Remove. * sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add libc_freeres_ptr. (free_mem): Remove. 2002-10-30 Jakub Jelinek <jakub@redhat.com> * malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias instead of duplicating the whole function in libc.
2002-10-22* sysdeps/generic/libc-tls.c (__libc_setup_tls): Initialize the staticRoland McGrath
slotinfo list's len member to the proper size, not just 1. Initialize static_map.l_tls_initimage. * elf/dl-open.c (dl_open_worker): Fix loop searching for dtv_slotinfo_list element containing new modules' l_tls_modid. * elf/tst-tls9.c, elf/tst-tls9-static.c: New files. * elf/tst-tlsmod5.c, elf/tst-tlsmod6.c: New files. * elf/Makefile (tests): Add tst-tls9. (tests-static): Add tst-tls9-static. (tst-tls9-static-ENV): New variable. ($(objpfx)tst-tls9-static, $(objpfx)tst-tls9-static.out): New targets. * elf/dl-close.c (remove_slotinfo): Remove an assert; the number of modids used by partially loaded modules being closed can't be known.
2002-10-182002-10-17 Roland McGrath <roland@redhat.com>Roland McGrath
* elf/dl-close.c (remove_slotinfo): Take new argument. If false, allow IDX to be one past the current last slotinfo entry. (_dl_close): Pass IMAP->l_init_called for that parameter.
2002-10-17* elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.Roland McGrath
* 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.
2002-08-06* sysdeps/posix/system.c (do_system): New function, guts broken out ofRoland McGrath
__libc_system. (__libc_system): Call it, putting just the line == NULL test here. * include/libc-symbols.h (__hidden_proto): Add extern keywords so variables work right. * elf/dl-open.c (dl_open_worker): Use _ macro instead of gettext. * elf/dl-close.c (_dl_close): Likewise. * include/netinet/in.h: Use libc_hidden_proto for bindresvport, in6addr_any, in6addr_loopback. Remove decls for bindresvport_internal, in6addr_any_internal, in6addr_loopback_internal. * sunrpc/svc_udp.c (svcudp_bufcreate): Nix INTUSE for bindresvport. * sunrpc/svc_tcp.c (svctcp_create): Likewise. * sunrpc/clnt_udp.c (clntudp_bufcreate): Likewise. * sunrpc/bindrsvprt.c: Change INTDEF to libc_hidden_def. * inet/in6_addr.c: Change INTVARDEF to libc_hidden_def. * sysdeps/posix/getaddrinfo.c (gaih_inet): Nix INTUSE for in6addr_loopback. * inet/gethstbyad_r.c (PREPROCESS): Nix INTUSE for in6addr_any. * include/netinet/ether.h: Use libc_hidden_proto for ether_ntoa_r, ether_aton_r. * inet/ether_aton_r.c: Add libc_hidden_def. * inet/ether_ntoa_r.c: Likewise. * include/rpc/auth.h: Use libc_hidden_proto for getnetname, netname2user, host2netname. * sunrpc/netname.c: Add libc_hidden_def. * include/netdb.h: Use libc_hidden_proto for innetgr, rcmd_af, rexec_af, rresvport_af, ruserok_af. * inet/rcmd.c: Add libc_hidden_def. * inet/getnetgrent_r.c: Likewise.
2002-08-04Add libc_hidden_def.Ulrich Drepper
2002-02-24Update.Ulrich Drepper
* elf/dl-close.c (free_slotinfo): Check for end of list and return true in this case.
2002-02-16Update.Ulrich Drepper
2002-02-15 Ulrich Drepper <drepper@redhat.com> * elf/dl-open.c (dl_open_worker): Catch wrap-around of TLS generation counter. * elf/dl-close.c (_dl_close): Likewise.
2002-02-14Update.Ulrich Drepper
* elf/dl-close.c (remove_slotinfo): New function. Handles everything for removing reference of module in slotinfo list. (_dl_close): Use remove_slotinfo. * sysdeps/generic/dl-tls.c: General pretty printing. (oom): Define only if SHARED. (_dl_next_tls_modid): Correct starting point for the case we assume there is a gap. Add missing instruction grouping (doh!). Correct tests for reaching maximum index. * elf/Makefile: Add rules to build and run tst-tls7. * elf/tst-tls7.c: New file. * elf/tst-tlsmod3.c: New file. * elf/tst-tlsmod1.c: Move #include "tls-macros.h" instead #ifdef USE_TLS. * elf/tst-tlsmod2.c: Likewise.
2002-02-14Update.Ulrich Drepper
* elf/dl-close.c (_dl_close): When closing an object using TLS either decrement dl_tls_max_dtv_idx or set dl_tls_dtv_gaps to true. Increment dl_tls_generation only if we closed any TLS-using object. * elf/tst-tls6.c: New file. * elf/Makefile: Add rules to build and run tst-tls6.
2002-02-13Update.Ulrich Drepper
* elf/tst-tls1.c: Move #include "tls-macros.h" instead #ifdef USE_TLS. * elf/tst-tls2.c: Likewise. * elf/tst-tls3.c: Likewise. 2002-02-13 Jakub Jelinek <jakub@redhat.com> * elf/dl-close.c (free_slotinfo): Only define if TLS supported. 2002-02-13 Ulrich Drepper <drepper@redhat.com>
2002-02-13Update.Ulrich Drepper
2002-02-13 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Implement freeing entries in the slotinfo array. (free_mem): Free memory for the slotinfo array if possible.
2002-02-01Update.Ulrich Drepper
* sysdeps/generic/ldsodefs.h: Add _dl_load_lock, _dl_lazy, _dl_dynamic_weak, _dl_fpu_control, _dl_cpuclock_offset, and _dl_debug_fd to rtld_global. * elf/Versions: Likewise. * elf/dl-close.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-misc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-support.c: Likewise. * elf/do-lookup.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/ia64/Versions: Likewise. * sysdeps/unix/clock_gettime.c: Likewise. * sysdeps/unix/clock_settime.c: Likewise. * sysdeps/unix/sysv/linux/init-first.c: Likewise. * sysdeps/sparc/Versions: Removed. * sysdeps/i386/i686/Versions : Removed. * sysdeps/x86_64/Versions: Removed. * configure.in: Define HAVE_PROTECTED if .protected is available. * config.h.in: Add entry for HAVE_PROTECTED. 2002-01-31 Jakub Jelinek <jakub@redhat.com. * sysdeps/alpha/dl-machine.h: Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. * sysdeps/arm/dl-machine: Likewise. * sysdeps/generic/dl-origin: Likewise. * sysdeps/generic/dl-sysdep: Likewise. * sysdeps/generic/dl-cache: Likewise. * sysdeps/hppa/dl-fptr: Likewise. * sysdeps/hppa/dl-machine: Likewise. * sysdeps/cris/dl-machine: Likewise. * sysdeps/i386/dl-machine: Likewise. * sysdeps/ia64/dl-machine: Likewise. * sysdeps/m68k/dl-machine: Likewise. * sysdeps/mach/hurd/dl-sysdep: Likewise. * sysdeps/mips/mips64/dl-machine: Likewise. * sysdeps/mips/dl-machine: Likewise. * sysdeps/powerpc/elf/libc-start: Likewise. * sysdeps/powerpc/dl-machine: Likewise. * sysdeps/powerpc/dl-start: Likewise. * sysdeps/sparc/sparc32/dl-machine: Likewise. * sysdeps/sparc/sparc64/dl-machine: Likewise. * sysdeps/sh/dl-machine: Likewise. * sysdeps/s390/s390-32/dl-machine: Likewise. * sysdeps/s390/s390-64/dl-machine: Likewise. * sysdeps/unix/sysv/aix/libc-start: Likewise. * sysdeps/unix/sysv/aix/start-libc: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-static: Likewise. * sysdeps/unix/sysv/linux/m68k/getpagesize: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize: Likewise. * sysdeps/x86_64/dl-machine: Likewise. 2002-01-31 Ulrich Drepper <drepper@redhat.com>
2002-01-31Update.Ulrich Drepper
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.
2001-09-08Update.Ulrich Drepper
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.
2001-09-08Update.Ulrich Drepper
2001-09-08 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): If object has no r_list (i.e., wasn't loaded directly) determine length if l_initfini list by iterating over its elements. Minor optimizations. * elf/dl-deps.c (_dl_map_object_deps): Always add own map to l_initfini for dependency objects. If object was already loaded check whether any of the dependencies is already on the relocation dependency list. If yes, remove the latter. Minor optimizations. * elf/dl-lookup.c (add_dependency): Add check for self reference of maps here. Search l_initfini list only if the object was loaded directly and not only as a dependency. (_dl_lookup_symbol): Add relocation dependency also if object is not in global scope. Remove test for self-reference here. (_dl_lookup_versioned_symbol): Likewise. * elf/dl-object (_dl_new_object): Cleanup. Initialize dont_free element of first name record. * elf/loadtest.c: Add some more test to recognize early if an object wasn't unloaded. * elf/Makefile: Add rules to build and run reldep5. * elf/reldep5.c: New file. * elf/reldepmod5.c: New file. * elf/reldepmod6.c: New file. * elf/reldep2.c: Fix typo. * elf/dl-object.c (_dl_new_object): Initialize l_scope and l_scope_max.
2001-09-07Update.Ulrich Drepper
2001-09-07 Ulrich Drepper <drepper@redhat.com> * include/link.h (struct link_map): Add l_scope_mem and l_scope_max elements. Change l_scope to be a pointer only. * elf/dl-object.c (_dl_new_ojbect): Initialize l_scope and l_scope_max. * elf/dl-open.c (dl_open_worker): If dependency wasn't just opened here add searchlist of newly open file to the dependency's scope. * elf/dl-close.c (_dl_close): If dependency is used otherwise remove only searchlist from its scope. Free own scope array if necessary. * elf/Makefile (tests): Add dblload and dblunload now.