123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- #include <features.h>
- #include <bits/arm_asm.h>
- .text
- .globl _start
- .type _start,%function
- .type _init,%function
- .type _fini,%function
- #ifndef __UCLIBC_CTOR_DTOR__
- .weak _init
- .weak _fini
- #endif
- #if defined(THUMB1_ONLY)
- .thumb_func
- _start:
-
- mov r3, #0
- mov fp, r3
- #ifdef __ARCH_USE_MMU__
-
- pop {a2}
- mov a3, sp
- #else
-
-
- pop {a2}
- ldr a3, [sp]
- #endif
-
- push {a1, a3}
- #ifdef __PIC__
- ldr r4, .L_GOT
- adr r5, .L_GOT
- add r4, r5, r4
- ldr r5, .L_GOT+4
- ldr a1, [r4, r5]
- push {a1}
- ldr r5, .L_GOT+8
- ldr a4, [r4, r5]
-
- ldr r5, .L_GOT+12
- ldr a1, [r4, r5]
- #else
-
- ldr r4, =_fini
-
- push {r4}
-
- ldr a1, =main
- ldr a4, =_init
- #endif
-
-
- bl __uClibc_main
-
- bl abort
- .pool
- #ifdef __PIC__
- .L_GOT:
- .word _GLOBAL_OFFSET_TABLE_-.L_GOT
- .word _fini(GOT)
- .word _init(GOT)
- .word main(GOT)
- #endif
- #else
- _start:
-
- mov fp, #0
- mov lr, #0
- #ifdef __ARCH_USE_MMU__
-
- ldr a2, [sp], #4
- mov a3, sp
- #else
-
-
- ldr a2, [sp], #4
- ldr a3, [sp]
- #endif
-
- str a3, [sp, #-4]!
-
- str a1, [sp, #-4]!
- #ifdef __PIC__
- ldr sl, .L_GOT
- adr a4, .L_GOT
- add sl, sl, a4
- ldr ip, .L_GOT+4
- ldr a1, [sl, ip]
- str a1, [sp, #-4]!
- ldr ip, .L_GOT+8
- ldr a4, [sl, ip]
-
- ldr ip, .L_GOT+12
- ldr a1, [sl, ip]
-
-
- b __uClibc_main(PLT)
- #else
-
- ldr ip, =_fini
-
- str ip, [sp, #-4]!
-
- ldr a1, =main
- ldr a4, =_init
-
-
- b __uClibc_main
- #endif
-
- bl abort
- #ifdef __PIC__
- .L_GOT:
- .word _GLOBAL_OFFSET_TABLE_ - .L_GOT
- .word _fini(GOT)
- .word _init(GOT)
- .word main(GOT)
- #endif
- #endif
- .data
- .globl __data_start
- __data_start:
- .long 0
- .weak data_start
- data_start = __data_start
|