You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
perf tools: Fix compatibility with libelf 0.8 and autodetect
The Makefile now automatically defines LIBELF_NO_MMAP when libelf 0.8.x is detected. libelf 0.8 is still maintained and some distributions such as Arch Linux use it instead of elfutils. Signed-off-by: Marti Raudsepp <marti@juffo.org> Cc: Lucas De Marchi <lucas.de.marchi@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <1256400636.3007.16.camel@newn> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
54f4407608
commit
84087126d5
@@ -413,7 +413,7 @@ static int dso__synthesize_plt_symbols(struct dso *self, int v)
|
||||
if (fd < 0)
|
||||
goto out;
|
||||
|
||||
elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
|
||||
elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
|
||||
if (elf == NULL)
|
||||
goto out_close;
|
||||
|
||||
@@ -533,7 +533,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
|
||||
Elf *elf;
|
||||
int nr = 0, kernel = !strcmp("[kernel]", self->name);
|
||||
|
||||
elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
|
||||
elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
|
||||
if (elf == NULL) {
|
||||
if (v)
|
||||
fprintf(stderr, "%s: cannot read %s ELF file.\n",
|
||||
@@ -675,7 +675,7 @@ static char *dso__read_build_id(struct dso *self, int v)
|
||||
if (fd < 0)
|
||||
goto out;
|
||||
|
||||
elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
|
||||
elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
|
||||
if (elf == NULL) {
|
||||
if (v)
|
||||
fprintf(stderr, "%s: cannot read %s ELF file.\n",
|
||||
|
||||
Reference in New Issue
Block a user