From: Roland McGrath Date: Sun, 2 Jun 1996 18:48:36 +0000 (+0000) Subject: Wed May 29 00:57:37 1996 David Mosberger-Tang X-Git-Tag: upstream/2.30~10627^2~3815 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d663482017d73707e4f9181a1dad1557b596e2a4;p=external%2Fglibc.git Wed May 29 00:57:37 1996 David Mosberger-Tang * sysdeps/unix/bsd/osf/alpha/brk.S, sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire break value, not just the low 32 bits to accomodate large memories. Tue May 28 10:46:04 1996 Richard Henderson * sysdeps/unix/sysv/linux/alpha/brk.S: Rather than attempt to dynamically resolve _end for initializing __curbrk, support the brk(0) query idiom. --- diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 4582539..1c4a4f9 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -23,17 +23,7 @@ break value (instead of the new, requested one). */ #include #include -#ifndef HAVE_GNU_LD -#define _end end -#endif - - .extern _end,8 - - .data - - .globl __curbrk -__curbrk: - .quad _end +.comm __curbrk, 8 .text LEAF(__brk, 0) @@ -42,11 +32,15 @@ LEAF(__brk, 0) ldi v0, __NR_brk call_pal PAL_callsys + + /* Correctly handle the brk(0) query case. */ + cmoveq a0, v0, a0 + subq a0, v0, t0 bne t0, error /* Update __curbrk and return cleanly. */ - stl a0, __curbrk + stq a0, __curbrk mov zero, v0 ret @@ -54,6 +48,6 @@ LEAF(__brk, 0) error: ldi v0, ENOMEM jmp zero, syscall_error - .end __brk + END(__brk) weak_alias (__brk, brk)