This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

From: "Anthony G. Basile" <>

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 <>
 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  <>
+	* ld.h (DL_CALL_FCT): Define if this macro is undefined.
+2015-05-04  Anthony G. Basile  <>
 	* ar.c (do_oper_extract): Use futimes or utimes depending on
 	* 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
 /* Recommended size of the buffer passed to ld_strerror.  */
 #define ERRBUFSIZE	(512)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]