fix regression that made shared libs crash on arm
[musl] / crt / microblaze / crt1.s
1 .weak  _init
2 .weak  _fini
3 .global _start
4 .align  2
5 _start:
6         add     r19, r0, r0             # Zero the frame pointer.
7         ori     r5, r0, main            # Get main() ...
8         lw      r6, r0, r1              # Get argc...
9         addi    r7, r1, 4               # ... and argv ...
10         ori     r8, r0, _init           # and _init() ...
11         ori     r9, r0, _fini           # and _fini() ...
12         add     r10, r0, r0             # ldso_fini == NULL
13         andi    r1, r1, -8              # align stack
14         addik   r1, r1, -4*6            # Leave space for the args.
15         bri     __libc_start_main       # Let's go!
16         nop                             # Never gets here.