summaryrefslogtreecommitdiffstats
path: root/ldso
Commit message (Collapse)AuthorAgeFilesLines
...
* Phase one of my evil plan to clean up ld.so...Eric Andersen2003-08-1925-437/+928
|
* Only exec child apps if they are elf type ET_EXECEric Andersen2003-07-021-2/+3
|
* oopsEric Andersen2003-06-271-1/+1
|
* Run dlopened ctors and dtors in the correct orderEric Andersen2003-06-272-8/+16
|
* whitespace and debug updatesEric Andersen2003-06-271-42/+46
|
* Be extra careful to memset the correct size, not the size of some randomEric Andersen2003-06-185-43/+37
| | | | | | | 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
* Fix a segfault when used on a library w/o an INTERP program header.Eric Andersen2003-06-161-3/+3
|
* Don't segfault when given things other than a regular file.Eric Andersen2003-06-151-0/+3
| | | | -Erik
* Implement syscall() for powerpc. Fixup syscall code soEric Andersen2003-06-152-16/+18
| | | | | it compiles properly with gcc 3.3. -Erik
* Fix mips so it compiles with gcc 3.3Eric Andersen2003-06-122-60/+60
|
* remove a leftover debug printfEric Andersen2003-03-071-2/+0
|
* Patch from Stefan AlliusEric Andersen2003-03-073-23/+24
| | | | | | | | | | | the ldd.c wasn't compilable for SuperH due to a missing ELFCLASSM define and the readelf executable was linked with a wrong dynamic linker path. To fix this I removed the --uclibc-use-build-dir. The patch also fixed all the compiler warnings (-Wall -W). Erik made a few additional changes to eliminate unused function arguments and fixup a static variable that was was doing the wrong thing
* Fixup ldd handling of multiple filesEric Andersen2003-03-061-12/+36
|
* Patch from Stefan Allius to make ldd.c compile under SolarisEric Andersen2003-03-041-0/+6
|
* Teach ldd to be a bit more helpful by telling you specificallyEric Andersen2003-03-041-5/+29
| | | | | what the problem library is that is linked vs glibc. -Erik
* Teach ldd to act just the glibc provided one (relying on theEric Andersen2003-03-013-37/+106
| | | | | | | 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
* doh. I forgot mips can't talk to globals that early on in theEric Andersen2003-03-011-13/+13
| | | | process. Fix that up too.
* doh. I forgot mips can't talk to globals that early on in theEric Andersen2003-03-012-2/+2
| | | | | process. Fix that up too. -Erik
* Fix the shared library loader so we can properly debug things like pthreads.Eric Andersen2003-03-015-41/+37
| | | | | | Mips gdb support for pthreads and similar complex stuff is broken, but then it couldn't have worked before either... -Erik
* Fix a potential compile errorEric Andersen2003-02-282-0/+4
|
* Fixup a really stupid and terribly obvious bug that was causingEric Andersen2003-02-261-1/+1
| | | | | the shared lib loader on mips to puke... -Erik
* Add a bunch of additional early debugg messages into the sharedEric Andersen2003-02-261-9/+29
| | | | | | lib loader to make it more obvious what is wrong when things puke early on in the process. -Erik
* Fixup powerpc syscalls to eliminate warnings with gcc-3.2, and fixEric Andersen2003-02-163-21/+20
| | | | some other minor warnings.
* Patch from Stefan Allius to fix a compiler warningEric Andersen2003-02-041-1/+3
|
* The original glibc sysdeps/mips/dl-machine.h source from Kazumoto Kojima wasEric Andersen2003-01-301-3/+3
| | | | | | | | | | | | 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.
* Stefan Allius noticed dlib_pic.o was not using XXFLAGS as it shouldEric Andersen2003-01-281-1/+1
|
* Support having libs in /usr/X11R6/lib by default as wellEric Andersen2003-01-242-0/+2
|
* Ok, people are probably going to hate me for this... This commit changes theEric Andersen2003-01-241-0/+1
| | | | | | | | | | | | | | | 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
* If they call dlopen with anything other than RTLD_LAZYEric Andersen2003-01-032-4/+18
| | | | or RTLD_NOW then we need to error out.
* Rework things such that staticly linked applications can useEric Andersen2002-12-128-144/+337
| | | | | | | | 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
* Change some variable names so we are more consistant with whatEric Andersen2002-12-041-5/+5
| | | | | the linux kernel uses. -Erik
* Looks like this is in fact needed to properly debug dynamicallyEric Andersen2002-12-041-0/+8
| | | | linked stuff, so put it back but add a check for NULL
* Make ldd work even more like GNU ldd by appending dummy load addressesDavid Schleef2002-12-011-2/+2
|
* Kill a bit of unused cruftEric Andersen2002-11-281-6/+0
|
* Ok... here's the summary:Manuel Novoa III2002-11-221-1/+1
| | | | | | | | | | | | | | Hopefully locale support will build when cross compiling now. Collation is still not supported, but that's what I'm currently working on. In the next couple of days, I'll probably put up a couple of files for download that will save people the trouble of generating all the glibc locales. Added *wprintf functions, although they currently don't support floating point. That will be fixed when I rewrite _dtostr... or possibly before. Added the wcsto{inttype} functions. Added iconv() and a mini iconv utility. The require locale support and only provide for conversions involving the various unicode encodings { UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built with the locale data, and the internal WCHAR_T.
* Act more like the GNU version. Accept multiple args. Accept/ignoreEric Andersen2002-11-211-30/+62
| | | | | the "--" option since we always do that anyways. -Erik
* Kill SVR4_BUGCOMPATEric Andersen2002-11-204-16/+4
|
* Patch from Stefan Allius:Eric Andersen2002-11-205-10/+17
| | | | | | | | | - 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
* Per suggestion from Stefan Allius, change DO_MPROTECT_HACKS toEric Andersen2002-11-193-6/+6
| | | | the more clear FORCE_SHAREABLE_TEXT_SEGMENTS.
* Stefan Allius writes:Eric Andersen2002-11-193-3/+19
| | | | | | | | | | | | | | | | | | 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.
* For now, revert Ronald Wahl's change to dlopen. We need toEric Andersen2002-11-152-2/+2
| | | | | look into what is breaking dlclose() further... -Erik
* Ronald Wahl writes:Eric Andersen2002-11-152-0/+2
| | | | | | I noticed that dlclose() does not work since libraries loaded with dlopen are not marked as "loaded_file". This breaks apache with dynamic modules. I append a small fix against uClibc-0.9.16.
* Add missing quotesEric Andersen2002-11-142-26/+24
| | | | -Erik
* A powerpc patch from Ronald Wahl:Eric Andersen2002-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Patch from Stefan Allius for libgcc multilib supportEric Andersen2002-11-081-1/+1
| | | | | | | | | | | | | | | | | | 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. ---------------------------------
* Fix a silly compile bugEric Andersen2002-11-081-0/+1
|
* Another SuperH patch from Stefan Allius. This make it soEric Andersen2002-11-083-94/+93
| | | | the SuperH lib loader can be compiled by GCC 3.3
* Fix up a compile errorEric Andersen2002-11-061-1/+6
|
* Cleanup patch from Simon RoweEric Andersen2002-11-061-1/+12
|
* Massive scrubbing of the shared lib loader error handling.Eric Andersen2002-11-0512-265/+222
| | | | | Move all configuration options into the new config system. -Erik