]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix malloc_info namespace (bug 17570).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 12 Nov 2014 22:31:38 +0000 (22:31 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 12 Nov 2014 22:31:38 +0000 (22:31 +0000)
malloc_info is defined in the same file as malloc and free, but is not
an ISO C function, so should be a weak symbol.  This patch makes it
so.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).

[BZ #17570]
* malloc/malloc.c (malloc_info): Rename to __malloc_info and
define as weak alias of __malloc_info.

ChangeLog
NEWS
malloc/malloc.c

index 42a3e828fc00b08c499c8a06cb1ee585e38d6c3b..b7ec0f1eb5fe289e153f4228284cca219d1b68b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-11-12  Joseph Myers  <joseph@codesourcery.com>
 
+       [BZ #17570]
+       * malloc/malloc.c (malloc_info): Rename to __malloc_info and
+       define as weak alias of __malloc_info.
+
        [BZ #17584]
        * dirent/rewinddir.c (rewinddir): Rename to __rewinddir and define
        as weak alias of __rewinddir.  Don't use libc_hidden_def.
diff --git a/NEWS b/NEWS
index 63b0a86fe6395bb3a992e50223a7d2b35dcc3a21..5017517fe89822e6c39664add363ad9a9c46b6b9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,7 +11,7 @@ Version 2.21
 
   6652, 12926, 14132, 14138, 14171, 15215, 15884, 17266, 17344, 17363,
   17370, 17371, 17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522,
-  17555, 17583, 17584.
+  17555, 17570, 17583, 17584.
 
 * New locales: tu_IN, bh_IN.
 \f
index 6cbe9f32f8929a03796f8bd859a2450e207ebbde..6bfb8593ad7473714aba57dccb3fd250bab60aba 100644 (file)
@@ -4993,7 +4993,7 @@ weak_alias (__posix_memalign, posix_memalign)
 
 
 int
-malloc_info (int options, FILE *fp)
+__malloc_info (int options, FILE *fp)
 {
   /* For now, at least.  */
   if (options != 0)
@@ -5166,6 +5166,7 @@ malloc_info (int options, FILE *fp)
 
   return 0;
 }
+weak_alias (__malloc_info, malloc_info)
 
 
 strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)