[all-commits] [llvm/llvm-project] 69b312: [llvm-objdump] Create fake sections for a ELF core...
Namhyung Kim via All-commits
all-commits at lists.llvm.org
Thu Jul 14 05:40:22 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 69b312cde428056186928a3c1b6ad84e45de0353
https://github.com/llvm/llvm-project/commit/69b312cde428056186928a3c1b6ad84e45de0353
Author: Namhyung Kim <namhyung at google.com>
Date: 2022-07-14 (Thu, 14 Jul 2022)
Changed paths:
M llvm/include/llvm/Object/ELF.h
M llvm/include/llvm/Object/ELFObjectFile.h
M llvm/test/Object/objdump-no-sectionheaders.test
A llvm/test/tools/llvm-objdump/X86/disassemble-no-section.test
M llvm/tools/llvm-objdump/llvm-objdump.cpp
M llvm/tools/llvm-objdump/llvm-objdump.h
Log Message:
-----------
[llvm-objdump] Create fake sections for a ELF core file
The linux perf tools use /proc/kcore for disassembly kernel functions.
Actually it copies the relevant parts to a temp file and then pass it to
objdump. But it doesn't have section headers so llvm-objdump cannot
handle it.
Let's create fake section headers for the program headers. It'd have a
single section for each segment to cover the entire range. And for this
purpose we can consider only executable code segments.
With this change, I can see the following command shows proper outputs.
perf annotate --stdio --objdump=/path/to/llvm-objdump
Differential Revision: https://reviews.llvm.org/D128705
More information about the All-commits
mailing list