|
@@ -11,6 +11,27 @@
|
|
#include <symbol/kallsyms.h>
|
|
#include <symbol/kallsyms.h>
|
|
#include "debug.h"
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
+#ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
|
|
|
|
+extern char *cplus_demangle(const char *, int);
|
|
|
|
+
|
|
|
|
+static inline char *bfd_demangle(void __maybe_unused *v, const char *c, int i)
|
|
|
|
+{
|
|
|
|
+ return cplus_demangle(c, i);
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+#ifdef NO_DEMANGLE
|
|
|
|
+static inline char *bfd_demangle(void __maybe_unused *v,
|
|
|
|
+ const char __maybe_unused *c,
|
|
|
|
+ int __maybe_unused i)
|
|
|
|
+{
|
|
|
|
+ return NULL;
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+#define PACKAGE 'perf'
|
|
|
|
+#include <bfd.h>
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
#ifndef HAVE_ELF_GETPHDRNUM_SUPPORT
|
|
#ifndef HAVE_ELF_GETPHDRNUM_SUPPORT
|
|
static int elf_getphdrnum(Elf *elf, size_t *dst)
|
|
static int elf_getphdrnum(Elf *elf, size_t *dst)
|
|
{
|
|
{
|