about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:56:46 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 17:57:02 -0700
commitfa4265909edaa5118f7860f452e2fb9da48d0f6e (patch)
tree10f89575ddaee511a8b8bdd5f7ba4e4427186748
parent2f8a05d826f554210eb2bec8dd6344c9615e00d7 (diff)
downloadglibc-fa4265909edaa5118f7860f452e2fb9da48d0f6e.tar.gz
glibc-fa4265909edaa5118f7860f452e2fb9da48d0f6e.tar.xz
glibc-fa4265909edaa5118f7860f452e2fb9da48d0f6e.zip
Hide internal __moncontrol function [BZ #18822]
Hide internal __moncontrol function to allow direct access within libc.so
and libc.a without using GOT nor PLT.

	[BZ #18822]
	* mon/gmon.c (__moncontrol): Add libc_hidden_proto and
	libc_hidden_def.
-rw-r--r--ChangeLog6
-rw-r--r--gmon/gmon.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 278225538d..85de0ee009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18822]
+	* mon/gmon.c (__moncontrol): Add libc_hidden_proto and
+	libc_hidden_def.
+
+2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #18822]
 	* csu/version.c (__libc_print_version): Add attribute_hidden.
 
 2017-10-01  H.J. Lu  <hongjiu.lu@intel.com>
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 4e48eba1bf..f1aa3b776c 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -62,6 +62,7 @@ static int	s_scale;
 
 void moncontrol (int mode);
 void __moncontrol (int mode);
+libc_hidden_proto (__moncontrol)
 static void write_hist (int fd);
 static void write_call_graph (int fd);
 static void write_bb_counts (int fd);
@@ -93,6 +94,7 @@ __moncontrol (int mode)
       p->state = GMON_PROF_OFF;
     }
 }
+libc_hidden_def (__moncontrol)
 weak_alias (__moncontrol, moncontrol)