Re: [PATCH] basic perf support for sparc

From: Ingo Molnar
Date: Sun Aug 02 2009 - 15:51:09 EST



* Kyle McMartin <kyle@xxxxxxxxxxx> wrote:

> On Sun, Aug 02, 2009 at 08:41:48PM +0200, Ingo Molnar wrote:
> > Could we somehow define a weak symbol for those library functions
> > ourselves and thus just fall back to that (which does nothing)
> > instead of failing the link?
> >
>
> Well, you could just dlopen the object, but that's kind of
> gross...

hm, why is it gross? I think it's a nicely plug-and-play tooling
solution - instead of some obscure make flag.

Since we define the prototype anyway:

> +static inline char *bfd_demangle(void __used *v, const char __used *c,
> + int __used i) {
> + return NULL;
> +}

We are sticking to a given version of the API. We could turn that
into a function pointer and fill it in during startup via dlopen().
If it's NULL then we dont call it and assume a value of NULL.

Mind submitting such a version of your fix? It would nicely decrease
the build requirements cross section surface of perf.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/