This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
- From: Max Filippov <jcmvbkbc at gmail dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 04 May 2015 02:25:42 +0300
- Subject: [PATCH 4/6] Remove DL_CALL_FCT wrapper which is used in profiling
From: "Anthony G. Basile" <blueness@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@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@gentoo.org>
+ * ld.h (DL_CALL_FCT): Define if this macro is undefined.
+
+2015-05-04 Anthony G. Basile <blueness@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