summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
AgeCommit message (Collapse)Author
2009-12-17check if USE_TLS is defined before useHans-Christian Egtvedt
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>
2009-12-17check if USE_TLS is defined before useHans-Christian Egtvedt
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>
2009-11-28Merge remote branch 'origin/master' into nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-11-27ldso: initialize stack_chk_guard after TLS is initializedNatanael Copa
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>
2009-11-25avoid warning about unused variableBernhard Reutner-Fischer
If LDSO_SEARCH_INTERP_PATH is off then ptmp wasn't used. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-23nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger
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>
2009-11-22ldso: let people disable the implicit path searchMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-15ldso: clean up breakage in tls mergeMike Frysinger
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>
2009-09-26ldso/: tls support for dynamic linkerAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-07-23ldso: fix building for FDPIC systemsMike Frysinger
The force shareable code missed a spot of using the DL_RELOC_ADDR() indirection thus leading to invalid operands: ldso/ldso/ldso.c: In function '_dl_get_ready_to_run': ldso/ldso/ldso.c:409: error: invalid operands to binary + (have 'Elf32_Addr' and 'struct elf32_fdpic_loadaddr') Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23silence warnings in Blackfin ldso codeMike Frysinger
In file included from ./ldso/include/ldso.h:135, from ldso/ldso/ldso.c:34: ./ldso/ldso/bfin/dl-inlines.h: In function '__dl_init_loadaddr_map': ./ldso/ldso/bfin/dl-inlines.h:43: warning: assignment makes pointer from integer without a cast In file included from ldso/ldso/ldso.c:43: ldso/ldso/bfin/elfinterp.c: In function '_dl_do_lazy_reloc': ldso/ldso/bfin/elfinterp.c:299: warning: assignment makes pointer from integer without a cast ldso/ldso/ldso.c: In function '_dl_get_ready_to_run': ldso/ldso/ldso.c:534: warning: assignment makes integer from pointer without a cast Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-23- fix weak ssp symbol on some arches (Peter S. Mazinger)Bernhard Reutner-Fischer
Work around alleged binutils glitch with weak symbols on some arches. See binutils ML, weak psm and vapier.
2009-01-11replace yet another _dl_malloc + _dl_memset with _dl_zallocDenis Vlasenko
2009-01-10simple optimizations and style fixes in dynamic loadingDenis Vlasenko
text data bss dec hex filename - 16709 240 92 17041 4291 lib/ld-uClibc.so + 16634 236 92 16962 4242 lib/ld-uClibc.so - 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so + 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so - 4602 344 4 4950 1356 lib/libdl.so + 4571 328 4 4903 1327 lib/libdl.so
2008-12-03- use proper macrosBernhard Reutner-Fischer
2008-11-18Move _dl_iterate_phdr into libc.so.0 and libc.a (as glibc does).Carmelo Amoroso
Currently we have an implementation in ld.so and libdl.a. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-30- avoid warning about undefined preprocessor tokenBernhard Reutner-Fischer
2008-09-30- remove shadows declaration of struct st (already declared in function scope)Bernhard Reutner-Fischer
2008-09-29ldso: do not use hard-coded fd in _dl_dprintf. Use dl_debug_file consinstently.Carmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-05-30- fix the macros rather than the callees as rightfully noted by bernds (duh!)Bernhard Reutner-Fischer
2008-05-30- nlist is unsigned. Adjust iterator variables accordingly to avoid ↵Bernhard Reutner-Fischer
signedness warnings.
2008-05-30- Avoid warning about missing brace. No obj-code changes.Bernhard Reutner-Fischer
2008-02-20Fix typos in commentCarmelo Amoroso
2008-02-20Do not call _dl_de ug_state() before recording ld.so. Signed-off-by: Daniel ↵Carmelo Amoroso
Jacobowit <dan@codesourcery.com>
2008-02-08Fix the recent dladdr changes so that they compile on FD-PIC targets.Bernd Schmidt
2008-01-18This patch solves a problem in dladdr caused by the wrong valueCarmelo Amoroso
of elf_resolve's loadaddr field for the main application. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-01-09fix broken whitespace in many places; no functional changesMike Frysinger
2007-12-03Blackfin FD-PIC patches 5/6.Bernd Schmidt
A couple more target macros for ld.so to deal with FD-PIC support. We need special code to compute the initial got and dpnt, and we need to pass extra arguments to _dl_get_ready_to_run.
2007-12-03Blackfin FD-PIC patch 2/6.Bernd Schmidt
Add the necessary changes in ld.so and libdl to deal with targets that prepend an underscore to symbol names.
2007-12-03Blackfin FD-PIC patch 1/6.Bernd Schmidt
Add a new function _dl_free. In _dl_malloc, ensure we always get back a full page from mmap. Reset _dl_malloc_function and _dl_free_function when libdl is initialized.
2007-11-16If uClibc's ld.so encounters text relocations in a shared library - one Carmelo Amoroso
containing an object built without -fpic/-fPIC - then: * If __FORCE_SHAREABLE_TEXT_SEGMENTS__, then it gives an error "Can't modify %s's text section. Use GCC option -fPIC for shared objects, please.\n" and exits. * Otherwise, it makes the library's pages writable and relocates it. If it encounters text relocations in a position-independent executable - one containing an object built without -fpie/-fPIE/-fpic/-fPIC - then: * If __FORCE_SHAREABLE_TEXT_SEGMENTS__, it does nothing about making the pages writable, leading to a crash. * Otherwise, the loop to make the pages writable uses the same variable ppnt as used in an outer loop, messing up that outer loop and also causing a crash. This patch fixes both cases, by giving an error if __FORCE_SHAREABLE_TEXT_SEGMENTS__ and saving and restoring ppnt otherwise. Tested in both cases on ARM EABI. Joseph S. Myers joseph@codesourcery.com
2007-03-31Bernd Schmidt writes:Joakim Tjernlund
Currently a static libdl.a doesn't run all the constructors or destructors of the libraries it loads. I can't see a good reason for that, and it does cause aborts in the destructors it does run for things like libgcc.so on the Blackfin. Fixed with the patch below - untested in mainline, but the equivalent has been in our Blackfin tree for a while now.
2007-02-21make sure we have rtld_hidden_def(_dl_debug_state)Mike Frysinger
2007-02-17Make _dl_malloc alignment arch configurable.Joakim Tjernlund
From Atsushi Nemoto.
2007-01-28fix from Bernd Schmidt to make sure _dl_debug_state isnt optimized away and ↵Mike Frysinger
does not generate relocs
2007-01-28as pointed out by Jocke, use "2" for actual error messages and ↵Mike Frysinger
_dl_debug_file for debug messages
2007-01-26Fix libdl bug reported by Cedric Hombourger inJoakim Tjernlund
http://uclibc.org/lists/uclibc/2007-January/017165.html
2006-09-19merge some more FDPIC related fixes from Bernd SchmidtMike Frysinger
2006-07-05patch from Bernd Schmidt to abstract away initializing of relocation addressesMike Frysinger
2006-07-05patch from Bernd Schmidt to abstract away initializing of prog load addressesMike Frysinger
2006-07-05patch from Bernd Schmidt to abstract away load address typesMike Frysinger
2006-07-05use ElfW(Addr) in more placesMike Frysinger
2006-07-05revert fdpic patch so we can merge it in bit by bitMike Frysinger
2006-06-30Bernd Schmidt writes: abstract away addresses so we can support FDPIC ELFsMike Frysinger
2006-06-19eat extraneous ; and insert some whitespace where it belongsMike Frysinger
2006-03-07Remove additional endif pointed out by vapierPeter S. Mazinger
2006-03-07Add UCLIBC_HAS_SSP_COMPAT option guarding gcc-3.x ssp supportPeter S. Mazinger
2006-03-02make all the warnings the same and add line #s so we can pick em out at runtimeMike Frysinger
2006-02-15Add prototypesPeter S. Mazinger
2006-02-14after much deliberation, may i present Joseph S. Myers patch to add support ↵Mike Frysinger
for .init and .fini array processing for the gory details, see the mailing list: http://www.uclibc.org/lists/uclibc/2006-January/014079.html http://www.uclibc.org/lists/uclibc/2006-February/014285.html