diff options
Diffstat (limited to 'libc/sysdeps/linux/powerpc/crt1.S')
-rw-r--r-- | libc/sysdeps/linux/powerpc/crt1.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/powerpc/crt1.S b/libc/sysdeps/linux/powerpc/crt1.S index 7928a7ed3..8798849b3 100644 --- a/libc/sysdeps/linux/powerpc/crt1.S +++ b/libc/sysdeps/linux/powerpc/crt1.S @@ -58,6 +58,13 @@ _start: mflr r31 # endif #endif + /* Set up the small data pointer in r13. */ +#ifdef __PIC__ + lwz r13,_SDA_BASE_@got(r31) +#else + lis r13,_SDA_BASE_@ha + addi r13,r13,_SDA_BASE_@l +#endif /* Set up an initial stack frame, and clear the LR. */ li r0,0 stwu r1,-16(r1) |