summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
AgeCommit message (Collapse)Author
2005-04-01minor cosmetic cleanupEric Andersen
2005-03-29Moved the addition of load address from the fast pathJoakim Tjernlund
where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86.
2005-03-20Move ldso FINI handling into _dl_fini(). Add #ifndef _DL_DO_FINI_IN_LIBC aroundJoakim Tjernlund
registering _dl_fini with atexit(). This is a preparation to move the FINI handling to libc.
2005-03-17Corrected a typo (exection -> execution).Peter Kjellerstedt
2005-03-17General arch cleanup and prepare support for standaloneJoakim Tjernlund
execution of ldso. Added new asm for MIPS to be tested. All arches should retest.
2005-03-14Fix up x86 so it compiles again.Eric Andersen
2005-03-14Simplify PT_INTERP handling.Joakim Tjernlund
Add prototype for _dl_boot()
2005-03-14Force suid apps to do unlazy binding of the PLT relocs.Joakim Tjernlund
See http://bugs.gentoo.org/show_bug.cgi?id=71609 for more details. Reported by Peter Mazinger.
2005-01-05fix eriks e-mail addressMike Frysinger
2004-11-17Add BIND NOW support to MIPS.Joakim Tjernlund
Mips did not honour the LD_BIND_NOW env. variable or the DT_BIND_NOW flag in the dynamic section.
2004-11-10Add RTLD_LOCAL support for dlopened libs. Reported byJoakim Tjernlund
Andrew de Quincey, who has been most helpful getting this sorted out, thanks. Thanks also to Peter Mazinger who did alot of testing. Removed all traces of dl_parse_copy_information() since it is no longer used.
2004-11-02- Remove dynamic_size from struct elf_resolve.Joakim Tjernlund
- Replace all open coded dynamic handling with a function. Reduces size. - Fold special MIPS dynamic code into the dynamic_info item. - Add RELRO support. - Support linking with "-z now". - prepare for DT_RELACOUNT/DT_RELCOUNT optimization. - Add -z now to ld.so linking, this is what ld.so does anyway so let the linker know that.
2004-10-27Jocke's patch was almost right. Just needed move the DT_MIPS_RLD_MAP testManuel Novoa III
up a bit. Native and remote debugging of shared libs and threaded apps now works on mips.
2004-10-07Remove usage of _dl_parse_copy_information() from generic code.Joakim Tjernlund
Remove definition of _dl_parse_copy_information() for powerpc. Remaining archs can do the same. Make debugging output of "relocation processing: xxx" a bit more sane.
2004-10-06Peter S. Mazinger writes:Joakim Tjernlund
Hello! Here is the modified unsecvars patch that applies to cvs.
2004-10-06Remove unneeded -D<somedefine>, and use instead #ifdef __somedefine__Joakim Tjernlund
From Peter Mazinger.
2004-10-05Peter Kjellerstedt writes:Joakim Tjernlund
After the addition of a configuration option for enabling the support of /etc/ld.so.cache, I thought it might be a good idea to add one for the support of the /etc/ld.so.preload file too. So here it is. While doing this, I also noticed that the dynamic linker would hang indefinitely if either LD_PRELOAD or /etc/ld.so.preload contained a library which was already loaded, so I made a patch for that too. And of course, I could not resist from doing a little clean up of comments and indentation, so here is a patch for that too.
2004-09-08Second attempt to fix the INIT/FINI order. This time I think I got it right :)Joakim Tjernlund
This needs testing with apps that have complex dependencies.
2004-09-03First attempt to fix the INIT/FINI ordering. Fingers crossed :)Joakim Tjernlund
2004-08-31Dont mess with __curbrk in ldsoEric Andersen
2004-08-27#include "dl-startup.c into ldso.c, making ldso one compilation unit.Joakim Tjernlund
Now all functions and vaiables can be made static to reduce relocs. Basicly, all variables should be merged into one struct variable and then export that struct. Exported functions should be exported as functions pointers in the above struct. This will reduce the number of relocs inside ldso to a handful. Add -Bsymbolic to linker for ldso. This will resolve all functions (all JMP_SLOT goes away) and the remaining relocs are transformed into RELATIVE relocs.
2004-08-27As Mike Frysinger notes, this code is still needed. IJoakim Tjernlund
misread this code and removed it, sorry. I printed the values of _dl_brkp and _dl_envp in ldso and got this when executing: ls: __curbrk: 0x300c16e0 __environ: 0x1008372c ldd: __curbrk: 0x300776e0 __environ: 0x3007759c why is__environ in the app when executing ls but not ldd?
2004-08-26Fixup a couple of warningsEric Andersen
2004-08-26Avoid multiple passes to perform mips GOT relocations, and doEric Andersen
the whole lot in a single pass. -Erik
2004-08-26Let ldso find libc's malloc function and set _dl_malloc_function.Joakim Tjernlund
This removes some crap in libdl.c(and future libs which needs to access ldso functions). What do you think?
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