about summary refs log tree commit diff
path: root/elf/dl-load.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove second argument from TLS_INIT_TP macroAndreas Schwab2014-05-271-1/+1
|
* Factor mmap/munmap of PT_LOAD segments out of _dl_map_object_from_fd et al.Roland McGrath2014-04-031-198/+23
|
* 2014-03-27 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2014-03-271-10/+8
| | | | | * elf/dl-load.c: Finish conversion of __builtin_expect into __glibc_{un}likely.
* 2014-03-26 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2014-03-261-40/+36
| | | | * elf/dl-load.c: Convert __builtin_expect into __glibc_{un}likely.
* Fix BZ #16634.Paul Pluzhnikov2014-03-241-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | An application that erroneously tries to repeatedly dlopen("a.out", ...) may hit assertion failure: Inconsistency detected by ld.so: dl-tls.c: 474: _dl_allocate_tls_init: Assertion `listp != ((void *)0)' failed! dlopen() actually fails with "./a.out: cannot dynamically load executable", but it does so after incrementing dl_tls_max_dtv_idx. Once we run out of TLS_SLOTINFO_SURPLUS (62), we exit with above assertion failure. 2014-03-24 Paul Pluzhnikov <ppluzhnikov@google.com> [BZ #16634] * elf/dl-load.c (open_verify): Add mode parameter. Error early when ET_EXEC and mode does not have __RTLD_OPENEXEC. (open_path): Change from boolean 'secure' to complete flag 'mode' (_dl_map_object): Adjust. * elf/Makefile (tests): Add tst-dlopen-aout. * elf/tst-dlopen-aout.c: New test.
* 2014-03-12 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2014-03-121-2/+2
| | | | | | | | | | | | [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.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-25/+25
|
* [BZ #16046] Static dlopen correction fallout fixes.Maciej W. Rozycki2014-01-311-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes to address issues from BZ #15022 resolution, as follows: * TLS updates to csu/libc-tls.c -- we now have a proper main map, so there's no longer a need to create a separate fake one to keep TLS structures, * random updates to elf/dl-close.c -- LM_ID_BASE is now a valid name space ID for static executables as well, so assert that we don't unload the main map. Similarly dl_nns isn't supposed to be 0 for static executables anymore, * actual BZ #16046 fix to elf/dl-iteratephdr.c -- the dl_iterate_phdr special function for static executables isn't needed anymore, provided that l_phdr and l_phnum members of the main map have been properly initialized (done in _dl_non_dynamic_init in elf/dl-support.c now), * ld.so.cache loader update to elf/dl-load.c -- GL(dl_ns)[LM_ID_BASE]._ns_loaded is now always initialized in static executables so can become the fallback loader map to check for DF_1_NODEFLIB, provided that the l_flags_1 member of the main map has been properly initialized (done in elf/dl-support.c now); this also ensures previous semantics elsewhere in elf/dl-load.c, * matching updates to elf/dl-support.c -- to complement the two fixes above.
* Obvious comment typo fix ("openened") in elf/dl-load.c.Brooks Moses2014-01-081-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Return fixed version of breaking of RPATH when $ORIGIN contains colonsOndřej Bílka2013-12-021-10/+16
|
* Revert b75891075bece24be9fd85618f18af4a2daf7f1cOndřej Bílka2013-11-181-16/+10
|
* Fix breaking of RPATH when $ORIGIN contains colons. Fixes bug 10253Ondřej Bílka2013-11-181-10/+16
| | | | | | We first expanded origin and then split string by colons. This misbehaves when $ORIGIN contain colon so we first split string, then expand $ORIGIN.
* Fix typos.Ondřej Bílka2013-08-211-1/+1
|
* Test for mprotect failure in dl-load.c (bug 12492).Pierre Ynard2013-06-281-1/+5
|
* [BZ #15022] Correct global-scope dlopen issues in static executables.Maciej W. Rozycki2013-06-281-7/+1
| | | | | | | | This change creates a link map in static executables to serve as the global search list for dlopen. It fixes a problem with the inability to access the global symbol object and a crash on an attempt to map a DSO into the global scope. Some code that has become dead after the addition of this link map is removed too and test cases are provided.
* Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar2013-05-291-3/+2
| | | | | | | | | 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 invalid free of memory allocated during rtld initAndreas Schwab2013-04-111-0/+6
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Cast to __intptr_t before casting pointer to int64H.J. Lu2012-11-261-1/+2
|
* Invoke DL_AFTER_LOAD if definedChris Metcalf2012-10-301-0/+4
| | | | | | | | | | | This hook is useful for any arch-specific functionality that should be done on loaded objects. For the tile architecture, the hook is already provided (though we switch to using the new macro name with this commit) and implements a simulator notifier so that the simulator can load Elf symbols to match the object and generate better error messages for PC's. Also, remove a spurious definition of DL_UNMAP in dl-runtime.c
* Retry read in ld.so if the entire ELF header is not read inSiddhesh Poyarekar2012-10-201-2/+12
| | | | | | | [BZ #13601] A read operation could return less than requested data for a number of reasons.
* Clean up conditionalize of ld.so.cache support.Roland McGrath2012-10-031-5/+7
|
* Use ElfW(Off) rather than off_t for offsets within ELF files.Roland McGrath2012-10-021-2/+2
|
* Fix dl-load.c for [!_LIBC_REENTRANT] case.Roland McGrath2012-08-151-0/+2
|
* Add SystemTap static probes to the runtime linker. [BZ #14298]Gary Benson2012-07-271-3/+6
|
* New ld.so argument --inhibit-ldcache to disable ld.so.cache lookupSiddhesh Poyarekar2012-04-111-2/+3
| | | | | | | | | | | 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.
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* elf/dl-load.c: Avoid warningMarek Polacek2011-10-071-1/+1
|
* Fix crash during error handlingAndreas Schwab2011-09-081-1/+1
|
* Use O_CLOEXEC when loading objects in ld.soUlrich Drepper2011-09-081-1/+1
|
* Fix memory leak in case of failed dlopenUlrich Drepper2011-09-071-0/+2
|
* Better check for last patchUlrich Drepper2011-08-121-1/+1
| | | | | Don't indicate that dependencies of dynamically loaded objects are also dynamically loaded.
* Better debug information from ld.soUlrich Drepper2011-08-121-3/+5
| | | | Differentiate between loading as a dependency and loading on request.
* Fix up testing for valid $ORIGIN useUlrich Drepper2011-05-111-16/+32
|
* Allow $ORIGIN to reference trusted directoreis in SUID binaries.Ulrich Drepper2011-05-071-31/+93
|
* Don't leave empty element in rpath when skipping an elementAndreas Schwab2011-04-091-6/+18
|
* Fix loading first object along a path when tracing.Ulrich Drepper2011-03-061-1/+3
|
* Fix memory leak in dlopen with RTLD_NOLOAD.Andreas Schwab2011-02-251-0/+2
|
* Make PowerPC64 default to nonexecutable stackRyan S. Arnold2010-12-191-2/+4
|
* Fix concurrency problem between dl_open and dl_iterate_phdrAndreas Krebbel2010-10-261-17/+11
|
* Require suid bit on audit objects in privileged programsAndreas Schwab2010-10-241-9/+11
|
* Don't try to free rpath strings allocated during startupAndreas Schwab2010-09-151-3/+0
|
* Don't deadlock in __dl_iterate_phdr while (un)loading objects.Andreas Schwab2010-05-031-0/+3
|
* Future safety in checking ELF header.Ulrich Drepper2010-03-181-2/+8
| | | | | | | If we should use further fields in the e_ident array in the ELF header of files we want zero to mean the default. Enforce zero for now so that non-optional features indicated by nonzero values are not go unnoticed when using an old dynamic linker.
* Extended ELF ABI version handling only for Linux.Ulrich Drepper2010-03-161-3/+5
| | | | | If the OSABI is generic we should not allow the ABI version to be nonzero. Move all the new functionality into Linux-specific files.
* Implement handling of libc ABI in ELF header.Ulrich Drepper2010-03-151-2/+4
|
* Fix comment.Ulrich Drepper2010-02-241-7/+7
|
* Fix descriptor leak when calling dlopen with RTLD_NOLOADAndreas Schwab2009-10-071-3/+6
|
* * sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Remove inlineUlrich Drepper2009-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from definition. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Don't define label if it is not used. * elf/dl-profile.c (_dl_start_profile): Define real-type variant of gmon_hist_hdr and gmon_hdr structures and use them. * elf/dl-load.c (open_verify): Add temporary variable to avoid warning. * nscd/nscd_helper.c (get_mapping): Avoid casts to avoid warnings. * sunrpc/clnt_raw.c (clntraw_private_s): Use union in definition to avoid cast. * inet/rexec.c (rexec_af): Make sa2 a union to avoid warnings. * inet/rcmd.c (rcmd_af): Make from a union of the various needed types to avoid warnings. (iruserok_af): Use ss_family instead of casts. * gmon/gmon.c (write_hist): Define real-type variant of gmon_hist_hdr structure and use it. (write_gmon): Likewise for gmon_hdr. * sysdeps/unix/sysv/linux/readv.c: Avoid declaration of replacement function if we are not going to define it. * sysdeps/unix/sysv/linux/writev.c: Likewise. * inet/inet6_option.c (optin_alloc): Add temporary variable to avoid warning. * libio/strfile.h (struct _IO_streambuf): Use correct type and name of VTable element. * libio/iovsprintf.c: Avoid casts to avoid warnings. * libio/iovsscanf.c: Likewise. * libio/vasprintf.c: Likewise. * libio/vsnprintf.c: Likewise. * stdio-common/isoc99_vsscanf.c: Likewise. * stdlib/strfmon_l.c: Likewise. * debug/vasprintf_chk.c: Likewise. * debug/vsnprintf_chk.c: Likewise. * debug/vsprintf_chk.c: Likewise.