summaryrefslogtreecommitdiffstats
path: root/ldso
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch from Joakim Tjernlund to get rid of an annoying warning.Eric Andersen2004-01-272-2/+2
|
* Joakim Tjernlund writes:Eric Andersen2004-01-241-241/+178
| | | | | | | | | | | | | Hi again I have done some serious clenup of powerpc/elfinterp.c - Make it look more like glibc. - Performance modifictions. - Fixed a few bugs in _dl_do_reloc(). These seem not to have affected anything, but this how glibc do it. Jocke
* As noted by Doru Petrescu, there was a spurious line that was usingEric Andersen2004-01-202-2/+0
| | | | _dl_debug_addr prior to checking if it was NULL.
* Paul Mundt writes:Eric Andersen2004-01-202-2/+6
| | | | | | | | | | | | | | | | | | | | | | | The current behavior of the powerpc boot1_arch.h seems somewhat broken. Currently room is made on the stack pointer for the link register, but the link register is never actually pushed onto it. glibc bears the following comments: /* Call _dl_start with one parameter pointing at argc */ mr r3,r1 /* (we have to frob the stack pointer a bit to allow room for _dl_start to save the link register). */ followed by the -16 add to r1. Despite the fact that r1 is modified, the link register is never actually pushed onto r1, thus the adjustment is completely superfluous. There's two possible fixes for this, either saving the link register in the way that glibc does, or getting rid of the r1 adjustment. As I'm not sure if saving the link register will actually break the _dl_boot2 callin, both options will probably want to be played with. The following bit of inline assembly in the attached patch builds cleanly for me with gcc 3.3 on darwin, but I'm not able to test it any further beyond that.
* Joakim Tjernlund writes:Eric Andersen2004-01-201-5/+3
| | | | | | | | | | | | > Is there anything I can do/provide that would assist in the solving of > this problem on PowerPC? I'm still concerned about my lack of flash space... Try this path. It fixes the recent ldso problems for me on my mpc860 board. You should be able to use ldso without the dcbx patch to the kernel now. Please report back. Jocke
* We need to link with libgcc.a when creating shared libs, in order toManuel Novoa III2004-01-161-1/+1
| | | | | avoid problems 'hidden symbol' problems. Also handle -lfloat for the soft-float arm case.
* Make sure we remove -fomit-frame-pointer from the ldso build. It'sDavid McCullough2004-01-161-0/+3
| | | | | | | inclusion will cause the loader to crash when jumping to the application. The reason is due to the START macro having a "leave" instruction included to fixup the stack before starting the app.
* Some badly behaved arches fail to provide a PAGE_SIZE defineEric Andersen2004-01-061-0/+4
|
* Peter S. Mazinger writes:Eric Andersen2004-01-021-0/+45
| | | | | | | | | | | | | | | | | | | 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
* Use PAGE_SIZE rather than hard coding 4096Eric Andersen2003-12-175-29/+31
|
* Patch from Paul Mundt <lethal@linux-sh.org>:Eric Andersen2003-12-178-0/+1039
| | | | | | | | | | Here's the patch for the ldso bits for sh64. This is still in need of a bunch of debugging, testing, etc. and is really only being submitted for general completeness. This assumes that the previous patches I've submitted have already been applied. I plan on playing with this and buildroot some more later, as I'd definitely like to see buildroot images for sh64.
* Patch from Paul Mundt <lethal@linux-sh.org>:Eric Andersen2003-12-1717-69/+71
| | | | | | | | | | | | | | | | | 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.
* When I switched from using stack allocated space for printf, I missed a caseEric Andersen2003-12-172-6/+10
| | | | | | | | where a sizeof(foo) was changed to the sizeof a pointer. This caused _dl_printf to complain a lot when debug is enabled (which itself revealed a bug since it should have exited on buffer overflow), and let me to find another bug, where memory failures would try to recursively call _dl_printf.... What a mess.
* move _dl_fixup so staticly linked apps using dlopen have aEric Andersen2003-12-053-65/+132
| | | | chance of actually working
* Henrik Grindal Bakken writes:Eric Andersen2003-12-032-4/+20
| | | | | | | | | | | | | | The patch touches a minor (well, not that minor, but perhaps only rarely encountered) bug in the powerpc dynamic linker. The problem is that addi is called in inline assembly, but there is no restriction on the second argument. In powerpc assembler, if the second argument to addi is r0, it is taken as the value 0, not the contents of r0. This happened to me, making the stack pointer 0 on the invocation on the application. The patch is against 0.9.22, but there didn't seem to be any changes to the relevant section in 0.9.23.
* Joakim Tjernlund writes:Eric Andersen2003-12-031-2/+2
| | | | | This is just a wild guess, but you could try this to see if it fixes Richards problem:
* Eliminate some static buffers based on a patch from Tobias AnderbergEric Andersen2003-12-032-12/+60
|
* Only enable debugging when SUPPORT_LD_DEBUG is enabled, not DEBUGGINGEric Andersen2003-11-221-2/+2
|
* Oops. Only enable debug when debugging...Eric Andersen2003-11-221-2/+1
|
* Joakim Tjernlund writes:Eric Andersen2003-11-131-10/+11
| | | | | | | | | | | | | | | | | | | I think I messed up a little in my latest patch to Erik. Can you try this on top of CVS(which I think you have already) Jocke And later writes: Hi Erik I just saw something that might be a problem. The "delta" variable is signed and the "delta" calculations, such as delta = PLT_LONGBRANCH_ENTRY_WORDS*4 - (insn_addr-plt_addr+4), are supposed to be unsigned. Jocke
* It seems that the powerpc ldso doesn't like -O0Eric Andersen2003-11-111-1/+7
|
* Joakim Tjernlund writes:Eric Andersen2003-11-111-7/+9
| | | | | | | | | | | | Comparing glibc with uClibc makes me think that the delta calculations are wrong here. Comparing some more I still think there are a data_words[index] assignments missing. Here is a path that has both the data_words[index] and the above delta calclations. This also fixes a terribly obvious bug, also spotted by Joakim, which Erik introduced when he copied things from the i386 ldso code. With this patch applied, things now seem to be working perfectly!
* Another cleanup patch from Joakim Tjernlund:Eric Andersen2003-11-111-12/+10
| | | | | | | Hi again Back at work. Here is a patch that fixes the 2 errors I found yesterday. I have excluded the "data_words[index]" part for now.
* Sigh. I can't type this morning.Eric Andersen2003-11-082-2/+2
|
* Joakim Tjernlund writes:Eric Andersen2003-11-082-4/+6
| | | | | Oops, found another ppc 8xx bug. 8xx CPUs may need this as well to work:
* Joakim Tjernlund writes:Eric Andersen2003-11-081-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Very interesting. Do you have any suggestions for how > we could fix our powerpc shared library loader Removing those instr. comes with a very big performance penalty. To flush the dcache you will have read up to 8KB dummy data and to invalidate the icache you will have to execute up to 16KB nops. I don't know of any other way from user space. hmm, actually I think it will work reliable to perform a store to the same page(s) as the dcbst/icbi will act on. That way you will make the DTLB Error happen(if any) prior to the dcbst/icbi. The worst thing that can happen then is a regular DTLB Miss and that works for dcbst/icbi. You will have to lookout for if dcbst/icbi crosses a page boundary. Then you will have to perform a store to both pages. Jocke # And again later writes: Hi again I think I know what the problem is. The PPC_DCBST;PPC_SYNC;PPC_ICBI;PPC_ISYNC sequence is executed even if no modification has been done i some cases: _dl_linux_resolver(), the last else has no store for insns[0]. these is a insns[1] = OPCODE_B(delta - 4) that does not have a PPC_DCBST. _dl_do_lazy_reloc(), for R_PPC_NONE there is no store. for R_PPC_JMP_SLOT there is a insns[1] = OPCODE_B(delta)that does not have a PPC_DCBST. _dl_do_reloc(), for R_PPC_COPY there is no store. for R_PPC_JMP_SLOT there is a reloc_addr[1] = OPCODE_B(delta) that does not have a PPC_DCBST. _dl_init_got(), I THINK that the PPC_DCBST(plt); PPC_DCBST(plt+4); PPC_DCBST(plt+8); PPC_SYNC; PPC_ICBI(plt); PPC_ICBI(plt+4); PPC_ICBI(plt+8); PPC_ISYNC; is off a bit. The address range does not match the sum of the plt[] and tramp[] address range. Jocke # And then later added the comment: I think that the tramp[] part should be included in the PPC_DCBST/PPC_ICBI sequence. Then you have to add entries for plt+12 and plt+16. If the tramp[] part should be excluded, then all is well. Jocke
* Begin converting the client utilsEric Andersen2003-11-0610-2247/+2
|
* Revert change 1.26, which breaks everything. :-(Eric Andersen2003-11-061-2/+3
|
* A few debugging cleanupsEric Andersen2003-11-061-6/+14
|
* Fix a misnamed arrayEric Andersen2003-11-051-7/+1
|
* tiny cleanupEric Andersen2003-11-051-3/+2
|
* Rework the powerpc lib loader to better match the other architecturesEric Andersen2003-11-051-331/+328
|
* Fix a buglet that shows up on powerpcEric Andersen2003-11-052-4/+4
|
* Rework the config system. Better utilize the Kconfig languageEric Andersen2003-11-049-58/+32
| | | | | which should simplify enabling arbitrary architectures. -Erik
* Some more soft float fixes... for arm in particular (libfloat).Manuel Novoa III2003-10-311-3/+3
| | | | | | Remove the ADD_LIBGCC_FUNCTIONS option and do things the right way. Either we have a shared libgcc available, or the libgcc routines aren't PIC and don't belong in the shared libc anyway.
* Peter Kjellerstedt writes:Eric Andersen2003-10-184-8/+8
| | | | | | | | | | ln.patch: * Define $(LN) as ln in Rules.mak. * Change all occurrences of ln into $(LN). * Change all constructs like (cd path && ln -sf foo/file file) into $(LN) -sf foo/file path/file. The latter construct is already used in a number of places so it should not be an additional compatibility problem.
* Peter Kjellerstedt writes:Eric Andersen2003-10-185-11/+10
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
* Peter Kjellerstedt writes:Eric Andersen2003-10-182-6/+6
| | | | | | | | | install.patch: * Define $(INSTALL) as install in Rules.mak. * Change all occurrences of install into $(INSTALL). * Change all occurrences of mkdir -p into $(INSTALL) -d. install -d is already used in a number of places so this should not be an additional compatibility problem.
* Doh! I was returning with an incorrect pointer type when dlopeningEric Andersen2003-10-152-14/+14
| | | | | | already loaded libs, which unsurprisingly would cause dlsym() to not work at all... -Erik
* Enable full debug support for ld-uClibc and libdlEric Andersen2003-10-142-0/+18
|
* sigh. the warn funcs seem to be broken. Use local versionsEric Andersen2003-10-131-17/+71
| | | | till I can straighten that out.
* Fix an ldd bug, more ldconfig cleanupEric Andersen2003-10-132-264/+287
|
* Always build and install ldconfigEric Andersen2003-10-125-94/+85
|
* move the test for loading the wrong C library into theEric Andersen2003-10-092-32/+52
| | | | _dl_check_if_named_library_is_loaded function
* When someone would dlopen a shared lib that was already opened,Eric Andersen2003-10-092-24/+28
| | | | | | | | | we would try to re-fixup the lib's relocations with rather horrible results. So fix that by checking the the dlopened lib has already had its init functions called, which will never be the case for newly loaded libs, and skip the rest in that case. also apply a few minor fixups
* Fix a stupid bug causing 'ldd' output to not contain the fullEric Andersen2003-10-041-2/+1
| | | | path to the target library
* Don't forget addend on relocations + minor other fixes.Tobias Anderberg2003-09-301-3/+11
|
* Fix SUPPORT_LD_DEBUG_EARLY on powerpcEric Andersen2003-09-292-2/+2
|
* * Partial re-write to match other archs and remove duplicate code.Tobias Anderberg2003-09-191-229/+226
| | | | * Assign insead of add when doing relocations.
* Corrected LD_BOOT macroTobias Anderberg2003-09-192-2/+2
|