summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/powerpc/brk.S
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-20 20:48:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-20 20:48:33 +0000
commit293cef1de02c36f58a48bcdbe2d385059ea04828 (patch)
treeef5b831d01fefbe9d799c5ba7a0d6366106e5e88 /libc/sysdeps/linux/powerpc/brk.S
parent7d81b44aceec2e25cf2872f195adff3613e27fd3 (diff)
downloaduClibc-alpine-293cef1de02c36f58a48bcdbe2d385059ea04828.tar.bz2
uClibc-alpine-293cef1de02c36f58a48bcdbe2d385059ea04828.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/powerpc/brk.S')
-rw-r--r--libc/sysdeps/linux/powerpc/brk.S7
1 files changed, 7 insertions, 0 deletions
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)