musl/arch/arm/crt_arch.h
Rich Felker 63caf1d207 add .text section directive to all crt_arch.h files missing it
i386 and x86_64 versions already had the .text directive; other archs
did not. normally, top-level (file scope) __asm__ starts in the .text
section anyway, but problems were reported with some versions of
clang, and it seems preferable to set it explicitly anyway, at least
for the sake of consistency between archs.
2015-05-22 01:50:05 -04:00

19 lines
324 B
C

__asm__(
".text \n"
".global " START " \n"
".type " START ",%function \n"
START ": \n"
" mov fp, #0 \n"
" mov lr, #0 \n"
" ldr a2, 1f \n"
" add a2, pc, a2 \n"
" mov a1, sp \n"
"2: and ip, a1, #-16 \n"
" mov sp, ip \n"
" bl " START "_c \n"
".weak _DYNAMIC \n"
".hidden _DYNAMIC \n"
".align 2 \n"
"1: .word _DYNAMIC-2b \n"
);