about summary refs log tree commit diff
path: root/sysdeps/generic/ldsodefs.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch 3/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov2013-12-181-0/+5
| | | | | | | | | | | Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
* Patch [1/4] async-signal safe TLS.Paul Pluzhnikov2013-12-181-0/+5
| | | | | | | | | | | | | 2013-12-18 Andrew Hunter <ahh@google.com> * sysdeps/generic/ldsodefs.h (_dl_mask_all_signals): New prototype. (_dl_unmask_signals): Likewise. * sysdeps/mach/hurd/dl-sysdep.h (_dl_mask_all_signals): New stub. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.h (_dl_mask_all_signals): New prototype. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c (_dl_mask_all_signals): New function. (_dl_unmask_signals): Likewise.
* Don't use broken DL_AUTO_FUNCTION_ADDRESS()Guy Martin2013-11-211-2/+3
| | | | | | | | | | | | On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the variable fptr[2] in it's own scope. The content of fptr[] is thus undefined right after the macro exits. Newer gcc's (>= 4.7) reuse the stack space of this variable triggering a segmentation fault in dl-init.c:69. To fix this we rewrite the macros to make the call directly to init and fini without needing to pass back a constructed function pointer.
* Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.Ryan S. Arnold2013-06-281-0/+4
|
* Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar2013-05-291-0/+5
| | | | | | | | | Resolves: #15465 The program name may be unavailable if the user application tampers with argc and argv[]. Some parts of the dynamic linker caters for this while others don't, so this patch consolidates the check and fallback into a single macro and updates all users.
* Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold2013-05-161-0/+1
|
* Declare _dl_skip_args in ldsodefs.h header.Roland McGrath2013-05-071-0/+10
|
* Make _dl_phdr pointer to const.Roland McGrath2013-03-281-1/+1
|
* Consolidate declarations of _dl_phdr, _dl_phnum.Roland McGrath2013-03-281-0/+6
|
* Move _dl_non_dynamic_init, _dl_aux_init declarations.Roland McGrath2013-03-151-0/+7
|
* Fix NEED_DL_SYSINFO_DSO conditionals.Roland McGrath2013-03-011-1/+1
|
* New function _dl_find_dso_for_objectSiddhesh Poyarekar2013-02-181-0/+4
| | | | Consolidate code to search for an address within a DSO.
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.hH.J. Lu2012-09-281-0/+6
|
* Fix lots of bitrot for stub configurations.Roland McGrath2012-07-301-1/+1
|
* Move ldsodefs.h audit definitions to sysdeps directories.Joseph Myers2012-07-251-108/+0
|
* Add <sys/auxv.h> and getauxval.Richard Henderson2012-05-201-0/+3
|
* Hurd: Fix value of __libc_stack_endSamuel Thibault2012-05-101-1/+5
|
* New ld.so argument --inhibit-ldcache to disable ld.so.cache lookupSiddhesh Poyarekar2012-04-111-1/+4
| | | | | | | | | | | It may sometimes be desirable to make the dynamic linker only pick up libraries from the library path and rpath and not look at the ld.so.cache that ldconfig generates. An example of such a use case is the glibc testsuite where the dynamic linker must not be influenced by any external paths or caches. This change adds a new option --inhibit-ldcache that when used, tells the dynamic linker to not use ld.so.cache even if it is available.
* Add forward declaration for La_x32_regs/La_x32_retvalH.J. Lu2012-03-221-0/+2
|
* Add x32 support to dynamic linker auditH.J. Lu2012-03-211-0/+9
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Remove Alpha support from ldsodefs.hUlrich Drepper2012-01-071-10/+0
|
* More IA-64 removalUlrich Drepper2012-01-071-11/+1
|
* Improve printing of lookup scopesUlrich Drepper2011-08-161-1/+1
| | | | | | The scope of a new object should be printed earlier and when the scope of an already loaded object is extended only the changes should be printed.
* Warning patrol.Roland McGrath2011-08-141-1/+1
|
* Implement LD_DEBUG=scopesUlrich Drepper2011-08-131-2/+6
|
* _dl_sort_fini: Remove unused argumentMarek Polacek2011-07-191-3/+3
|
* Fix concurrency problem between dl_open and dl_iterate_phdrAndreas Krebbel2010-10-261-2/+5
|
* Require suid bit on audit objects in privileged programsAndreas Schwab2010-10-241-4/+2
|
* Don't deadlock in __dl_iterate_phdr while (un)loading objects.Andreas Schwab2010-05-031-0/+4
|
* Mark _dl_random attribute_relro in the header file.Richard Henderson2010-03-261-1/+1
| | | | | | | | It's already so marked in dl-sysdep.c. Failure to so mark in the header file leads the compiler to believe that the variable should be addressable via the .sdata section. Signed-off-by: Richard Henderson <rth@twiddle.net>
* ld.so: Adjust the auxv if ld.so is directly invoked.Andreas Krebbel2010-01-151-2/+3
| | | | | | | | If a binary gets invoked by passing it as argument to ld.so the stack still holds the auxiliary vector of ld.so when entering the _start routine of the executable. So the invocation via ld.so is not fully transparent to the executable. This causes problems if the executable wants to scan the auxv itself.
* Handle unloading of DSO with a unique symbol definition.Ulrich Drepper2009-07-231-1/+1
|
* Remove warning and little optimization.Ulrich Drepper2009-07-161-0/+4
| | | | | The prototype for _dl_higher_prime_number was missing. While at it, the function is now marked with internal_function.
* Implement STB_GNU_UNIQUE handling.Ulrich Drepper2009-07-091-0/+15
| | | | | | | | | Some symbols have to be identified process-wide by their name. This is particularly important for some C++ features (e.g., class local static data and static variables in inline functions). This cannot completely be implemented with ELF functionality so far. The STB_GNU_UNIQUE binding helps by ensuring the dynamic linker will always use the same definition for all symbols with the same name and this binding.
* * elf/dl-open.c: Keep track of used name spaces and only iterate over cvs/fedora-glibc-20090401T0935Ulrich Drepper2009-04-011-0/+2
| | | | | | | | | | | | | | those which are used. * elf/dl-addr.c: Likewise. * elf/dl-caller.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise.
* * elf/dl-load.c: Remove support for systems without MAP_ANON.Ulrich Drepper2009-03-311-5/+0
| | | | | | | * elf/dl-minimal.c: Likewise. * elf/dl-misc.c: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise.
* [BZ #9733]Ulrich Drepper2009-03-161-2/+2
| | | | | | | | | | | * elf/dl-load.c (_dl_map_object_from_fd): Only call audit hooks if we are not loading a new audit library. * elf/dl-reloc (_dl_relocate_object): Third parameter is now a bitmask. Only use profiling trampoline for auditing if we are not relocating an audit library. * elf/dl-open.c (dl_open_worker): Adjust _dl_relocate_object call. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Adjust _dl_relocate_object prototype.
* * sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): TakeUlrich Drepper2009-01-111-1/+4
| | | | | | | | | | | | | | | | | | | one parameter. If non-NULL use it to initialize return value. (_dl_setup_pointer_guard): New function. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/generic/ldsodefs.h: Declare _dl_random. * elf/rtld.c (security_init): Pass _dl_random to _dl_setup_stack_chk_guard. Call _dl_setup_pointer_guard to initialize pointer_chk_guard. * elf/dl-sysdep.c (_dl_random): New variable. (_dl_sysdep_start): Handle AT_RANDOM. (_dl_show_auxv): Likewise. * elf/dl-support.c (_dl_random): New variable. (_dl_aux_init): Handle AT_RANDOM. * csu/libc-start.c [!SHARED] (libc_start_main): Pass _dl_random to _dl_setup_stack_chk_guard. * elf/elf.h (AT_RANDOM): Define AT_BASE_PLATFORM and AT_RANDOM.
* * sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Undo allUlrich Drepper2008-08-141-5/+0
| | | | | | | | | | change related to AT_EXECFN. We cannot use that string. * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove _dl_execfn member. * elf/dl-support.c: Remove _dl_execfn variable. (_dl_aux_init): Remove handling of AT_EXECFN. * elf/dl-sysdep.c (_dl_sysdep_start): Remove handling of AT_EXECFN. * elf/rtld.c (process_envvars): Remove use of __ASSUME_AT_EXECFN.
* * elf/elf.h: Define AT_EXECFN.Ulrich Drepper2008-07-241-0/+6
| | | | | | | | | | | | | | | | * elf/rtld.c [!__ASSUME_AT_EXECFN] (process_envvars): Don't handle LD_ORIGIN_PATH. * elf/dl-sysdep.c (_dl_sysdep_start): Handle AT_EXECFN. * elf/dl-support.c: Define _dl_execfn. Don't define _dl_origin_path if __ASSUME_AT_EXECFN is defined. (_dl_aux_init): Handle AT_EXECFN. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_AT_EXECFN for 2.6.27 and up. * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_execfn. Don't define _dl_origin_path if __ASSUME_AT_EXECFN is defined. * sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Use _dl_execfn if available and avoid compatibility code if __ASSUME_AT_EXECFN is defined.
* [BZ #5786]Ulrich Drepper2008-03-081-0/+3
| | | | | | | | | | | | | * elf/dl-sysdep.c: Undefine ROUND after use. * sysdeps/generic/ldsodefs.h [HAVE_DL_DISCOVER_OSVERSION] (struct rtld_global_ro): Add _dl_tls_get_addr_soft element. * elf/rtld.c (rtld_global_ro): Initialize _dl_discover_osversion. * sysdeps/unix/sysv/linux/dl-osinfo.h: Move _dl_discover_osversion to ... * sysdeps/unix/sysv/linux/dl-sysdep.c: ...here. * sysdeps/unix/sysv/linux/dl-sysdep.h: Declare _dl_discover_osversion if necessary. * sysdeps/unix/sysv/linux/sysconf.c: Handle _SC_ARG_MAX here.
* * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): AddUlrich Drepper2008-03-081-2/+3
| | | | | | | | | | | _dl_tls_get_addr_soft element. * elf/rtld.c (rtld_global_ro): Initialize _dl_tls_get_addr_soft. * elf/Versions (ld): Don't export _dl_tls_get_addr_soft. * dlfcn/dlinfo.c (dlinfo_doit): Access dl_tls_get_addr_soft through GLRO. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise. * elf/dl-tls.c (_dl_tls_get_addr_soft): Use attribute_hidden instead of internal_function.
* * sysdeps/generic/ldsodefs.h (struct dl_scope_free_list): Store cvs/fedora-glibc-20070929T1859Ulrich Drepper2007-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | void * pointers instead of struct link_map **. (_dl_scope_free): Change argument type to void *. * include/link.h (struct link_map): Change type of l_reldeps to struct link_map_reldeps, move l_reldepsact into that struct too. * elf/dl-deps.c: Include atomic.h. (_dl_map_object_deps): Only change l->l_initfini when it is fully populated, use _dl_scope_free for freeing it. Optimize removal of libs from reldeps by using l_reserved flag, when some removal is needed, allocate a new list instead of reallocating and free the old with _dl_scope_free. Adjust for l_reldeps and l_reldepsact changes. * elf/dl-lookup.c (add_dependency): Likewise. Reorganize to allow searching in l_initfini and l_reldeps without holding dl_load_lock. * elf/dl-fini.c (_dl_sort_fini): Adjust for l_reldeps and l_reldepsact changes. * elf/dl-close.c (_dl_close_worker): Likewise. * elf/dl-open.c (_dl_scope_free): Change argument type to void *.
* * sysdeps/generic/ldsodefs.h (DL_LOOKUP_GSCOPE_LOCK): New definition.Ulrich Drepper2007-09-181-1/+3
| | | | | | | | | | | | | | | * elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Or in DL_LOOKUP_GSCOPE_LOCK into flags after THREAD_GSCOPE_SET_FLAG (). * elf/dl-sym.c (do_sym): Likewise. * include/link.h (struct link_map): Add l_serial field. * elf/dl-object.c (_dl_new_object): Initialize l_serial. * elf/dl-lookup.c (add_dependency): Add flags argument. Remember map->l_serial, if DL_LOOKUP_GSCOPE_LOCK is among flags, use THREAD_GSCOPE_RESET_FLAG before and THREAD_GSCOPE_SET_FLAG after __rtld_lock_lock_recursive (GL(dl_load_lock)) to avoid deadlock. Don't dereference map until it has been found on some list. If map->l_serial changed, return -1.
* * elf/dl-close.c (free_mem): Free _dl_scope_free_list.Ulrich Drepper2007-06-201-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-13 Jakub Jelinek <jakub@redhat.com> * 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-06-19 Ulrich Drepper <drepper@redhat.com>
* * sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elementsUlrich Drepper2007-06-191-11/+13
| | | | | | | | | | | | | | | | | | | | | to fill in holes (rtld_global_ro): Likewise. 2007-06-18 Jakub Jelinek <jakub@redhat.com> * elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous. Move PT_LOAD checking to... (_dl_addr_inside_object): ... here, new function. * elf/dl-sym.c (do_sym): If not l_contiguous, call _dl_addr_inside_object. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise. * dlfcn/dlinfo.c (dlinfo_doit): Likewise. * elf/dl-open.c (dl_open_worker): Likewise. (_dl_addr_inside_object): New function if IS_IN_rtld. * elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no holes are present or are PROT_NONE protected. * include/link.h (struct link_map): Add l_contiguous field. * sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
* * elf/dl-close.c (_dl_close_worker): When removing object fromUlrich Drepper2007-05-191-0/+2
| | | | | | | | | | | | 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.
* * sysdeps/generic/ldsodefs.h: Define DL_LOOKUP_SCOPE_LOCK.Ulrich Drepper2007-01-151-3/+5
| | | | | | | | | | | | | * elf/dl-lookup.c (add_dependency): If scope map is locked, unlock it before getting dl_load_lock and then relock. (_dl_lookup_symbol_x): Pass flags to add_dependency. When rerunning _dl_lookup_symbol_x, compute symbol_scope again in case we unlocked the scope. * elf/dl-runtime.c (_dl_fixup): Pass DL_LOOKUP_SCOPE_LOCK to _dl_lookup_symbol_x in case we locked the scope. (_dl_profile_fixup): Likewise. * elf/dl-sym.c (do_sym): In flags passed to call_dl_lookup, also set DL_LOOKUP_SCOPE_LOCK.