mirror of
git://git.musl-libc.org/musl
synced 2024-12-14 02:35:17 +00:00
new dlstart stage-2 chaining for mips
This commit is contained in:
parent
57e2dce7e4
commit
cd7159e7be
@ -29,3 +29,18 @@
|
||||
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
"move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
|
||||
|
||||
#define GETFUNCSYM(fp, sym, got) __asm__ ( \
|
||||
".hidden " #sym "\n" \
|
||||
".set push \n" \
|
||||
".set noreorder \n" \
|
||||
" bal 1f \n" \
|
||||
" nop \n" \
|
||||
" .gpword . \n" \
|
||||
" .gpword " #sym " \n" \
|
||||
"1: lw %0, ($ra) \n" \
|
||||
" subu %0, $ra, %0 \n" \
|
||||
" lw $ra, 4($ra) \n" \
|
||||
" addu %0, %0, $ra \n" \
|
||||
".set pop \n" \
|
||||
: "=r"(*(fp)) : : "memory", "ra" )
|
||||
|
Loading…
Reference in New Issue
Block a user