Browse Source

Patch from Alan Hourihane <alanh@fairlite.demon.co.uk> for building alpha.

Manuel Novoa III 21 years ago
parent
commit
9d694a44b5
2 changed files with 10 additions and 11 deletions
  1. 8 7
      libc/sysdeps/linux/alpha/brk.S
  2. 2 4
      libc/sysdeps/linux/common/llseek.c

+ 8 - 7
libc/sysdeps/linux/alpha/brk.S

@@ -24,16 +24,17 @@
 #include <features.h>
 #define _ERRNO_H
 #include <bits/errno.h>
+#include <sys/syscall.h>
 
 #ifdef __PIC__
 .section .bss
 	.align 3
-	.globl __curbrk
-__curbrk: .skip 8
-	.type __curbrk,@object
-	.size __curbrk,8
+	.globl ___brk_addr
+___brk_addr: .skip 8
+	.type ___brk_addr,@object
+	.size ___brk_addr,8
 #else
-.comm __curbrk, 8
+.comm ___brk_addr, 8
 #endif
 
 	.text
@@ -70,9 +71,9 @@ __brk:
 	xor	$16, $0, $1
 	bne	$1, $err0
 
-	/* Update __curbrk and return cleanly.  */
+	/* Update ___brk_addr and return cleanly.  */
 	mov	$31, $0
-$ok:	stq	$16, __curbrk
+$ok:	stq	$16, ___brk_addr
 	addq	$30, 8, $30
 	ret
 

+ 2 - 4
libc/sysdeps/linux/common/llseek.c

@@ -49,15 +49,13 @@ loff_t __libc_lseek64(int fd, loff_t offset, int whence)
 	return(loff_t)(INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32), 
 				(off_t) (offset & 0xffffffff), &result, whence) ?: result);
 }
-weak_alias(__libc_lseek64, llseek);
-weak_alias(__libc_lseek64, lseek64);
 #else
 extern __off_t __libc_lseek(int fildes, off_t offset, int whence);
 loff_t __libc_lseek64(int fd, loff_t offset, int whence)
 {
 	return(loff_t)(__libc_lseek(fd, (off_t) (offset & 0xffffffff), whence));
 }
-weak_alias(__libc_lseek, llseek)
-weak_alias(__libc_lseek, lseek64)
 #endif
+weak_alias(__libc_lseek64, llseek);
+weak_alias(__libc_lseek64, lseek64);