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/arm/dl-startup.h | |
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/arm/dl-startup.h')
-rw-r--r-- | ldso/ldso/arm/dl-startup.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h index b9c4ce1bc..cd4a1047b 100644 --- a/ldso/ldso/arm/dl-startup.h +++ b/ldso/ldso/arm/dl-startup.h @@ -4,29 +4,26 @@ * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> */ -void* _dl_boot(void); -/* 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" \ -"_dl_boot:\n" \ -" mov r7, sp\n" \ -" @ldr r0, [sp], #4\n" \ -" mov r0, sp\n" \ -" bl _dl_boot2\n" \ -" mov r6, r0\n" \ -" mov r0, r7\n" \ -" mov pc, r6\n" \ +asm( + " .text\n" + " .globl _start\n" + " .type _start,%function\n" + "_start:\n" + " mov r7, sp\n" + " @ldr r0, [sp], #4\n" + " mov r0, sp\n" + " bl _dl_start\n" + " mov r6, r0\n" + " mov r0, r7\n" + " mov pc, r6\n" + " .size _start,.-_start\n" + " .previous\n" ); -#define DL_BOOT(X) static __attribute_used__ void* _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 @@ -91,5 +88,3 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr, * done. This routine has to exit the current function, then call the * _dl_elf_main function. */ #define START() return _dl_elf_main; - - |