lkml.org 
[lkml]   [2009]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] basic perf support for sparc

Btw., how about the solution below? Will the libbfd system library
version override this weak alias properly?

Ingo

-------------->
From 238762507bb41689df191160ada1986b012b57df Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 4 Aug 2009 13:27:41 +0200
Subject: [PATCH] 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@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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

\
 
 \ /
  Last update: 2009-08-04 13:31    [W:0.097 / U:3.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site