diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-05 20:36:45 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-05 20:36:45 +0000 |
commit | 1f574fe0be862c6f2011888f44d0d627ee2b8461 (patch) | |
tree | 08b91f93926c3813b3207d26d27d8379008ecf4a | |
parent | 1b4d62a18da5ce9dd9e6f7225eb5764dfa30c4b1 (diff) |
Support both the Linux/i386 and OSF/1 style brk syscalls. We may want
to change Linux/Alpha for the benefit of running foreign binaries.
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/brk.S | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 3d9f6dca5f..f44686b9a4 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe <brendan@zen.org>, 1993. @@ -50,20 +50,23 @@ LEAF(__brk, 0) ldiq v0, __NR_brk call_pal PAL_callsys + /* Be prepared for an OSF-style brk. */ + bne a3, $err1 + beq v0, $ok + /* Correctly handle the brk(0) query case. */ cmoveq a0, v0, a0 - - subq a0, v0, t0 - bne t0, error + xor a0, v0, t0 + bne t0, $err0 /* Update __curbrk and return cleanly. */ - stq a0, __curbrk mov zero, v0 +$ok: stq a0, __curbrk ret /* What a horrible way to die. */ -error: ldi v0, ENOMEM - jmp zero, __syscall_error +$err0: ldi v0, ENOMEM +$err1: jmp zero, __syscall_error END(__brk) |