[PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling

Max Filippov jcmvbkbc at gmail.com
Sun May 3 23:25:42 UTC 2015


From: "Anthony G. Basile" <blueness at gentoo.org>

DL_CALL_FCT is defined in <bits/dlfcn.h> on glibc systems and is
a macro for calling functions in shared objects with dlsym.  This
is useful for profiling since these functions would otherwise not
use the PLT and so not be counted when profiling with gprof.

Signed-off-by: Anthony G. Basile <blueness at gentoo.org>
---
 src/ChangeLog | 4 ++++
 src/ld.h      | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index 2ee0d1d..2bb2f0b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
 2015-05-04  Anthony G. Basile  <blueness at gentoo.org>
 
+	* ld.h (DL_CALL_FCT): Define if this macro is undefined.
+
+2015-05-04  Anthony G. Basile  <blueness at gentoo.org>
+
 	* ar.c (do_oper_extract): Use futimes or utimes depending on
 	HAVE_FUTIMES.
 	* strip.c (handle_elf, handle_ar): Likewise.
diff --git a/src/ld.h b/src/ld.h
index 29f4031..e64649c 100644
--- a/src/ld.h
+++ b/src/ld.h
@@ -24,6 +24,9 @@
 #include <stdio.h>
 #include "xelf.h"
 
+#ifndef DL_CALL_FCT
+#define DL_CALL_FCT(f, a) f a
+#endif
 
 /* Recommended size of the buffer passed to ld_strerror.  */
 #define ERRBUFSIZE	(512)
-- 
1.8.1.4



More information about the elfutils-devel mailing list