replace __wake function with macro that performs direct syscall
[musl] / crt / powerpc / crt1.s
1         .weak  _init
2         .weak  _fini
3         .global _start
4         .type   _start, %function
5 _start:
6         mr      9, 1                  # Save the original stack pointer.
7         clrrwi  1, 1, 4               # Align the stack to 16 bytes.
8         lis     13, _SDA_BASE_@ha      # r13 points to the small data area.
9         addi    13, 13, _SDA_BASE_@l  
10         li      0, 0                   # Zero the frame pointer.
11         stwu    1, -16(1)             # The initial stack frame.
12         mtlr    0                      # Clear the link register.
13         stw     0, 0(1)               # And save it.
14         lis     3, main@ha             # Get main() ...
15         addi    3, 3, main@l
16         lwz     4, 0(9)               # and argc...
17         addi    5, 9, 4               # and argv ...
18         lis     6, _init@ha            # and _init() ...
19         addi    6, 6, _init@l
20         lis     7, _fini@ha            # and _fini() ...
21         addi    7, 7, _fini@l
22         li      8, 0                   # ldso_fini == NULL
23         bl       __libc_start_main      # Let's go!
24         b       .                       # Never gets here.
25         .end    _start
26         .size   _start, .-_start