From e26ed573b62f69d9813e72fda4ee3da6eaf4d7b7 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Fri, 5 Jan 2007 10:20:37 +0000 Subject: 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. --- libc/sysdeps/linux/powerpc/brk.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libc/sysdeps/linux/powerpc/brk.S') diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S index 25155ad46..5fe8d4086 100644 --- a/libc/sysdeps/linux/powerpc/brk.S +++ b/libc/sysdeps/linux/powerpc/brk.S @@ -50,8 +50,15 @@ brk: lwz r6,8(r1) #ifdef __PIC__ mflr r4 +# ifdef HAVE_ASM_PPC_REL16 + bcl 20,31,1f +1: mflr r5 + addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha + addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l +# else bl _GLOBAL_OFFSET_TABLE_@local-4 mflr r5 +# endif lwz r5,__curbrk@got(r5) mtlr r4 stw r3,0(r5) -- cgit v1.2.3