From 2331c7f052ef946d357037e694430a2f473e7af5 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Thu, 17 Mar 2005 17:14:06 +0000 Subject: General arch cleanup and prepare support for standalone execution of ldso. Added new asm for MIPS to be tested. All arches should retest. --- ldso/ldso/powerpc/dl-startup.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'ldso/ldso/powerpc/dl-startup.h') 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 -- cgit v1.2.3