From 46db40b0da939fb891d2f599e43d68b6ee4a3f8d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 12 Nov 2001 03:06:38 +0000 Subject: powerpc/elfinterp.c: Powerpc works now. Major rework; most relocs should work now. R_PPC_JMP_SLOT correctly being lazily relocated. hash.h: Added a field in elf_resolve to store a ppc-specific address. boot1.c: Added debugging code. Disabled check that fails on powerpc because the string literal requires a reloc that isn't performed. Added check to ignore d_tag if it is out of bounds, as has been observed with powerpc binaries. --- ldso/ldso/powerpc/dl-sysdep.h | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'ldso/ldso/powerpc/dl-sysdep.h') diff --git a/ldso/ldso/powerpc/dl-sysdep.h b/ldso/ldso/powerpc/dl-sysdep.h index 9e532b486..3f4db4682 100644 --- a/ldso/ldso/powerpc/dl-sysdep.h +++ b/ldso/ldso/powerpc/dl-sysdep.h @@ -13,7 +13,7 @@ * the address if the first argument, on other platforms we need to * do something a little more subtle here. */ -#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS) +#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) ARGS)+1) /* * Initialization sequence for a GOT. @@ -93,31 +93,17 @@ PPC_DCBST(REL); PPC_SYNC; PPC_ICBI(REL); \ } -#if 0 - case R_386_32: \ - *REL += SYMBOL; \ - break; \ - case R_386_PC32: \ - *REL += SYMBOL - (unsigned long) REL; \ - break; \ - case R_386_GLOB_DAT: \ - case R_386_JMP_SLOT: \ - *REL = SYMBOL; \ - break; \ - case R_386_RELATIVE: \ - *REL += (unsigned long) LOAD; \ - break; -#endif - /* * Transfer control to the user's application, once the dynamic loader * is done. This routine has to exit the current function, then * call the _dl_elf_main function. */ #define START() \ - __asm__ volatile ("mtlr %0\n\t" \ + __asm__ volatile ( \ + "addi 1,%1,0\n\t" \ + "mtlr %0\n\t" \ "blrl\n\t" \ - : : "r" (_dl_elf_main)) + : : "r" (_dl_elf_main), "r" (args)) -- cgit v1.2.3