ldso: support DT_RELR relative relocation format
[musl.git] / arch / riscv64 / crt_arch.h
blob6b93fcfd1264463e6560a63b40050ffcdbd134e9
1 __asm__(
2 ".section .sdata,\"aw\"\n"
3 ".text\n"
4 ".global " START "\n"
5 ".type " START ",%function\n"
6 START ":\n"
7 ".weak __global_pointer$\n"
8 ".hidden __global_pointer$\n"
9 ".option push\n"
10 ".option norelax\n\t"
11 "lla gp, __global_pointer$\n"
12 ".option pop\n\t"
13 "mv a0, sp\n"
14 ".weak _DYNAMIC\n"
15 ".hidden _DYNAMIC\n\t"
16 "lla a1, _DYNAMIC\n\t"
17 "andi sp, sp, -16\n\t"
18 "tail " START "_c"