summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
AgeCommit message (Collapse)Author
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
2006-01-29change variable names so we dont shadow othersMike Frysinger
2006-01-27Some warnings go awayPeter S. Mazinger
2006-01-26Get rid of missing prototype warningsPeter S. Mazinger
2006-01-24- use keywords __asm__ and __inline__ c99.Bernhard Reutner-Fischer
2006-01-19would help if i used the right variable name ...Mike Frysinger
2006-01-19Frank Mehnert writes:Mike Frysinger
in ldso/ldso.c, function _dl_get_ready_to_run, the variable app_tpnt_tmp is not initialized. The function _dl_parse_dynamic_info() initializes some of their members but not all. For example, if the binary does _not_ contain a DT_TEXTREL record, it is possible that the condition if (app_tpnt->dynamic_info[DT_TEXTREL]) is nevertheless true and we therefore enter the following code path (ldso.c:270). My suggestion is to add _dl_memset(&app_tpnt_rel, 0, sizeof(app_tpnt_rel)); just behind the variable declarations of _dl_get_ready_to_run().
2005-12-27nlist should be unsigned, not signed, as it tracks # of elements in ↵Mike Frysinger
init_fini_list
2005-12-14fix signed/unsigned warnings and unused warningsMike Frysinger
2005-11-21Do not create any files (dl-progname.h) in ldso anymorePeter S. Mazinger
2005-11-02Move __SSP__ check to headerPeter S. Mazinger
2005-11-01Add check, so we are sure that the file is correctly built, if the system is ↵Peter S. Mazinger
ssp enabled
2005-10-29Hopefully fix the bug Oleg reported in ↵Joakim Tjernlund
http://uclibc.org/lists/uclibc/2005-October/012809.html This will only fix powerpc. Should be easy to fix the other arches.