summaryrefslogtreecommitdiff
path: root/ldso/ldso/cris
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-17 17:14:06 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-17 17:14:06 +0000
commit2331c7f052ef946d357037e694430a2f473e7af5 (patch)
tree25f311c14b0dfc3d90bfa1cfd0a452f8a7569432 /ldso/ldso/cris
parentfde774dc47375abbad649b5de91b8e96dcc014a8 (diff)
General arch cleanup and prepare support for standalone
execution of ldso. Added new asm for MIPS to be tested. All arches should retest.
Diffstat (limited to 'ldso/ldso/cris')
-rw-r--r--ldso/ldso/cris/dl-startup.h25
-rw-r--r--ldso/ldso/cris/dl-sysdep.h4
2 files changed, 13 insertions, 16 deletions
diff --git a/ldso/ldso/cris/dl-startup.h b/ldso/ldso/cris/dl-startup.h
index cf8fd353a..afc158517 100644
--- a/ldso/ldso/cris/dl-startup.h
+++ b/ldso/ldso/cris/dl-startup.h
@@ -6,22 +6,25 @@
* can find argc, argv and auxvt (Auxillary Vector Table). */
asm("" \
" .text\n" \
-" .globl _dl_boot\n" \
-" .type _dl_boot,@function\n" \
-"_dl_boot:\n" \
+" .globl _start\n" \
+" .type _start,@function\n" \
+"_start:\n" \
" move.d $sp,$r10\n" \
" move.d $pc,$r9\n" \
-" add.d _dl_boot2 - ., $r9\n" \
+" add.d _dl_start - ., $r9\n" \
" jsr $r9\n" \
+" moveq 0,$r8\n" \
+" move $r8,$srp\n" \
+" jump $r10\n" \
+" .size _start,.-_start\n" \
+" .previous\n" \
);
-#define DL_BOOT(X) static void __attribute_used__ _dl_boot2 (X)
-
/* Get a pointer to the argv array. On many platforms this can be just
* 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)
/* Handle relocation of the symbols in the dynamic loader. */
static inline
@@ -54,10 +57,4 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
/* 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 ("moveq 0,$r8\n\t" \
- "move $r8,$srp\n\t" \
- "move.d %1,$sp\n\t" \
- "jump %0\n\t" \
- : : "r" (_dl_elf_main), "r" (args))
-
-
+#define START() return _dl_elf_main
diff --git a/ldso/ldso/cris/dl-sysdep.h b/ldso/ldso/cris/dl-sysdep.h
index 4c2c98a03..4d1ad9656 100644
--- a/ldso/ldso/cris/dl-sysdep.h
+++ b/ldso/ldso/cris/dl-sysdep.h
@@ -105,8 +105,8 @@ elf_machine_load_address(void)
{
Elf32_Addr gotaddr_diff;
- __asm__ ("sub.d [$r0+_dl_parse:GOT16],$r0,%0\n\t"
- "add.d _dl_parse:GOTOFF,%0" : "=r" (gotaddr_diff));
+ __asm__ ("sub.d [$r0+_dl_start:GOT16],$r0,%0\n\t"
+ "add.d _dl_start:GOTOFF,%0" : "=r" (gotaddr_diff));
return gotaddr_diff;
}