summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
AgeCommit message (Collapse)Author
2004-08-26Relocations of the application's global GOT entries were not being run, andEric Andersen
only the global GOT entry relocations for the loaded shared libs were being handled. This made applications segfault when using un-fixedup symbols. After many hours debugging to track down the problem, this patch makes the mips port happy again. -Erik
2004-08-25Patch from Stefan Allius:Joakim Tjernlund
Remove unused function parameter in ldso. Remove echo option '-e' since it is not supported on Solaris.
2004-08-25Hopefully fix Laszlo and Jacobs dlopen problem.Joakim Tjernlund
2004-08-19'pagesize' was local to dl-startup.c. In ldso.c we needEric Andersen
to use '_dl_pagesize' -Erik
2004-08-19Remove poor man's malloc. Not needed anymore.Joakim Tjernlund
2004-08-19Move "debug_addr" ptr from dl-startup.c to ldso.cJoakim Tjernlund
2004-08-19Move the app specific stuff from dl-startup.c to ldso.c.Joakim Tjernlund
2004-08-17Let ldso decide if it should relocate itselft a second time. ThisJoakim Tjernlund
is needed if ldso should use libcs malloc whenever possible. Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by libdl.
2004-08-13Fix usage_count in ldso/libdl.Joakim Tjernlund
Don't' use atexit in libdl. Make destrutor in libdl actually run and to dlclose all dlopened libs. Remove dlclosed libs from the _dl_symbol_tables list.
2004-08-10Revmoved _dl_brkp and _dl_envp. They are not needed anymore.Joakim Tjernlund
2004-08-09This should fix the dlsym problem Peter van Hoyweghen reported.Joakim Tjernlund
However RTLD_LOCAL still doesn't work. Everything is RTLD_GLOBAL.
2004-07-30s/___brk_addr/__curbrk/gEric Andersen
Some utilities, such as valgrind, have a legitimate reason to know the address of the current brk. Since we know such utils will peek under our skirt, we might as well give them what they expect and not use a gratuitously different symbol name. -Erik
2004-07-30Teach libdl to use normal libc symbols whenever possible, i.e. mallocEric Andersen
rather than _dl_malloc, fprintf rather than _dl_printf, etc. -Erik
2004-07-14Sigh. I got things working this morning, then checked stuff in from the wrongEric Andersen
tree. Bad boy, No doughnut. -Erik
2004-07-14Based on a patch from Alexandre Oliva, make sure _dl_malloc returns a nicelyEric Andersen
aligned pointer that may be aligned up to page_size. Also add _dl_free,
2004-05-12Add a local '_dl_errno' to be used by syscalls in ldso, allowingEric Andersen
useful syscall failure diagnostics.
2004-05-11As noticed by the sharp eyed Joakim Tjernlund, I stupidlyEric Andersen
hard coded 4096 instead of PAGE_SIZE. Because I'm an idiot.
2004-05-11make certain that getpagesize() returns correct the value for mipsEric Andersen
by extracting the value from the ELF header.
2004-02-20___brk_addr and __environ are not functions. Finding the brokenEric Andersen
lookup on 'atexit' got me excited and I started fixing the same problem elsewhere. Except these were correct as-was, and were not a problem....
2004-02-20When doing symbol lookups on functionsEric Andersen
2004-02-14Joakim Tjernlund writes:Eric Andersen
Hi it is me again. This is the latest ldso patch. the NEW weak symbol handling works now with a little special handling in _dl_find_hash(). You get to chose if you want the new or old handling :) There was 2 missing _dl_check_if_named_library_is_loaded() calls in _dlopen(). I then disabled the _dl_check_if_named_library_is_loaded() in dl-elf.c since it is rendundant. Question, why does some _dl_linux_resolver(), like i386, have 2 calls to _dl_find_hash()? I think that is wrong, isn't it? I really hope you can check this out soon ...
2004-02-10Eliminate the PIE support option, and simply support that all the timeEric Andersen
2004-02-10Rework file naming, aiming for at least a vague level of consistancyEric Andersen
2004-02-10Fixup the definition of _dl_open, and move some bits back where they were,Eric Andersen
till I properly finish the next step in my evil plan.
2004-02-08Move _dl_printf and _dl_malloc to ldso, which is a more sensibleEric Andersen
location for this stuff
2004-02-08Cleanup whitespace and formattingEric Andersen
2004-02-08Add some permissions when creating the logfileEric Andersen
2004-02-07Remove unneeded forward declarationEric Andersen
2004-02-07Split off the stuff that cannot use function into its own file,Eric Andersen
to make it easier to treat it specially while not bothering the rest of the code with the same constraints.
2004-02-07Step one, begin shuffling things around a bitEric Andersen
2004-02-07Yet more consistancy fixupsEric Andersen
2004-02-07Use unsigned char * pointersEric Andersen
2004-02-01Jakub Bogusz writes:Eric Andersen
Hello, the attached patch fixes ldso compilation on sparc-linux (at least with sparc32 userland). It was made against uClibc 0.9.21, but it's still OK with 0.9.26. There were three problems: - missing __NR_getpid definition - conflicting prototypes in elfinterp.c - syntax error (missing semicolon) in ldso.c With this patch shared libraries and ldso can be built on sparc. It contains also ldso.c syntax fix for m68k - there was the same mistake two lines earlier; but I didn't test build on m68k.
2004-01-29Scrub up use of ELF_USES_RELOCA and eliminte some unsightly ifdefsEric Andersen
2004-01-29Eliminate separate passes for _dl_copy_fixups() and _dl_fixup(), andEric Andersen
do both operations in a single pass.
2004-01-02Peter S. Mazinger writes:Eric Andersen
Hello Erik! I have made some cosmetical changes to the files, removed the added SCRT=-fPIC option from building the crt0.S file (but it is a requirement to build them with -fPIC), and changed some comments. I have left the ldso.c patch with PIE_SUPPORT ifdefs, but consider applying it w/o them (see some earlier comment from PaX Team on this issue, as it is considered a bug). To have it work correctly, you'll also need removing COMPLETELY_PIC. One thing is missing: PIE_SUPPORT should be usable only for i386 (for now). Also added the support for propolice protection (that works for me and catches memcpy/strcpy attacks (but needs a special gcc version). Thanks, Peter
2003-12-17Use PAGE_SIZE rather than hard coding 4096Eric Andersen
2003-12-17Patch from Paul Mundt <lethal@linux-sh.org>:Eric Andersen
For sh64 we need implicit access to the symtab, primarily to get at the ->st_other value. This presently isn't possible, as PERFORM_BOOTSTRAP_RELOC() is invoked as such: PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr); while we can easily get the symtab_index value from rpnt->r_info, this still doesn't buy us easy access to the actual table. As such, I've modified PERFORM_BOOTSTRAP_RELOC() to take an additional SYMTAB argument. Most architectures aren't going to care about this, but unfortunately we don't have any other options for sh64. The following patch fixes up the API for what we need for sh64, and updates the other architectures appropriately.
2003-12-05move _dl_fixup so staticly linked apps using dlopen have aEric Andersen
chance of actually working
2003-10-04Fix a stupid bug causing 'ldd' output to not contain the fullEric Andersen
path to the target library
2003-09-19Re-add cris to "define list" when fixing auxvt.Tobias Anderberg
2003-09-02delete some garbage, cleanup duplicate handlingEric Andersen
2003-08-31Weed out duplicates before trying to load libraries.... DelayedEric Andersen
checking for duplicates and returning an alias if an existing lib is already loaded is still correct for the dlopen case.
2003-08-22Remove some mips specific hacks that are no longer needed, and actively breakEric Andersen
things, now that I have cleaned up the code to be a bit less horribly messy. With this, the shared lib loader works on mips once again. -Erik
2003-08-19Cool. Found most of the problem. Turns out we were inadvertanly loading someEric Andersen
libraries multiple times, wasting memory and causing different libraries to use different symbol sets, some of which were not properly resolved. Continue scrubbing ld.so and converting it to use proper types.
2003-08-19Phase one of my evil plan to clean up ld.so...Eric Andersen
2003-06-18Be extra careful to memset the correct size, not the size of some randomEric Andersen
pointer. Fix printing of '0x0x' in ldd output. Simplify discrimination of libname, so doing things like dlopen("./libfoo.so",RTLD_NOW) with a leading "./" in the path will work as expected. -Erik
2003-03-04Teach ldd to be a bit more helpful by telling you specificallyEric Andersen
what the problem library is that is linked vs glibc. -Erik
2003-03-01Teach ldd to act just the glibc provided one (relying on theEric Andersen
shared lib loader to do the work) when it is possible to do so, and only go poking about through the ELF headers when that fails so we can still use 'ldd' on cross compiled stuff. -Erik
2003-03-01doh. I forgot mips can't talk to globals that early on in theEric Andersen
process. Fix that up too.