diff options
Diffstat (limited to 'src/ldso/aarch64/start.s')
-rw-r--r-- | src/ldso/aarch64/start.s | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ldso/aarch64/start.s b/src/ldso/aarch64/start.s new file mode 100644 index 00000000..41d1d1e2 --- /dev/null +++ b/src/ldso/aarch64/start.s @@ -0,0 +1,18 @@ +.global _dlstart +_dlstart: + ldr x0,[sp] + add x1,sp,#8 + bl __dynlink + mov x1,sp + ldr x2,[x1],#8 +1: sub x2,x2,1 + ldr x3,[x1],#8 + cmn x3,#1 + b.eq 1b + add x2,x2,1 + str x3,[x1,#-8]! + str x2,[x1,#-8]! + mov sp,x1 + mov x1,x0 + mov x0,#0 + blr x1 |