diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-01-05 10:20:37 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-01-05 10:20:37 +0000 |
commit | e26ed573b62f69d9813e72fda4ee3da6eaf4d7b7 (patch) | |
tree | b089faf7543e285fe7076a6f28f77c32140c9687 /libc/sysdeps/linux/powerpc/crt1.S | |
parent | 3a3af36f1bef68c9942e9ef3fb83cc15aeabfcc0 (diff) |
Support SecurePLTs for PowerPC. You need a toolchain that supports
config option --enable-secureplt. The assembler must also
supports R_PPC_REL16* relocations. gcc 4.1.1 and binutils 2.17
is known to do this.
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 47419bb52..7928a7ed3 100644 --- a/libc/sysdeps/linux/powerpc/crt1.S +++ b/libc/sysdeps/linux/powerpc/crt1.S @@ -48,8 +48,15 @@ _start: mr r9,r1 /* Save the stack pointer and pass it to __uClibc_main */ clrrwi r1,r1,4 /* Align stack ptr to 16 bytes */ #ifdef __PIC__ +# ifdef HAVE_ASM_PPC_REL16 + bcl 20,31,1f +1: mflr r31 + addis r31,r31,_GLOBAL_OFFSET_TABLE_-1b@ha + addi r31,r31,_GLOBAL_OFFSET_TABLE_-1b@l +# else bl _GLOBAL_OFFSET_TABLE_-4@local mflr r31 +# endif #endif /* Set up an initial stack frame, and clear the LR. */ li r0,0 |