Browse Source

fix build/segv issues as reported and fixed by Brent Cook

Mike Frysinger 19 years ago
parent
commit
163da2664a
1 changed files with 13 additions and 1 deletions
  1. 13 1
      libc/sysdeps/linux/powerpc/brk.S

+ 13 - 1
libc/sysdeps/linux/powerpc/brk.S

@@ -24,7 +24,19 @@
 #include <sys/syscall.h>
 
 #ifdef __NR_brk
-	.comm	__curbrk,4,4
+
+#ifdef __PIC__
+.section .bss
+	.align 4
+	.globl __curbrk
+__curbrk: .skip 4
+	.type __curbrk,@object
+	.size __curbrk,4
+#else
+.comm __curbrk, 4,4
+#endif
+libc_hidden_data_def(__curbrk)
+
 	.text
 	.globl	brk
 	.type	brk,@function