summaryrefslogtreecommitdiff
path: root/ldso/ldso/powerpc/dl-sysdep.h
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2001-11-12 03:06:38 +0000
committerDavid Schleef <ds@schleef.org>2001-11-12 03:06:38 +0000
commit46db40b0da939fb891d2f599e43d68b6ee4a3f8d (patch)
tree253b23838cb6142a83af0b57d1ac75d79e46c686 /ldso/ldso/powerpc/dl-sysdep.h
parentd94663ec0e6009bc9b541e064c5bae1d5b788a98 (diff)
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.
Diffstat (limited to 'ldso/ldso/powerpc/dl-sysdep.h')
-rw-r--r--ldso/ldso/powerpc/dl-sysdep.h24
1 files changed, 5 insertions, 19 deletions
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))