]> git.baikalelectronics.ru Git - kernel.git/commit
perf inject: Fix GEN_ELF_TEXT_OFFSET for jit
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 14 Oct 2022 17:09:04 +0000 (20:09 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 15 Oct 2022 13:13:16 +0000 (10:13 -0300)
commit444b88a85f32ede679542e5585fc086677e5ee51
tree30102bd4d045b1521198c2f0bbd180a0c6d21639
parentec0308d987c6fba375f1629c5156966847e141db
perf inject: Fix GEN_ELF_TEXT_OFFSET for jit

When a program header was added, it moved the text section but
GEN_ELF_TEXT_OFFSET was not updated.

Fix by adding the program header size and aligning.

Fixes: c3a9798ad5e3f30a ("perf jit: Include program header in ELF files")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Lieven Hey <lieven.hey@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20221014170905.64069-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/genelf.h