]> sourceware.org Git - glibc.git/commitdiff
Define write_profiling functions only in profile library [BZ #31756]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 20 May 2024 01:46:53 +0000 (18:46 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 22 May 2024 13:12:55 +0000 (06:12 -0700)
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>
gmon/gmon.c

index 6439ed1caa1a6e5d9f885aff53cd374a986f6ea1..996b6a62a4a656ade0966d591dc8698184a1af39 100644 (file)
@@ -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
This page took 0.215672 seconds and 5 git commands to generate.