summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-04-03 22:54:00 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-04-03 22:54:00 +0200
commit2be3edacc1f7279ac57b98e49ba3a189ae40b1fd (patch)
treee02109ceeb5efe4e6345bba55d3beaa47c5e99ae /libc/stdlib
parent564a95241f8468145ff85998ef9173c46aed7636 (diff)
stdlib: avoid relocation
valloc uses memalign Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c1
-rw-r--r--libc/stdlib/malloc-standard/memalign.c2
-rw-r--r--libc/stdlib/malloc/memalign.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index 6028dcb30..14f384632 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -182,4 +182,5 @@ DONE:
return result;
}
+libc_hidden_def(memalign)
#endif
diff --git a/libc/stdlib/malloc-standard/memalign.c b/libc/stdlib/malloc-standard/memalign.c
index 7e0674be5..6303c1dd9 100644
--- a/libc/stdlib/malloc-standard/memalign.c
+++ b/libc/stdlib/malloc-standard/memalign.c
@@ -127,4 +127,4 @@ void* memalign(size_t alignment, size_t bytes)
__MALLOC_UNLOCK;
return retval;
}
-
+libc_hidden_def(memalign)
diff --git a/libc/stdlib/malloc/memalign.c b/libc/stdlib/malloc/memalign.c
index cb4d521b8..74d5dbd2d 100644
--- a/libc/stdlib/malloc/memalign.c
+++ b/libc/stdlib/malloc/memalign.c
@@ -29,6 +29,8 @@
*/
void *memalign (size_t alignment, size_t size);
+/* XXX shadow outer malloc.h */
+libc_hidden_proto(memalign)
void *
memalign (size_t alignment, size_t size)
{
@@ -91,3 +93,4 @@ memalign (size_t alignment, size_t size)
return MALLOC_SETUP (base, end_addr - (unsigned long)base);
}
+libc_hidden_def(memalign)