diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-02-01 11:55:56 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-02-01 11:55:56 +0000 |
commit | 40f2d136165fc84a0cdccaa2d831eb5382b73403 (patch) | |
tree | 56ff21804c2e58e03609caafe1eda8bba2509f79 /libc | |
parent | bb9b5b976f12b36e1d8c0781b4688c1427cf148d (diff) |
I will risk this one: __curbrk
Diffstat (limited to 'libc')
25 files changed, 76 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/alpha/brk.S b/libc/sysdeps/linux/alpha/brk.S index de0a7563f..05c3b2c43 100644 --- a/libc/sysdeps/linux/alpha/brk.S +++ b/libc/sysdeps/linux/alpha/brk.S @@ -36,6 +36,7 @@ __curbrk: .skip 8 #else .comm __curbrk, 8 #endif +libc_hidden_data_def(__curbrk) .text .globl brk; diff --git a/libc/sysdeps/linux/arm/brk.c b/libc/sysdeps/linux/arm/brk.c index 3d606e533..185d9b4dc 100644 --- a/libc/sysdeps/linux/arm/brk.c +++ b/libc/sysdeps/linux/arm/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/bfin/brk.c b/libc/sysdeps/linux/bfin/brk.c index 3b261697b..1df3ae517 100644 --- a/libc/sysdeps/linux/bfin/brk.c +++ b/libc/sysdeps/linux/bfin/brk.c @@ -11,7 +11,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/common/sbrk.c b/libc/sysdeps/linux/common/sbrk.c index 3c2d9bdc9..d9a4d6899 100644 --- a/libc/sysdeps/linux/common/sbrk.c +++ b/libc/sysdeps/linux/common/sbrk.c @@ -13,7 +13,7 @@ libc_hidden_proto(brk) /* Defined in brk.c. */ extern void *__curbrk; - +libc_hidden_proto(__curbrk) /* Extend the process's data space by INCREMENT. If INCREMENT is negative, shrink data space by - INCREMENT. diff --git a/libc/sysdeps/linux/cris/__init_brk.c b/libc/sysdeps/linux/cris/__init_brk.c index 211ae9136..8e6591a62 100644 --- a/libc/sysdeps/linux/cris/__init_brk.c +++ b/libc/sysdeps/linux/cris/__init_brk.c @@ -5,8 +5,13 @@ #include <errno.h> #include "sysdep.h" +extern void *__curbrk; +libc_hidden_proto(__curbrk) void * __curbrk = 0; +libc_hidden_data_def(__curbrk) +extern int __init_brk (void); +libc_hidden_proto(__init_brk) int __init_brk (void) { @@ -29,3 +34,4 @@ __init_brk (void) } return 0; } +libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/cris/brk.c b/libc/sysdeps/linux/cris/brk.c index 42a3b6de3..4aadeba2f 100644 --- a/libc/sysdeps/linux/cris/brk.c +++ b/libc/sysdeps/linux/cris/brk.c @@ -12,8 +12,10 @@ libc_hidden_proto(brk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__initbrk) int brk(void * end_data_seg) { diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c index 04c4b5b0a..15f506cd7 100644 --- a/libc/sysdeps/linux/cris/sbrk.c +++ b/libc/sysdeps/linux/cris/sbrk.c @@ -13,8 +13,10 @@ libc_hidden_proto(sbrk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) void * sbrk(intptr_t increment) diff --git a/libc/sysdeps/linux/frv/__init_brk.c b/libc/sysdeps/linux/frv/__init_brk.c index 92e07c49d..507902fc5 100644 --- a/libc/sysdeps/linux/frv/__init_brk.c +++ b/libc/sysdeps/linux/frv/__init_brk.c @@ -4,11 +4,16 @@ #include <unistd.h> #include <sys/syscall.h> +extern void * __curbrk; +libc_hidden_proto(__curbrk) void * __curbrk = 0; +libc_hidden_data_def(__curbrk) #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); +extern int __init_brk(void); +libc_hidden_proto(__init_brk) int __init_brk (void) { @@ -23,3 +28,4 @@ __init_brk (void) } return 0; } +libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/frv/brk.c b/libc/sysdeps/linux/frv/brk.c index 9af08c37d..9e33830ab 100644 --- a/libc/sysdeps/linux/frv/brk.c +++ b/libc/sysdeps/linux/frv/brk.c @@ -12,8 +12,10 @@ libc_hidden_proto(brk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; int brk(void * end_data_seg) diff --git a/libc/sysdeps/linux/frv/sbrk.c b/libc/sysdeps/linux/frv/sbrk.c index 343dc14fb..bb66f0148 100644 --- a/libc/sysdeps/linux/frv/sbrk.c +++ b/libc/sysdeps/linux/frv/sbrk.c @@ -7,8 +7,10 @@ libc_hidden_proto(sbrk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; void * diff --git a/libc/sysdeps/linux/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c index 0da4286e7..52ba1ac9c 100644 --- a/libc/sysdeps/linux/h8300/brk.c +++ b/libc/sysdeps/linux/h8300/brk.c @@ -12,7 +12,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/hppa/brk.c b/libc/sysdeps/linux/hppa/brk.c index b57c3328a..52d0b4c74 100644 --- a/libc/sysdeps/linux/hppa/brk.c +++ b/libc/sysdeps/linux/hppa/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c index fcf7f3b33..6a654f0d0 100644 --- a/libc/sysdeps/linux/i386/brk.c +++ b/libc/sysdeps/linux/i386/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/m68k/brk.c b/libc/sysdeps/linux/m68k/brk.c index cad5976de..b627f6400 100644 --- a/libc/sysdeps/linux/m68k/brk.c +++ b/libc/sysdeps/linux/m68k/brk.c @@ -12,7 +12,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/mips/brk.c b/libc/sysdeps/linux/mips/brk.c index cf48288f4..8d2b4ede1 100644 --- a/libc/sysdeps/linux/mips/brk.c +++ b/libc/sysdeps/linux/mips/brk.c @@ -23,7 +23,10 @@ libc_hidden_proto(brk) +extern void *__curbrk; +libc_hidden_proto(__curbrk) void *__curbrk = 0; +libc_hidden_data_def(__curbrk) int brk (void *addr) { diff --git a/libc/sysdeps/linux/nios/brk.c b/libc/sysdeps/linux/nios/brk.c index 2c252f90c..69f60d336 100644 --- a/libc/sysdeps/linux/nios/brk.c +++ b/libc/sysdeps/linux/nios/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/nios2/brk.c b/libc/sysdeps/linux/nios2/brk.c index 0e5811cee..2d7bf4420 100644 --- a/libc/sysdeps/linux/nios2/brk.c +++ b/libc/sysdeps/linux/nios2/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S index bf42784cb..b7b19d153 100644 --- a/libc/sysdeps/linux/powerpc/brk.S +++ b/libc/sysdeps/linux/powerpc/brk.S @@ -58,4 +58,6 @@ brk: .size brk,.-brk libc_hidden_def(brk) +/* won't help too much, HIDDEN_JUMPTARGET should be used here as well, now the reloc remains */ +libc_hidden_data_def(__curbrk) #endif diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c index 92e07c49d..c14180a6c 100644 --- a/libc/sysdeps/linux/sh/__init_brk.c +++ b/libc/sysdeps/linux/sh/__init_brk.c @@ -4,11 +4,16 @@ #include <unistd.h> #include <sys/syscall.h> +extern void * __curbrk; +libc_hidden_proto(__curbrk) void * __curbrk = 0; +libc_hidden_data_def(__curbrk) #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); +extern int __init_brk (void); +libc_hidden_proto(__init_brk) int __init_brk (void) { @@ -23,3 +28,4 @@ __init_brk (void) } return 0; } +libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c index 343dc14fb..bb66f0148 100644 --- a/libc/sysdeps/linux/sh/sbrk.c +++ b/libc/sysdeps/linux/sh/sbrk.c @@ -7,8 +7,10 @@ libc_hidden_proto(sbrk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; void * diff --git a/libc/sysdeps/linux/sh64/__init_brk.c b/libc/sysdeps/linux/sh64/__init_brk.c index 92e07c49d..c14180a6c 100644 --- a/libc/sysdeps/linux/sh64/__init_brk.c +++ b/libc/sysdeps/linux/sh64/__init_brk.c @@ -4,11 +4,16 @@ #include <unistd.h> #include <sys/syscall.h> +extern void * __curbrk; +libc_hidden_proto(__curbrk) void * __curbrk = 0; +libc_hidden_data_def(__curbrk) #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); +extern int __init_brk (void); +libc_hidden_proto(__init_brk) int __init_brk (void) { @@ -23,3 +28,4 @@ __init_brk (void) } return 0; } +libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c index 343dc14fb..bb66f0148 100644 --- a/libc/sysdeps/linux/sh64/sbrk.c +++ b/libc/sysdeps/linux/sh64/sbrk.c @@ -7,8 +7,10 @@ libc_hidden_proto(sbrk) extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; void * diff --git a/libc/sysdeps/linux/sparc/brk.c b/libc/sysdeps/linux/sparc/brk.c index f6d5281d2..a855ef013 100644 --- a/libc/sysdeps/linux/sparc/brk.c +++ b/libc/sysdeps/linux/sparc/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) { diff --git a/libc/sysdeps/linux/vax/brk.c b/libc/sysdeps/linux/vax/brk.c index 5b23f6075..c8105b639 100644 --- a/libc/sysdeps/linux/vax/brk.c +++ b/libc/sysdeps/linux/vax/brk.c @@ -22,7 +22,10 @@ #include <sys/syscall.h> /* This must be initialized data because commons can't have aliases. */ +extern void *__curbrk; +libc_hidden_proto(__curbrk) void *__curbrk = NULL; +libc_hidden_data_def(__curbrk) libc_hidden_proto(brk) int diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c index 09d911066..e0f9637c4 100644 --- a/libc/sysdeps/linux/x86_64/brk.c +++ b/libc/sysdeps/linux/x86_64/brk.c @@ -24,7 +24,10 @@ 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 brk (void *addr) { |