mirror of
git://git.musl-libc.org/musl
synced 2024-12-21 22:30:09 +00:00
63caf1d207
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.
19 lines
343 B
C
19 lines
343 B
C
__asm__(
|
|
".text \n"
|
|
".global " START " \n"
|
|
".align 4 \n"
|
|
START ": \n"
|
|
" l.jal 1f \n"
|
|
" l.ori r3, r1, 0 \n"
|
|
".weak _DYNAMIC \n"
|
|
".hidden _DYNAMIC \n"
|
|
" .word _DYNAMIC-. \n"
|
|
"1: l.lwz r4, 0(r9) \n"
|
|
" l.add r4, r4, r9 \n"
|
|
" l.addi r2, r0, -8 \n"
|
|
" l.and r1, r1, r2 \n"
|
|
" l.addi r1, r1, -16 \n"
|
|
" l.jal " START "_c \n"
|
|
" l.ori r2, r0, 0 \n"
|
|
);
|