summaryrefslogtreecommitdiffstats
path: root/ldso
Commit message (Collapse)AuthorAgeFilesLines
...
* Bugfix: Add r_addend to final address. The r_addend is mostly zeroJoakim Tjernlund2004-09-171-8/+6
| | | | | | | but can be nonzero for JMP relocs as well. All Rela arches need to do this, test and send a patch :) Remove unneeded test in R_PPC_COPY.
* Don't allow undefined global symbols to pass(all archs needs fixing,Joakim Tjernlund2004-09-171-10/+16
| | | | | | | | | | | but powerpc). If you are using buildroot and soft floating point, you may have to rebuild the libm.so library, copy it to staging_dir/lib and rebuild your application. Move handling of R_386_COPY back into _dl_do_reloc(all archs should do this). Adjust the first argument to _dl_memcpy as it looks wrong to have symtab[symtab_index].st_value as destination for the mem copy.
* Don't allow undefined global symbols to pass(all archs needs fixing).Joakim Tjernlund2004-09-161-29/+20
| | | | | | | | If you are using buildroot and soft floating point, you may have to rebuild the libm.so library, copy it to staging_dir/lib and rebuild your application. Cleanups as well.
* Second attempt to fix the INIT/FINI order. This time I think I got it right :)Joakim Tjernlund2004-09-084-38/+129
| | | | This needs testing with apps that have complex dependencies.
* We do not use dl_iterate_phdr, so no need to define itEric Andersen2004-09-072-24/+0
|
* Use a more appealing name, matching the function prototypeEric Andersen2004-09-071-6/+6
|
* First attempt to fix the INIT/FINI ordering. Fingers crossed :)Joakim Tjernlund2004-09-034-70/+83
|
* Remove unused variables. From Peter Mazinger.Joakim Tjernlund2004-09-022-3/+0
|
* Dont mess with __curbrk in ldsoEric Andersen2004-08-311-5/+0
|
* #include "dl-startup.c into ldso.c, making ldso one compilation unit.Joakim Tjernlund2004-08-272-2/+3
| | | | | | | | | | | | 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.
* Forgot to commit this file. Patch from Stefan Allius.Joakim Tjernlund2004-08-271-1/+1
|
* As Mike Frysinger notes, this code is still needed. IJoakim Tjernlund2004-08-271-0/+10
| | | | | | | | | | | | | | | 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?
* Partial patch from Alexandre Oliva to update the frv portEric Andersen2004-08-263-423/+501
|
* Only print debug stuff when askedEric Andersen2004-08-261-1/+2
|
* Fixup a couple of warningsEric Andersen2004-08-261-2/+2
|
* Avoid multiple passes to perform mips GOT relocations, and doEric Andersen2004-08-262-47/+53
| | | | | the whole lot in a single pass. -Erik
* Fixes from gentoo.Manuel Novoa III2004-08-261-1/+3
|
* Let ldso find libc's malloc function and set _dl_malloc_function.Joakim Tjernlund2004-08-262-10/+4
| | | | | | This removes some crap in libdl.c(and future libs which needs to access ldso functions). What do you think?
* Added test for RTLD_GLOBAL flag in _dl_find_hash().Joakim Tjernlund2004-08-262-2/+5
| | | | | Fixed a bug in libdl.c where the RTLD_GLOBAL was assigned wronly.
* Relocations of the application's global GOT entries were not being run, andEric Andersen2004-08-263-78/+44
| | | | | | | | 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
* Stefan Allius writes:Joakim Tjernlund2004-08-262-53/+14
| | | | | | | | | | | | "I fixed the _dl_parse_copy_information in the same way than for the powerpc and it works fine for me. You may luck at the patch for the powerpc/elfinterp.c, where I change the paramter of a dl_dprintf statement. Now we use the same parameters than for the relocation copy." Arch mantainers, please do the same. When all arches has been fixed, we can remove of _dl_parse_copy_information, it is just a waste of CPU cycles.
* Joakim Tjernlund writes:Eric Andersen2004-08-251-1/+46
| | | | | | | | | | | | | | Hi Manuel & Erik I think I know why MIPS is broken. _dl_perform_mips_global_got_relocations() is broken. It will due to my latest changes reloctate ldso. This function needs to die and its job should be done inside _dl_parse_relocation_information(). It is mostly a copy and paste job, Also PERFORM_BOOTSTRAP_GOT and PERFORM_BOOTSTRAP_RELOCATION should be fixed, they use symbols which aren't passed as arguments. Jocke
* Patch from Stefan Allius:Joakim Tjernlund2004-08-2513-50/+40
| | | | | Remove unused function parameter in ldso. Remove echo option '-e' since it is not supported on Solaris.
* Hopefully fix Laszlo and Jacobs dlopen problem.Joakim Tjernlund2004-08-252-2/+5
|
* 'pagesize' was local to dl-startup.c. In ldso.c we needEric Andersen2004-08-191-1/+1
| | | | | to use '_dl_pagesize' -Erik
* Fix dependencies.Manuel Novoa III2004-08-191-1/+3
|
* Accunt for ELF_MACHINE_PLTREL_OVERLAP when relocating ldso.Joakim Tjernlund2004-08-191-2/+6
|
* Remove poor man's malloc. Not needed anymore.Joakim Tjernlund2004-08-193-34/+9
|
* Move "debug_addr" ptr from dl-startup.c to ldso.cJoakim Tjernlund2004-08-193-11/+9
|
* Move the app specific stuff from dl-startup.c to ldso.c.Joakim Tjernlund2004-08-193-101/+93
|
* Oops, forgot to remove unused variable.Joakim Tjernlund2004-08-191-2/+1
|
* This is now done in ldso.cJoakim Tjernlund2004-08-191-13/+0
|
* Clean up the _dl_boot code and make it similar to arm and sh.Joakim Tjernlund2004-08-181-26/+18
|
* Carl SHAW writes:Eric Andersen2004-08-171-1/+1
| | | | | | | | | | | | | | | | | I finally tracked down the problem with SH4 shared library loading - in file ldso/ldso/sh/dl-startup.h, the line #define DL_BOOT(X) static void __attribute_used__ _dl_boot2 (X) should be #define DL_BOOT(X) static void* __attribute_used__ _dl_boot2 (X) otherwise the application code will never be called and _dl_boot will just return causing a segmentation fault. Carl
* David McCulloug writes:Joakim Tjernlund2004-08-171-1/+8
| | | | | | | | | | | "There's a bug in the SH asm, it calls into 'C' code without preserving all the important scratch registers. I have been meaning to double check the changes as I think more registers need to be saved, then I was going to send it back to uClibc. From the sound of it this isn't your problem, but you never know. Attached is the patch as it stands for the loader on SH." Glibc appears to do the same.
* Let ldso decide if it should relocate itselft a second time. ThisJoakim Tjernlund2004-08-1715-167/+46
| | | | | | | is needed if ldso should use libcs malloc whenever possible. Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by libdl.
* Fix make clean rule.Joakim Tjernlund2004-08-171-2/+2
|
* The pagesize variable used when starting up is _not_ the sameEric Andersen2004-08-161-4/+4
| | | | | as the _dl_pagesize global, so do not alias the global. -Erik
* Fixup PAGE_SIZE problemsEric Andersen2004-08-132-6/+2
| | | | -Erik
* Fix usage_count in ldso/libdl.Joakim Tjernlund2004-08-133-77/+39
| | | | | | | 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.
* Optimze _dl_memset() for PowerPC.Joakim Tjernlund2004-08-101-0/+28
| | | | | Other arches may also benefit from this iff it can do unaligned stores.
* Forgot _dl_memcpy in previous checkin.Joakim Tjernlund2004-08-101-5/+6
|
* _dl_strlen,_dl_strcat,_dl_strcpy,_dl_strcmp,_dl_strncmp,Joakim Tjernlund2004-08-101-36/+28
| | | | | | _dl_strchr,_dl_strrchr,_dl_strstr,_dl_memcmp: Optimize for archs which can do pre increment/decrement and load/store in one instruction.
* _dl_get_last_path_component:Joakim Tjernlund2004-08-101-31/+19
| | | | | | | | handle "" strings and optimze it. _dl_simple_ltoa,_dl_simple_ltoahex: Optimize for archs which can do pre increment/decrement and load/store in one instruction.
* Revmoved _dl_brkp and _dl_envp. They are not needed anymore.Joakim Tjernlund2004-08-101-14/+0
|
* Mike Frysinger writes:Joakim Tjernlund2004-08-101-0/+1
| | | | | | | | | | | | | | | | i was sticking some libraries in non-standard (i.e. not-hardcoded) paths and then updating ld.so.conf accordingly ... oddly though, i couldnt get binaries that linked against those libraries to run ... `ldconfig -v` showed the required libraries being detected/cached, so something seemed wrong ... turns out the libraries were being tagged as LIB_ELF_LIBC0 in the cache and the loader currently only accepts LIB_ELF_LIBC{5,6} ... since readsoname.c in ldconfig defines needed_tab with the mapping 'libc.so.0' -> LIB_ELF_LIBC0 it seems like the loader should accept this type too find attached a small patch which adds LIB_ELF_LIBC0 along side LIB_ELF_LIBC{5,6} as an accepted lib type in the loader when dealing with the ld.so.cache file
* Mike Frysinger writes:Joakim Tjernlund2004-08-102-16/+14
| | | | | | | | | | | | | | | | | in libdl, the XXFLAGS is set incorrectly if DODEBUG=y ... it has 'I.' added to it instead of '-I.' ... this of course pisses of gcc :) find attached a patch that cleans up the XXFLAGS setting so as to minimize this kind of thing ... when asked, mjn3 said it was a kosher idea ;) and later writes: hmm it seems ldso also utilizes USE_CACHE in the code (but LIBRARY_CACHE never propogates down to the Makefiles) so the fix is to add $(LIBRARY_CACHE) while setting $(XXFLAGS) Applied with minor fixes and also fixed up ldso/Makefile to match libdl/Makefile.
* This should fix the dlsym problem Peter van Hoyweghen reported.Joakim Tjernlund2004-08-093-100/+58
| | | | However RTLD_LOCAL still doesn't work. Everything is RTLD_GLOBAL.
* Joakim Tjernlund writes:Eric Andersen2004-08-063-1/+17
| | | | | PPC32, SPARC32/64 and S390 includes the PLT in its RELA size. This caused ldso to always do unlazy relocation of the JMPRELs. This patch fixes it.
* Joakim Tjernlund writes:Eric Andersen2004-08-061-4/+4
| | | | | | | This patch makes -fpic work for PCC and optimzes the relcation by moving the cache flushing stuff to JMP relocs only. Actually PPCs ldso can only handle small GOT tables(<=8192 entries)anyhow, so it makes little sense to compile PPC with -fPIC. libuClibc shrunk from 340724 to 330780 bytes with -fpic.