9832fd
commit c52ff39e8ee052e4a57676d65a27f09bd0a859ad
9832fd
Author: Joseph Myers <joseph@codesourcery.com>
9832fd
Date:   Wed Nov 12 22:31:38 2014 +0000
9832fd
9832fd
    Fix malloc_info namespace (bug 17570).
9832fd
    
9832fd
    malloc_info is defined in the same file as malloc and free, but is not
9832fd
    an ISO C function, so should be a weak symbol.  This patch makes it
9832fd
    so.
9832fd
    
9832fd
    Tested for x86_64 (testsuite, and that disassembly of installed shared
9832fd
    libraries is unchanged by the patch).
9832fd
    
9832fd
            [BZ #17570]
9832fd
            * malloc/malloc.c (malloc_info): Rename to __malloc_info and
9832fd
            define as weak alias of __malloc_info.
9832fd
9832fd
diff --git a/malloc/malloc.c b/malloc/malloc.c
9832fd
index c99b26d4a85e1b22..18e00315c6edba4d 100644
9832fd
--- a/malloc/malloc.c
9832fd
+++ b/malloc/malloc.c
9832fd
@@ -5007,7 +5007,7 @@ weak_alias (__posix_memalign, posix_memalign)
9832fd
 
9832fd
 
9832fd
 int
9832fd
-malloc_info (int options, FILE *fp)
9832fd
+__malloc_info (int options, FILE *fp)
9832fd
 {
9832fd
   /* For now, at least.  */
9832fd
   if (options != 0)
9832fd
@@ -5180,6 +5180,7 @@ malloc_info (int options, FILE *fp)
9832fd
 
9832fd
   return 0;
9832fd
 }
9832fd
+weak_alias (__malloc_info, malloc_info)
9832fd
 
9832fd
 
9832fd
 strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)