__bionic_brk was shared by brk() and sbrk(), which should be implementor
specific and hidden to application developers.
Code Review:
https://review.source.android.com/#change,17364
From 7452bce8defc06a34612b25ace2ef802c0579a83 Mon Sep 17 00:00:00 2001
From: Jim Huang <[email protected]>
Date: Wed, 20 Apr 2011 04:53:30 +0800
Subject: [PATCH] Hide internal symbol __bionic_brk used by brk() and sbrk()
__bionic_brk was shared by brk() and sbrk(), which should be implementor
specific and hidden to application developers.
Change-Id: Iffe6ab3783e297d919a15812ac4910141a3ff066
---
libc/unistd/brk.c | 1 +
libc/unistd/sbrk.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libc/unistd/brk.c b/libc/unistd/brk.c
index bf2f108..5cc28d3 100644
--- a/libc/unistd/brk.c
+++ b/libc/unistd/brk.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
/* shared with sbrk.c */
+__LIBC_HIDDEN__
char *__bionic_brk;
int brk(void* end_data)
diff --git a/libc/unistd/sbrk.c b/libc/unistd/sbrk.c
index a112b6c..7fc21b9 100644
--- a/libc/unistd/sbrk.c
+++ b/libc/unistd/sbrk.c
@@ -32,7 +32,7 @@
#define SBRK_ALIGN 32
/* shared with brk() implementation */
-char* __bionic_brk;
+extern char* __bionic_brk;
void *sbrk(ptrdiff_t increment)
{
--
1.7.4.1
_______________________________________________
linaro-dev mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-dev