about summary refs log tree commit diff
path: root/gmon
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-05-19 18:46:53 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-05-22 06:12:55 -0700
commit6d3b523eb54198d15af6e042054912cf9f5210de (patch)
tree26f67a96813975c6f6eee596537afa9dbb19b390 /gmon
parent43d41ae6d74441dd5d21045324ff7391e7b0f545 (diff)
downloadglibc-6d3b523eb54198d15af6e042054912cf9f5210de.tar.gz
glibc-6d3b523eb54198d15af6e042054912cf9f5210de.tar.xz
glibc-6d3b523eb54198d15af6e042054912cf9f5210de.zip
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>
Diffstat (limited to 'gmon')
-rw-r--r--gmon/gmon.c3
1 files changed, 2 insertions, 1 deletions
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