Commit afffec6f authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf dso: Add support for reading the e_machine type for a dso



For ELF file dsos read the e_machine from the ELF header. For kernel
types assume the e_machine matches the perf tool. In other cases
return EM_NONE.

When reading from the ELF header use DSO__SWAP that may need
dso->needs_swap initializing. Factor out dso__swap_init to allow this.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
Link: https://lore.kernel.org/r/20250319050741.269828-7-irogers@google.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 5c2938fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment