[tip:perfcounters/urgent] perf_counter tools: Provide default bfd_demangle() function in case it's not around

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  08b6cb88eeb51fe267cb3847ba663a9558fe73cd
Gitweb:     http://git.kernel.org/tip/08b6cb88eeb51fe267cb3847ba663a9558fe73cd
Author:     Ingo Molnar <mingo@xxxxxxx>
AuthorDate: Tue, 4 Aug 2009 13:27:41 +0200
Committer:  Ingo Molnar <mingo@xxxxxxx>
CommitDate: Tue, 4 Aug 2009 18:19:33 +0200

perf_counter tools: Provide default bfd_demangle() function in case it's not around

Provide weak alias (which does nothing) in case the system does not
offer one.

Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 tools/perf/util/symbol.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b4fe057..7bd5128 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -8,6 +8,17 @@
 #include <elf.h>
 #include <bfd.h>
 
+/*
+ * Weak wrapper in case a library version is not available:
+ */
+extern char * __attribute__((weak)) bfd_demangle (bfd *, const char *, int);
+
+char * __attribute__((weak))
+ bfd_demangle (bfd *bfd __used, const char *name __used, int flags __used)
+{
+	return NULL;
+}
+
 const char *sym_hist_filter;
 
 #ifndef DMGL_PARAMS
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux