summaryrefslogtreecommitdiffstats
path: root/ldso
Commit message (Collapse)AuthorAgeFilesLines
* ldso: support RTLD_NODELETE and DF_1_NODELETETimo Teräs2010-04-223-13/+22
| | | | | | | | | Honor the nodelete flags so we don't delete shared library if it's sticky. This is useful for libpthread if it gets pulled in by a dlopen'ed library. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: proper soname handlingNatanael Copa2010-04-222-4/+4
| | | | | | | | | | | Since sublevel releases are not ABI compatible we need to adjust the soname to include the sublevel version. This makes it possible to install ABI incompatible versions of the library side by side so clean upgrades are possible. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ldso/i386: support protected symbolsJoakim Tjernlund2010-04-161-2/+8
| | | | | | | | Make sure protected symbols are not overridden by other modules. Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-141-0/+8
|\ | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * ldso: Add config option for controlling LD_PRELOADCarmelo AMOROSO2010-04-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | On hardened system it could be useful to disable the use of LD_PRELOAD environment variable for preloading shared objects before the system libraries. So this patch add a config option, LDSO_PRELOAD_ENV_SUPPORT, to control this behaviour. It is enabled by default. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | silence debug warningBernhard Reutner-Fischer2010-04-121-2/+6
| | | | | | | | | | | | variable 'tmp' set but not used Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | whitespace cleanupBernhard Reutner-Fischer2010-04-121-5/+5
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2010-04-126-13/+6
|\| | | | | | | | | | | | | Conflicts: libc/unistd/confstr.c Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * silence warning about undefined preprocessor tokenBernhard Reutner-Fischer2010-04-125-6/+6
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * ldso_sh: Provide only one definition for elf_machine_type_classCarmelo Amoroso2010-04-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't need to provide different definition of elf_machine_type_class macro depending on TLS support. It also fixes build for sh architecture when thread support is off: CC ldso/ldso/ldso.oS In file included from ./ldso/ldso/sh/dl-sysdep.h:9, from ./ldso/include/dl-string.h:11, from ./ldso/include/ldso.h:40, from ldso/ldso/ldso.c:33: ./include/tls.h:6:22: error: tls.h: No such file or directory make: *** [ldso/ldso/ldso.oS] Error 1 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-04-022-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-252-4/+4
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | x86_64: finish up tls reloc support in ldsoAustin Foxley2010-02-192-8/+28
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Add missing libgcc_s.h header.Khem Raj2010-02-171-1/+0
| | | | | | | | | | | | * Do not include tls.h in aeabi_read_tp.S. Its not needed. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | ldso: fix USE_TLS checkAustin Foxley2010-02-111-1/+1
| | | | | | | | | | | | this was causing tls symbols to leak into non-tls builds Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-02-051-0/+5
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * ldso: add missing prototypesBernhard Reutner-Fischer2010-02-051-0/+5
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * mips/ldso: Check for TLS relocation in elf_machine_type_class.Khem Raj2010-01-252-16/+35
| | | | | | | | | | | | | | * Store the symbol adress received from _dl_find_hash and do not recompute it. Signed-off-by: Khem Raj <raj.khem@gmail.com>
| * ldso: tweak shadow warning with preload file supportBernhard Reutner-Fischer2010-01-211-5/+4
| | | | | | | | | | | | The stat buffer is already declared at the top of the function. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS ↵Khem Raj2010-01-141-6/+14
| | | | | | | | | | | | | | | | | | relocations. Make use of macros from sys/asm.h in crt1.S These two changes are needed for mips nptl to boot once again. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | mips/ldso: Check for TLS relocation in elf_machine_type_class.Khem Raj2010-01-252-16/+35
| | | | | | | | | | | | | | * Store the symbol adress received from _dl_find_hash and do not recompute it. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | ldso: tweak shadow warning with preload file supportBernhard Reutner-Fischer2010-01-211-5/+4
| | | | | | | | | | | | | | | | | | The stat buffer is already declared at the top of the function. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 6140a2a7175a796a7c06119f036357db87a1b865) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS ↵Khem Raj2010-01-211-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | relocations. Make use of macros from sys/asm.h in crt1.S These two changes are needed for mips nptl to boot once again. Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-12-231-1/+1
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * Make _dl_dprintf buf non-static to avoid multithreading bugs.Chris Metcalf2009-12-231-1/+1
| | | | | | | | | | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * check if USE_TLS is defined before useHans-Christian Egtvedt2009-12-176-28/+28
| | | | | | | | | | | | | | | | | | | | | | This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
* | check if USE_TLS is defined before useHans-Christian Egtvedt2009-12-176-28/+28
| | | | | | | | | | | | | | | | | | | | | | This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
* | ldso_tls: Refetch dtv from memory if THREAD_DTV has changedCarmelo Amoroso2009-12-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _dl_update_slotinfo might change THREAD_DTV () (if it needs to reallocate it), but the caller (__tls_get_addr) doesn't refetch dtv from memory, it uses its cached copy. This may crash (if dtv[GET_ADDR_MODULE] is off the cliff, or might read uninitialized memory and return it. Typically dtv[GET_ADDR_MODULE].pointer.val is NULL and so __tls_get_addr returns NULL + offset_within_PT_TLS. The next time __tls_get_addr is called for the same library it will return correct address as _dl_update_slotinfo won't need to be called. Signed-off-by: Jakub Jelinek <jakub@redhat.com> Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-11-282-13/+14
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * avoid warning about unused variableBernhard Reutner-Fischer2009-11-251-11/+10
| | | | | | | | | | | | If LDSO_SEARCH_INTERP_PATH is off then ptmp wasn't used. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger2009-11-232-2/+2
| | | | | | | | | | | | | | | | | | Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * ldso: let people disable the implicit path searchMike Frysinger2009-11-221-0/+2
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | ldso: initialize stack_chk_guard after TLS is initializedNatanael Copa2009-11-271-13/+13
|/ | | | | | | | stack_chk_guard is on thread local storage so we need to init TLS before we can init stack_chk_guard. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove superfluous extra semicolonsBernhard Reutner-Fischer2009-11-201-16/+17
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: Add missing newlines to some debug messagesBernhard Reutner-Fischer2009-11-158-14/+14
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: fixup missed variable rename ( tls_tpnt -> tpntp )Austin Foxley2009-10-161-2/+2
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ldso: drop duplicated/unused definesMike Frysinger2009-10-151-23/+0
| | | | | | | We already include bits/fcntl.h for some of these defines, and most of the bits/stat.h defines are unused. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: unify and cleanup _dl_mmap codeMike Frysinger2009-10-151-40/+22
| | | | | | The interface should be straight forward now and the same for everyone. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: define MAP_FAILED for everyoneMike Frysinger2009-10-151-1/+1
| | | | | | This fixes build errors where common code has started using MAP_FAILED. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: simplify handling of extra _dl_lookup_hash() argMike Frysinger2009-10-152-15/+7
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: clean up breakage in tls mergeMike Frysinger2009-10-1514-159/+137
| | | | | | | | | | The TLS merge 534661b91c9849 introduced multiple style problems as well as random breakage: - missing _dl_free - incomplete parametrization of _dl_lookup_hash - restore FDPIC handling in _dl_lookup_hash Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: fixup all the rest of the calls to _dl_find_hashAustin Foxley2009-10-147-13/+13
| | | | | | | | With TLS _dl_find_hash grew an extra param. These archs don't have TLS reloc support yet, but they do need to compile without it. Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* check_ld some more flagsBernhard Reutner-Fischer2009-10-091-1/+1
| | | | | | gold does not currently implement these. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: pull in missing bits/fcntl.h header for O_CLOEXECMike Frysinger2009-10-071-0/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: use O_CLOEXEC for cache fileMike Frysinger2009-10-071-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: use MAP_FAILED with ld.so.cacheMike Frysinger2009-10-071-5/+5
| | | | | | | Rather than use our own custom casted -1 value, just use the MAP_FAILED that common code already sets up for us for mmap(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix coding styleBernhard Reutner-Fischer2009-10-061-25/+16
| | | | | | TODO: use likely/unlikely Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* commentary typo fixBernhard Reutner-Fischer2009-10-061-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* trim whitespaceBernhard Reutner-Fischer2009-10-061-10/+10
| | | | | | and wrap superlong line. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* whitespace cleanupBernhard Reutner-Fischer2009-10-061-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>