about summary refs log tree commit diff
path: root/elf/rtld.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove INTDEF / INTUSE / INTVARDEF (bug 14132).Joseph Myers2014-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completing the removal of the obsolete INTDEF / INTUSE mechanism, this patch removes the final use - that for _dl_starting_up - replacing it by rtld_hidden_def / rtld_hidden_proto. Having removed the last use, the mechanism itself is also removed. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. (This is not much of a test since this variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.) [BZ #14132] * include/libc-symbols.h (INTUSE): Remove macro. (INTDEF): Likewise. (INTVARDEF): Likewise. (_INTVARDEF): Likewise. (INTDEF2): Likewise. (INTVARDEF2): Likewise. * elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use rtld_hidden_def instead of INTVARDEF. * sysdeps/generic/ldsodefs.h [IS_IN_rtld] (_dl_starting_up_internal): Remove declaration. (_dl_starting_up): Use rtld_hidden_proto. * elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove declaration. [!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise. (_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with _dl_starting_up. * elf/dl-writev.h (_dl_writev): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS] (DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of _dl_starting_up_internal.
* Don't use INTDEF/INTUSE with _dl_mcount (bug 14132).Joseph Myers2014-11-051-1/+1
| | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch replaces its use for _dl_mcount with use of rtld_hidden_def / rtld_hidden_proto. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-profile.c (_dl_mcount): Use rtld_hidden_def instead of INTDEF. * sysdeps/generic/ldsodefs.h (_dl_mcount_internal): Remove declaration. (_dl_mcount): Use rtld_hidden_proto. * elf/dl-runtime.c (_dl_profile_fixup): Don't use INTUSE with _dl_mcount. * elf/rtld.c (_rtld_global_ro): Likewise.
* Don't use INTDEF/INTUSE with _dl_argv (bug 14132).Joseph Myers2014-11-041-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch replaces its use for _dl_argv with rtld_hidden_data_def and rtld_hidden_proto. Some places in .S files that previously used _dl_argv_internal or INTUSE(_dl_argv) now use __GI__dl_argv directly (there are plenty of existing examples of such direct use of __GI_*). A single place in rtld.c previously used _dl_argv without INTUSE, apparently accidentally, while the rtld_hidden_proto mechanism avoids such accidential omissions. As a consequence, this patch *does* change the contents of stripped ld.so. However, the installed stripped shared libraries are identical to those you get if instead of this patch you change that single _dl_argv use to use INTUSE, without any other changes. Tested for x86_64 (testsuite as well as comparison of installed stripped shared libraries as described above). [BZ #14132] * sysdeps/generic/ldsodefs.h (_dl_argv): Use rtld_hidden_proto. [IS_IN_rtld] (_dl_argv_internal): Do not declare. (rtld_progname): Make macro definition unconditional. * elf/rtld.c (_dl_argv): Use rtld_hidden_data_def instead of INTDEF. (dlmopen_doit): Do not use INTUSE with _dl_argv. (dl_main): Likewise. * elf/dl-sysdep.c (_dl_sysdep_start): Likewise. * sysdeps/alpha/dl-machine.h (RTLD_START): Use __GI__dl_argv instead of _dl_argv_internal. * sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Use __GI__dl_argv instead of INTUSE(_dl_argv). * sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Use __GI__dl_argv instead of _dl_argv_internal.
* Don't use INTVARDEF/INTUSE with __libc_enable_secure (bug 14132).Joseph Myers2014-10-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTVARDEF / INTUSE mechanism, this patch replaces its use for __libc_enable_secure with the use of rtld_hidden_data_def and rtld_hidden_proto. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def instead of INTVARDEF. (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure. * sysdeps/mach/hurd/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def instead of INTVARDEF. (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure. * elf/dl-deps.c (expand_dst): Likewise. * elf/dl-load.c (_dl_dst_count): Likewise. (_dl_dst_substitute): Likewise. (decompose_rpath): Likewise. (_dl_init_paths): Likewise. (open_path): Likewise. (_dl_map_object): Likewise. * elf/rtld.c (dl_main): Likewise. (process_dl_audit): Likewise. (process_envvars): Likewise. * include/unistd.h [IS_IN_rtld] (__libc_enable_secure_internal): Remove declaration. (__libc_enable_secure): Use rtld_hidden_proto.
* Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAILRichard Henderson2014-07-031-13/+5
|
* Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overheadRichard Henderson2014-07-031-3/+0
| | | | | Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either.
* Remove second argument from TLS_INIT_TP macroAndreas Schwab2014-05-271-2/+2
|
* Remove last use of USE___THREADAndreas Schwab2014-05-141-149/+5
|
* Use __ehdr_start, when available, for rtld to get its own headers.Roland McGrath2014-03-131-4/+19
|
* 2014-03-12 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2014-03-121-2/+3
| | | | | | | | | | | | [BZ #16381] * elf/Makefile (tests): Add tst-pie2. (tests-pie): Add tst-pie2. * elf/tst-pie2.c: New file. * elf/dl-load.c (_dl_map_object_from_fd): Assert correct l_type for ET_EXEC. * elf/rtld.c (map_doit): Load executable as lt_executable. (dl_main): Likewise.
* BZ #16613: Support TLS in audit libraries.Carlos O'Donell2014-02-251-1/+6
| | | | | | | | | | | This commit fixes a bug where the dynamic loader would crash when loading audit libraries, via LD_AUDIT, where those libraries used TLS. The dynamic loader was not considering that the audit libraries would use TLS and failed to bump the TLS generation counter leaving TLS usage inconsistent after loading the audit libraries. https://sourceware.org/ml/libc-alpha/2014-02/msg00569.html
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-20/+20
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Adjust AT_EXECFN when using explicit loader invocation.Paul Pluzhnikov2013-11-181-0/+3
| | | | | | | | 2013-11-18 Paul Pluzhnikov <ppluzhnikov@google.com> * elf/Makefile (tst-auxv): New test. * elf/tst-auxv.c: New * elf/rtld.c (dl_main): Adjust AT_EXECFN
* Remove unused NONTLS_INIT_TP.Ondřej Bílka2013-11-031-4/+0
|
* Print the reason why preloading failed in do_preload()Michael Stahl2013-10-201-2/+2
|
* Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar2013-05-291-8/+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.
* Fix NEED_DL_SYSINFO_DSO conditionals.Roland McGrath2013-03-011-2/+2
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Set up the data structures for vDSO in libc.aH.J. Lu2012-10-051-94/+2
|
* Clean up conditionalize of ld.so.cache support.Roland McGrath2012-10-031-1/+1
|
* Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.hH.J. Lu2012-09-281-9/+0
|
* rtld: limit self loading check to normal mode onlyDmitry V. Levin2012-09-191-1/+2
| | | | | | | | | Commit glibc-2.14~10 disallowed rtld self loading to avoid a segfault that used to happen when rtld was loading itself in normal mode. Unfortunately, that commit disallowed all modes of self loading, including those that used to work before. This change limits the check for self loading to normal mode only, so that instruments like ldd could handle rtld properly.
* Fix lots of bitrot for stub configurations.Roland McGrath2012-07-301-0/+2
|
* Add SystemTap static probes to the runtime linker. [BZ #14298]Gary Benson2012-07-271-0/+3
|
* Fix invalid memory access in do_lookup_x.Andreas Schwab2012-06-221-0/+2
| | | | | | | | [BZ #13579] Do not free l_initfini and allow it to be reused on subsequent dl_open calls for the same library. This fixes the invalid memory access in do_lookup_x when the previously free'd l_initfini was accessed through l_searchlist when a library had been opened for the second time.
* Use _dl_fatal_printf instead of a private variant.Roland McGrath2012-05-141-1/+1
|
* New ld.so argument --inhibit-ldcache to disable ld.so.cache lookupSiddhesh Poyarekar2012-04-111-0/+9
| | | | | | | | | | | 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.
* Fix DL_DEBUG_UNUSED to elide the VDSO and handle PLT references properly.David S. Miller2012-04-051-1/+14
| | | | | | | | | | * elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off lazy binding. * elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore undefined symbol errors. * elf/rtlc.c (dl_main): Skip VDSO when checking for unused DT_NEEDED entries.
* Move stdio-common/_itoa.h to sysdeps/genericH.J. Lu2012-03-201-1/+1
|
* Always set l_used for vDSO.Marek Polacek2012-02-291-1/+4
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Don't call ifunc functions in trace modeAndreas Schwab2011-10-051-5/+7
|
* Also relocate in dependency order when doing symbol dependency testingAndreas Schwab2011-09-141-7/+4
|
* Only use USE___THREAD when definedAndreas Schwab2011-09-131-2/+12
|
* Revert "Remove last use of USE___THREAD"Ulrich Drepper2011-09-121-3/+135
| | | | | | | | This reverts commit de82006d43e198fd162807c9adc720c7ebd728a3. Conflicts: ChangeLog
* Remove last use of USE___THREADAndreas Schwab2011-09-121-135/+3
|
* Simplify malloc initializationUlrich Drepper2011-09-101-0/+1
| | | | | | Singificantly reduce the code needed at malloc initialization. In the process getpagesize is simplified by always initializing GLRO(dl_pagesize).
* Relocate objects in dependency orderAndreas Schwab2011-08-301-8/+4
|
* 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/+14
|
* Handle DSOs without any dependency in ld.soUlrich Drepper2011-05-301-1/+0
|
* One more thinko in CLUlrich Drepper2011-05-301-0/+1
|
* Prevent loader from loading itselfUlrich Drepper2011-05-301-0/+8
|
* Move setting variable in relro data earlier in ld.so.Andreas Schwab2011-02-201-4/+7
|
* Make PowerPC64 default to nonexecutable stackRyan S. Arnold2010-12-191-2/+4
|
* Fix assertion in ld.so, introduced by delayed adding to global list.Ulrich Drepper2010-10-261-1/+1
|
* Fix concurrency problem between dl_open and dl_iterate_phdrAndreas Krebbel2010-10-261-1/+8
|
* Require suid bit on audit objects in privileged programsAndreas Schwab2010-10-241-9/+7
|