summaryrefslogtreecommitdiff
path: root/ldso/ldso/arm/dl-startup.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/arm/dl-startup.h')
-rw-r--r--ldso/ldso/arm/dl-startup.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h
index 43985d002..eb2a9a22a 100644
--- a/ldso/ldso/arm/dl-startup.h
+++ b/ldso/ldso/arm/dl-startup.h
@@ -7,12 +7,14 @@
*/
#include <features.h>
+#include <bits/arm_bx.h>
#if !defined(__thumb__)
__asm__(
" .text\n"
" .globl _start\n"
" .type _start,%function\n"
+ " .hidden _start\n"
"_start:\n"
" @ at start time, all the args are on the stack\n"
" mov r0, sp\n"
@@ -45,11 +47,7 @@ __asm__(
" ldr r0, .L_FINI_PROC\n"
" ldr r0, [sl, r0]\n"
" @ jump to the user_s entry point\n"
-#if defined(__USE_BX__)
- " bx r6\n"
-#else
- " mov pc, r6\n"
-#endif
+ " " __stringify(BX(r6)) "\n"
".L_GET_GOT:\n"
" .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n"
".L_SKIP_ARGS:\n"
@@ -111,11 +109,7 @@ __asm__(
" ldr r0, .L_FINI_PROC\n"
" ldr r0, [r7, r0]\n"
" @ jump to the user_s entry point\n"
-#if defined(__USE_BX__)
- " bx r6\n"
-#else
- " mov pc, r6\n"
-#endif
+ " " __stringify(BX(r6)) "\n"
"\n\n"
".L_GET_GOT:\n"
" .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n"
@@ -131,16 +125,16 @@ __asm__(
/* 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
+ * the address of 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)+1)
/* Handle relocation of the symbols in the dynamic loader. */
-static inline
+static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info)) {
+ switch (ELF_R_TYPE(rpnt->r_info)) {
case R_ARM_NONE:
break;
case R_ARM_ABS32:
@@ -159,7 +153,7 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
#if 0
- // Don't bother with this during ldso initilization...
+ /* Don't bother with this during ldso initilization... */
newvalue = fix_bad_pc24(reloc_addr, symbol_addr)
- (unsigned long)reloc_addr + (addend << 2);
topbits = newvalue & 0xfe000000;