mirror of
git://git.musl-libc.org/musl
synced 2024-12-19 05:14:47 +00:00
c9dea48f84
it does not work; after further consideration, a separate Scrt1.s for pie really is essential. it would be nice if the unified approach worked, but the linker fails to generate the correct PLT entries and instead puts textrels in the main program, which don't work because the kernel maps the text read-only. new Scrt1.s will be committed soon in place of this.
20 lines
247 B
ArmAsm
20 lines
247 B
ArmAsm
.weak _init
|
|
.weak _fini
|
|
.text
|
|
.global _start
|
|
_start:
|
|
xorl %ebp,%ebp
|
|
popl %ecx
|
|
movl %esp,%eax
|
|
andl $-16,%esp
|
|
pushl %esp
|
|
pushl %esp
|
|
pushl %edx
|
|
pushl $_fini
|
|
pushl $_init
|
|
pushl %eax
|
|
pushl %ecx
|
|
pushl $main
|
|
call __libc_start_main
|
|
1: jmp 1b
|