public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Define write_profiling functions only in profile library [BZ #31756]
@ 2024-05-22 13:13 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-05-22 13:13 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6d3b523eb54198d15af6e042054912cf9f5210de

commit 6d3b523eb54198d15af6e042054912cf9f5210de
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun May 19 18:46:53 2024 -0700

    Define write_profiling functions only in profile library [BZ #31756]
    
    libc.so doesn't use nor export write_profiling functions.  There is no
    point to define them in libc.so nor in libc.a.  Fix BZ #31756 by defining
    them only in profile library.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 gmon/gmon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gmon/gmon.c b/gmon/gmon.c
index 6439ed1caa..996b6a62a4 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -439,6 +439,7 @@ write_gmon (void)
 }
 
 
+#ifdef PROF
 void
 __write_profiling (void)
 {
@@ -448,7 +449,7 @@ __write_profiling (void)
     write_gmon ();
   _gmonparam.state = save;
 }
-#ifndef SHARED
+
 /* This symbol isn't used anywhere in the DSO and it is not exported.
    This would normally mean it should be removed to get the same API
    in static libraries.  But since profiling is special in static libs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-22 13:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 13:13 [glibc] Define write_profiling functions only in profile library [BZ #31756] H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).