diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 19:16:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-08-23 19:16:29 +0000 |
commit | 3add412f6d22b826b7345fbc481bb874035cb0ed (patch) | |
tree | f4e2f0d379a6f4349daece9a385908ed72451767 /libc/sysdeps/linux | |
parent | 7fb2478092d40e5237115f409968a9762734692b (diff) |
fixes from psm: hide internal brk symbols
Diffstat (limited to 'libc/sysdeps/linux')
26 files changed, 55 insertions, 92 deletions
diff --git a/libc/sysdeps/linux/alpha/brk.S b/libc/sysdeps/linux/alpha/brk.S index 05c3b2c43..42c7368b4 100644 --- a/libc/sysdeps/linux/alpha/brk.S +++ b/libc/sysdeps/linux/alpha/brk.S @@ -30,13 +30,13 @@ .section .bss .align 3 .globl __curbrk + .hidden __curbrk __curbrk: .skip 8 .type __curbrk,@object .size __curbrk,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..47179901f 100644 --- a/libc/sysdeps/linux/arm/brk.c +++ b/libc/sysdeps/linux/arm/brk.c @@ -24,7 +24,7 @@ libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; int brk (void *addr) { diff --git a/libc/sysdeps/linux/bfin/brk.c b/libc/sysdeps/linux/bfin/brk.c index 5735321bb..620c0b683 100644 --- a/libc/sysdeps/linux/bfin/brk.c +++ b/libc/sysdeps/linux/bfin/brk.c @@ -11,7 +11,7 @@ libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ -void * __curbrk = 0; +void * __curbrk attribute_hidden = 0; int brk (void *addr) { diff --git a/libc/sysdeps/linux/cris/__init_brk.c b/libc/sysdeps/linux/cris/__init_brk.c index df41f9b4c..c8c6a37e7 100644 --- a/libc/sysdeps/linux/cris/__init_brk.c +++ b/libc/sysdeps/linux/cris/__init_brk.c @@ -5,10 +5,9 @@ #include <errno.h> #include "sysdep.h" -void * __curbrk = 0; +void * __curbrk attribute_hidden = 0; -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern int __init_brk (void) attribute_hidden; int __init_brk (void) { @@ -31,4 +30,3 @@ __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 8183aabf3..938b15714 100644 --- a/libc/sysdeps/linux/cris/brk.c +++ b/libc/sysdeps/linux/cris/brk.c @@ -9,13 +9,10 @@ #include <errno.h> #include "sysdep.h" -libc_hidden_proto(brk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; +libc_hidden_proto(brk) int brk(void * end_data_seg) { if (__init_brk () == 0) { diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c index 934dc90c4..f3fab95bb 100644 --- a/libc/sysdeps/linux/cris/sbrk.c +++ b/libc/sysdeps/linux/cris/sbrk.c @@ -10,13 +10,10 @@ #include <errno.h> #include "sysdep.h" -libc_hidden_proto(sbrk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; +libc_hidden_proto(sbrk) void * sbrk(intptr_t increment) { diff --git a/libc/sysdeps/linux/frv/__init_brk.c b/libc/sysdeps/linux/frv/__init_brk.c index b688f98af..07cf32022 100644 --- a/libc/sysdeps/linux/frv/__init_brk.c +++ b/libc/sysdeps/linux/frv/__init_brk.c @@ -4,13 +4,12 @@ #include <unistd.h> #include <sys/syscall.h> -void * __curbrk = 0; +void * __curbrk attribute_hidden = 0; #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); -extern int __init_brk(void); -libc_hidden_proto(__init_brk) +extern int __init_brk(void) attribute_hidden; int __init_brk (void) { @@ -25,4 +24,3 @@ __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 b26f74fec..c69c97ad6 100644 --- a/libc/sysdeps/linux/frv/brk.c +++ b/libc/sysdeps/linux/frv/brk.c @@ -9,14 +9,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(brk) int brk(void * end_data_seg) { if (__init_brk () == 0) diff --git a/libc/sysdeps/linux/frv/sbrk.c b/libc/sysdeps/linux/frv/sbrk.c index fd760985e..a1ff2a148 100644 --- a/libc/sysdeps/linux/frv/sbrk.c +++ b/libc/sysdeps/linux/frv/sbrk.c @@ -4,14 +4,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(sbrk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(sbrk) void * sbrk(intptr_t increment) { diff --git a/libc/sysdeps/linux/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c index 0da4286e7..668e6fe70 100644 --- a/libc/sysdeps/linux/h8300/brk.c +++ b/libc/sysdeps/linux/h8300/brk.c @@ -9,11 +9,10 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *newbrk; diff --git a/libc/sysdeps/linux/hppa/brk.c b/libc/sysdeps/linux/hppa/brk.c index b57c3328a..dab2d57ca 100644 --- a/libc/sysdeps/linux/hppa/brk.c +++ b/libc/sysdeps/linux/hppa/brk.c @@ -21,11 +21,10 @@ #include <sys/syscall.h> #include <unistd.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c index fcf7f3b33..eda8ad9ce 100644 --- a/libc/sysdeps/linux/i386/brk.c +++ b/libc/sysdeps/linux/i386/brk.c @@ -21,11 +21,10 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *__unbounded newbrk, *__unbounded scratch; diff --git a/libc/sysdeps/linux/ia64/brk.S b/libc/sysdeps/linux/ia64/brk.S index 82a962d46..e9974d515 100644 --- a/libc/sysdeps/linux/ia64/brk.S +++ b/libc/sysdeps/linux/ia64/brk.S @@ -25,6 +25,7 @@ #include <asm/errno.h> .global __curbrk + .hidden __curbrk .type __curbrk,@object .size __curbrk,8 .data diff --git a/libc/sysdeps/linux/mips/brk.c b/libc/sysdeps/linux/mips/brk.c index cf48288f4..d98aec6e0 100644 --- a/libc/sysdeps/linux/mips/brk.c +++ b/libc/sysdeps/linux/mips/brk.c @@ -21,10 +21,9 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *newbrk; diff --git a/libc/sysdeps/linux/nios/brk.c b/libc/sysdeps/linux/nios/brk.c index 2c252f90c..8e626a7fb 100644 --- a/libc/sysdeps/linux/nios/brk.c +++ b/libc/sysdeps/linux/nios/brk.c @@ -21,11 +21,10 @@ #include <sys/syscall.h> #include <errno.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *newbrk; diff --git a/libc/sysdeps/linux/nios2/brk.c b/libc/sysdeps/linux/nios2/brk.c index 1711e609c..8d6288793 100644 --- a/libc/sysdeps/linux/nios2/brk.c +++ b/libc/sysdeps/linux/nios2/brk.c @@ -21,11 +21,10 @@ #include <sys/syscall.h> #include <errno.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *newbrk; diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S index b06dc0c94..25155ad46 100644 --- a/libc/sysdeps/linux/powerpc/brk.S +++ b/libc/sysdeps/linux/powerpc/brk.S @@ -29,6 +29,7 @@ .section .bss .align 4 .globl __curbrk + .hidden __curbrk __curbrk: .skip 4 .type __curbrk,@object .size __curbrk,4 @@ -69,4 +70,4 @@ brk: .size brk,.-brk libc_hidden_def(brk) -#endif +#endif diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c index 9f5ee867b..bb0692448 100644 --- a/libc/sysdeps/linux/sh/__init_brk.c +++ b/libc/sysdeps/linux/sh/__init_brk.c @@ -4,13 +4,12 @@ #include <unistd.h> #include <sys/syscall.h> -void * __curbrk = 0; +void * __curbrk attribute_hidden = 0; #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern int __init_brk (void) attribute_hidden; int __init_brk (void) { @@ -25,4 +24,3 @@ __init_brk (void) } return 0; } -libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c index b26f74fec..c69c97ad6 100644 --- a/libc/sysdeps/linux/sh/brk.c +++ b/libc/sysdeps/linux/sh/brk.c @@ -9,14 +9,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(brk) int brk(void * end_data_seg) { if (__init_brk () == 0) diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c index fd760985e..a1ff2a148 100644 --- a/libc/sysdeps/linux/sh/sbrk.c +++ b/libc/sysdeps/linux/sh/sbrk.c @@ -4,14 +4,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(sbrk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(sbrk) void * sbrk(intptr_t increment) { diff --git a/libc/sysdeps/linux/sh64/__init_brk.c b/libc/sysdeps/linux/sh64/__init_brk.c index 9f5ee867b..bb0692448 100644 --- a/libc/sysdeps/linux/sh64/__init_brk.c +++ b/libc/sysdeps/linux/sh64/__init_brk.c @@ -4,13 +4,12 @@ #include <unistd.h> #include <sys/syscall.h> -void * __curbrk = 0; +void * __curbrk attribute_hidden = 0; #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern int __init_brk (void) attribute_hidden; int __init_brk (void) { @@ -25,4 +24,3 @@ __init_brk (void) } return 0; } -libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/sh64/brk.c b/libc/sysdeps/linux/sh64/brk.c index b26f74fec..c69c97ad6 100644 --- a/libc/sysdeps/linux/sh64/brk.c +++ b/libc/sysdeps/linux/sh64/brk.c @@ -9,14 +9,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(brk) int brk(void * end_data_seg) { if (__init_brk () == 0) diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c index fd760985e..a1ff2a148 100644 --- a/libc/sysdeps/linux/sh64/sbrk.c +++ b/libc/sysdeps/linux/sh64/sbrk.c @@ -4,14 +4,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(sbrk) - -extern void * __curbrk; - -extern int __init_brk (void); -libc_hidden_proto(__init_brk) +extern void * __curbrk attribute_hidden; +extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; +libc_hidden_proto(sbrk) void * sbrk(intptr_t increment) { diff --git a/libc/sysdeps/linux/sparc/brk.c b/libc/sysdeps/linux/sparc/brk.c index f6d5281d2..7791f55e5 100644 --- a/libc/sysdeps/linux/sparc/brk.c +++ b/libc/sysdeps/linux/sparc/brk.c @@ -21,11 +21,11 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *newbrk; diff --git a/libc/sysdeps/linux/vax/brk.c b/libc/sysdeps/linux/vax/brk.c index 5b23f6075..47fd3e529 100644 --- a/libc/sysdeps/linux/vax/brk.c +++ b/libc/sysdeps/linux/vax/brk.c @@ -22,7 +22,7 @@ #include <sys/syscall.h> /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = NULL; +void *__curbrk attribute_hidden = NULL; 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..22f006d7e 100644 --- a/libc/sysdeps/linux/x86_64/brk.c +++ b/libc/sysdeps/linux/x86_64/brk.c @@ -21,11 +21,10 @@ #include <unistd.h> #include <sys/syscall.h> -libc_hidden_proto(brk) - /* This must be initialized data because commons can't have aliases. */ -void *__curbrk = 0; +void *__curbrk attribute_hidden = 0; +libc_hidden_proto(brk) int brk (void *addr) { void *__unbounded newbrk; |