]> git.itanic.dy.fi Git - linux-stable/commit
perf genelf: Set ELF program header addresses properly
authorNamhyung Kim <namhyung@kernel.org>
Tue, 12 Dec 2023 07:05:44 +0000 (23:05 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Dec 2023 21:56:34 +0000 (18:56 -0300)
commit1af478903fc48c1409a8dd6b698383b62387adf1
treeaf49308e5f230ace88f9f360006e4889024ed571
parent6f33e6fa29d0366d6e5b3ea2930dbc0b648151fe
perf genelf: Set ELF program header addresses properly

The text section starts after the ELF headers so PHDR.p_vaddr and
others should have the correct addresses.

Fixes: babd04386b1df8c3 ("perf jit: Include program header in ELF files")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Fangrui Song <maskray@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Lieven Hey <lieven.hey@kdab.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Pablo Galindo <pablogsal@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231212070547.612536-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/genelf.c