Re: [PATCH] perf tools: add compatibility with libelf 0.8 and autodetect

From: Lucas De Marchi
Date: Sat Oct 24 2009 - 09:26:58 EST


On Sat, Oct 24, 2009 at 06:30, Ingo Molnar <mingo@xxxxxxx> wrote:
> I.e. something like this:
>
> /*
>  * libelf 0.8 and earlier do not support ELF_C_READ_MMAP;
>  * for newer versions we can use mmap to reduce memory usage:
>  */
> #ifndef ELF_C_READ_MMAP
> # define PERF_ELF_C_READ_MMAP ELF_C_READ
> #endif

In this case you should define PERF_ELF_C_READ_MMAP as ELF_C_READ_MMAP
when using elftutils:
#ifndef ELF_C_READ_MMAP
# define PERF_ELF_C_READ_MMAP ELF_C_READ
#else
# define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP
#endif

and change all places to use PERF_ELF_C_READ_MMAP


I think the comment is wrong. I downloaded the latest version of
libelf, i.e. 0.8.12 at http://www.mr511.de/software/english.html, and
there's no support to ELF_C_READ_MMAP. It's a elfutils' feature only.
--
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/