add ldd and main program loading support to dynamic linker
[musl] / src / ldso / i386 / start.s
1 .text
2 .global _start
3 _start:
4         xor %ebp,%ebp
5         pop %edi
6         mov %esp,%esi
7         and $-16,%esp
8         push %ebp
9         push %ebp
10         push %esi
11         push %edi
12         call __dynlink
13         mov %esi,%esp
14 1:      dec %edi
15         pop %esi
16         cmp $-1,%esi
17         jz 1b
18         inc %edi
19         push %esi
20         push %edi
21         xor %edx,%edx
22         jmp *%eax