summaryrefslogtreecommitdiff
path: root/ldso/ldso
AgeCommit message (Collapse)Author
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-27oopsEric Andersen
2003-06-27whitespace and debug updatesEric 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-06-15Implement syscall() for powerpc. Fixup syscall code soEric Andersen
it compiles properly with gcc 3.3. -Erik
2003-06-12Fix mips so it compiles with gcc 3.3Eric Andersen
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.
2003-03-01Fix the shared library loader so we can properly debug things like pthreads.Eric Andersen
Mips gdb support for pthreads and similar complex stuff is broken, but then it couldn't have worked before either... -Erik
2003-02-26Fixup a really stupid and terribly obvious bug that was causingEric Andersen
the shared lib loader on mips to puke... -Erik
2003-02-26Add a bunch of additional early debugg messages into the sharedEric Andersen
lib loader to make it more obvious what is wrong when things puke early on in the process. -Erik
2003-02-16Fixup powerpc syscalls to eliminate warnings with gcc-3.2, and fixEric Andersen
some other minor warnings.
2003-02-04Patch from Stefan Allius to fix a compiler warningEric Andersen
2003-01-30The original glibc sysdeps/mips/dl-machine.h source from Kazumoto Kojima wasEric Andersen
under the LGPL. I noticed Steven J. Hill has accidentally changed the license to be GPL. Per email with him, change it back to LGPL. Erik Andersen wrote: >I just noticed that uClibc/ldso/ldso/mips/resolve.S is >listed as licensed under the GPL, rather than the LGPL >like the rest of uClibc. Accident? > Yes. Feel free to change it.
2003-01-24Support having libs in /usr/X11R6/lib by default as wellEric Andersen
2003-01-24Ok, people are probably going to hate me for this... This commit changes theEric Andersen
type of 'struct stat' and 'struct stat64' so they use consistant types. This change is the result of a bug I found while trying to use GNU tar. The problem was caused by our using kernel types within struct stat and trying to directly compare these values with standard types. Trying an 'if (a < b)' when 'a' is an 'unsigned long' and 'b' is an 'int' leads to very different results then when comparing entities of the same type (i.e. time_t values).... Grumble. Nasty stuff, but I'm glad I got this out of the way now. As a result of this fix, uClibc 0.9.17 will not be binary compatible with earlier releases. I have always warned people this can and will happen. -Erik
2002-12-12Rework things such that staticly linked applications can useEric Andersen
dlopen and have it be successful. This required moving some things out of ldso.c into readelflib1.c, and directly including hash.c and readelflib1.c into dlib.c when building the static version of the library. -Erik
2002-12-04Looks like this is in fact needed to properly debug dynamicallyEric Andersen
linked stuff, so put it back but add a check for NULL
2002-11-28Kill a bit of unused cruftEric Andersen
2002-11-20Kill SVR4_BUGCOMPATEric Andersen
2002-11-20Patch from Stefan Allius:Eric Andersen
- Invert all FORCE_SHAREABLE_TEXT_SEGMENTS checks. - Define FORCE_SHAREABLE_TEXT_SEGMENTS in the Makefile, so it can be configured by the config system. - linuxelf.h inspects that we don't combine FORCE_SHAREABLE_TEXT_SEGMENTS and SVR4_BUGCOMPAT - Add a new config option for FORCE_SHAREABLE_TEXT_SEGMENTS
2002-11-19Per suggestion from Stefan Allius, change DO_MPROTECT_HACKS toEric Andersen
the more clear FORCE_SHAREABLE_TEXT_SEGMENTS.
2002-11-19Stefan Allius writes:Eric Andersen
I fixed two little bugs in ldso.c: - For LDD support we test the old environment variable LD_TRACE_LOADED_OBJECTS. - Before we init the GOT table of the dynamic loader we have to check, if we have a DT_PLTGOT entry. If DT_PLTGOT was zero we patch somthing in the header of the dynamic loader. This was the cause, why we have to enable the DO_MPROTECT_HACKS option for all targets, to avoid segment faults. In readelflib1.c I added a warning, if we try to load a shared library, which wasn't compiled with -fPIC or -fpic. So if we disable the DO_MPROTECT_HACKS option we are sure, that we don't waste memory by shared libraries which aren't able to share their text segment. I think this is a helpful option on little embedded systems.
2002-11-14Add missing quotesEric Andersen
-Erik
2002-11-12A powerpc patch from Ronald Wahl:Eric Andersen
Ok, now i got it after a day of work. I have had a look into glibc and found the following: sysdeps/powerpc/dl-machine.c: ... case R_PPC_JMP_SLOT: /* It used to be that elf_machine_fixup_plt was used here, but that doesn't work when ld.so relocates itself for the second time. On the bright side, there's no need to worry about thread-safety here. */ { Elf32_Sword delta = finaladdr - (Elf32_Word) reloc_addr; ... The comment made me suspicious. The same position in uClibc looks like this: ldso/ldso/powerpc/elfinterp.c: ... case R_PPC_JMP_SLOT: { unsigned long targ_addr = (unsigned long)_dl_linux_resolve; int delta = targ_addr - (unsigned long)reloc_addr; ... When I change it to the following it works: ... case R_PPC_JMP_SLOT: { unsigned long targ_addr = *reloc_addr; int delta = targ_addr - (unsigned long)reloc_addr; ... I hope it will not break anything. Can anyone review this change and commit it into CVS? thanks, ron
2002-11-08Patch from Stefan Allius for libgcc multilib supportEric Andersen
this is the last patch, we need to make the support of multitarget libgcc complete. --------------------------------- In ldso/ldso/Makefile I added the CPU_LDFLAGS-y to the LDFLAGS --------------------------------- In libc/Makefile I set the LDFLAGS for the script get-needed-objects.sh with CPU_LDFLAGS-y --------------------------------- In extra/scripts/get-needed-object.sh we now use the LIBGCC from Rules.mak and call LD with LDFLAGS (==CPU_LDFLAGS-y). Addtionally I grep the NM output, to fix the unresolved external __GLOBAL_OFFSET_TABLE__ on SuperH targets. ---------------------------------
2002-11-08Fix a silly compile bugEric Andersen
2002-11-08Another SuperH patch from Stefan Allius. This make it soEric Andersen
the SuperH lib loader can be compiled by GCC 3.3
2002-11-06Fix up a compile errorEric Andersen
2002-11-06Cleanup patch from Simon RoweEric Andersen
2002-11-05Massive scrubbing of the shared lib loader error handling.Eric Andersen
Move all configuration options into the new config system. -Erik
2002-11-05Kill legacy DOPIC=true assignmentEric Andersen
2002-11-03Several SH lib loader patches by Stefan Allius <allius@atecom.com>Eric Andersen
and "M. R. Brown" <mrbrown@0xd6.org>
2002-11-03Patch from M. R. Brown <mrbrown@0xd6.org> to get rid ofEric Andersen
"depreciated multi-line string literals" warnings
2002-11-02Fix PIC configuration, so shared libraries once again workEric Andersen
-Erik
2002-10-31Ok, this commit is _huge_ and its gonna change the world. I'veEric Andersen
been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
2002-10-01This commit contains a patch from Stefan Allius <allius@atecom.com> to changeEric Andersen
how uClibc handles _init and _fini, allowing shared lib constructors and destructors to initialize things in the correct sequence. Stefan ported the SH architecture. I then ported x86, arm, and mips. x86 and arm are working fine, but I don't think I quite got things correct for mips.
2002-09-23Removed redundant code. Same thing exist in sys/syscalls.h so include thatTobias Anderberg
instead.
2002-09-19* Changed paramater names to match their register, i.e. __a -> __r10.Tobias Anderberg
* Do not clobber things that are specified as outputs.
2002-09-16Updated for the CRIS port.Tobias Anderberg
2002-09-16Initial version of the dynamic linker code for the CRIS port.Tobias Anderberg
2002-09-12Support LD_DEBUG=allTobias Anderberg
2002-09-12Add missing _dl_dprintf arguments, as noticed by Tero Lyytik�inen ↵Eric Andersen
<tero@paravant.fi>
2002-09-09Fixup multi-line stringEric Andersen
-Erik
2002-09-05Fixed another address alignment where a pagesize of 4k were assumed.Tobias Anderberg
2002-08-24Use bits/kernel_stat.h, not asm/stat.hEric Andersen
-Erik
2002-08-19some updates from Stefan Allius to make up the SuperH shared libEric Andersen
loader build properly. Mostly just sprinkling casts, and making static some things that should be static.
2002-08-12Fix alignment, minor cosmetic changesEric Andersen
-Erik