summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
AgeCommit message (Collapse)Author
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.
2005-10-27Moved guard_setup to dl-osinfo.h (used commonly by ldso and libc). Renamed ↵Peter S. Mazinger
to _dl_setup_stack_chk_guard, as in glibc. SSP requires now binutils-2.16.1 and newer. Add NOT_IN_libc/IS_IN_libc. Began using -DSHARED in uClibc_main.c, there are more candidates in there. Move back dl_protect_relro to it's earlier place.
2005-10-03Move _dl_protect_relro after INIT to allow using attribute_relro within ↵Peter S. Mazinger
uClibc_init
2005-09-08punt _DL_FINI_CRT_COMPAT option now that 0.9.28 has been releasedMike Frysinger
2005-09-08Fix by Martin Schlemmer:Mike Frysinger
If _DL_FINI_CRT_COMPAT is defined, _dl_fini is setup to run at exit via atexit(), but this makes it run _before_ the fini (__app_fini()) of the app, causing stuff like sandbox that frees structs, etc via its fini to segfault. http://bugs.gentoo.org/98187
2005-08-12Remove hardcoded ld-uClibc.so.0 name in ldso.Joakim Tjernlund
2005-07-12use wrapper debug macros to improve readabilityMike Frysinger
2005-07-07rip out all the duplicated debug code and move into a shared fileMike Frysinger
2005-07-04use the a_val member instead of a_ptr/a_fcn since newer elf defines dropped ↵Mike Frysinger
the other values
2005-06-30change all Elf32_* usage to ElfW(*) usage since we shouldnt care about the ↵Mike Frysinger
bitsize
2005-06-30Quick and dirty hack to prevent ld.so from beeing loaded twice.Joakim Tjernlund
Bug exposed by the new __libc_stack_end feature in libc.so.
2005-06-30err revert %p->%x change since _dl_printf() is not fprintf()Mike Frysinger
2005-06-30use %p instead of %x to show addresses so we dont have to worry about the ↵Mike Frysinger
sizeof pointers
2005-06-25use _dl_debug_file instead of hardcode 2Mike Frysinger
2005-05-28Add Peter Mazinger fini/crt compat patch. Select DL_FINI_CRT_COMPAT toJoakim Tjernlund
be able to run apps built with 0.9.27. This also renames __uClibc_start_main to __uClibc_main. This compat option should be removed some time after 0.9.28 is released. Let me know if you don't like this change.