summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/i386/brk.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-28 00:54:02 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-28 00:54:02 +0000
commit5eb1fae2a97ffc88d136502ace050662e57ef34a (patch)
treedf1087921ff9a88aa8a47ddfd55dc15a793fec56 /libc/sysdeps/linux/i386/brk.c
parentdc0e95c67d350ca9e950abb5f75a63833380af9f (diff)
downloaduClibc-alpine-5eb1fae2a97ffc88d136502ace050662e57ef34a.tar.bz2
uClibc-alpine-5eb1fae2a97ffc88d136502ace050662e57ef34a.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/i386/brk.c')
-rw-r--r--libc/sysdeps/linux/i386/brk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index 5790e2fca..6a654f0d0 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -21,15 +21,19 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
+extern void *__curbrk;
+libc_hidden_proto(__curbrk)
void *__curbrk = 0;
+libc_hidden_data_def(__curbrk)
-int attribute_hidden __brk (void *addr)
+int brk (void *addr)
{
void *__unbounded newbrk, *__unbounded scratch;
- asm ("movl %%ebx, %1\n" /* Save %ebx in scratch register. */
+ __asm__ ("movl %%ebx, %1\n" /* Save %ebx in scratch register. */
"movl %3, %%ebx\n" /* Put ADDR in %ebx to be syscall arg. */
"int $0x80 # %2\n" /* Perform the system call. */
"movl %1, %%ebx\n" /* Restore %ebx from scratch register. */
@@ -46,4 +50,4 @@ int attribute_hidden __brk (void *addr)
return 0;
}
-strong_alias(__brk,brk)
+libc_hidden_def(brk)