diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-03-17 17:14:06 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-03-17 17:14:06 +0000 |
commit | 2331c7f052ef946d357037e694430a2f473e7af5 (patch) | |
tree | 25f311c14b0dfc3d90bfa1cfd0a452f8a7569432 /ldso/ldso/powerpc | |
parent | fde774dc47375abbad649b5de91b8e96dcc014a8 (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/powerpc')
-rw-r--r-- | ldso/ldso/powerpc/dl-startup.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h index 37d3cf0fd..8f67c3610 100644 --- a/ldso/ldso/powerpc/dl-startup.h +++ b/ldso/ldso/powerpc/dl-startup.h @@ -1,29 +1,26 @@ /* Any assmbly language/system dependent hacks needed to setup boot1.c so it * will work as expected and cope with whatever platform specific wierdness is - * needed for this architecture. */ + * needed for this architecture. + * Copyright (C) 2005 by Joakim Tjernlund + */ -/* Overrive the default _dl_boot function, and replace it with a bit of asm. - * Then call the real _dl_boot function, which is now named _dl_boot2. */ asm( " .text\n" - " .globl _dl_boot\n" - " .type _dl_boot,@function\n" - "_dl_boot:\n" - " mr 3,1\n" /* Pass SP to _dl_boot2 in r3 */ - " addi 1,1,-16\n" /* Make room on stack for _dl_boot2 to store LR */ + " .globl _start\n" + " .type _start,@function\n" + "_start:\n" + " mr 3,1\n" /* Pass SP to _dl_start in r3 */ + " addi 1,1,-16\n" /* Make room on stack for _dl_start to store LR */ " li 4,0\n" " stw 4,0(1)\n" /* Clear Stack frame */ - " bl _dl_boot2@local\n" /* Perform relocation */ + " bl _dl_start@local\n" /* Perform relocation */ " addi 1,1,16\n" /* Restore SP */ " mtctr 3\n" /* Load applications entry point */ " bctr\n" /* Jump to entry point */ - " .size _dl_boot,.-_dl_boot\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 |