llvm-project/llvm/tools/llvm-objdump
Namhyung Kim 69b312cde4 [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
2022-07-14 13:39:59 +01:00
..
CMakeLists.txt [llvm-objdump] Add support for dumping embedded offloading data 2022-07-01 21:13:28 -04:00
COFFDump.cpp [llvm-objdump] Change some nonnull pointers to references. NFC 2022-07-07 12:14:59 -07:00
COFFDump.h [llvm-objdump] Change some nonnull pointers to references. NFC 2022-07-07 12:14:59 -07:00
ELFDump.cpp [llvm-objdump] --private-headers: change errors to warnings for dynamic section dumping 2022-03-28 01:00:43 -07:00
ELFDump.h
MachODump.cpp [llvm-objdump] Change some nonnull pointers to references. NFC 2022-07-07 12:14:59 -07:00
MachODump.h Add a (nonfunctional) -dyld_info flag to llvm-objdump. 2022-02-22 11:06:27 -08:00
ObjdumpOptID.h [llvm-objdump] Add an llvm-otool tool 2021-04-20 08:24:58 -04:00
ObjdumpOpts.td [llvm-objdump] Add support for dumping embedded offloading data 2022-07-01 21:13:28 -04:00
OffloadDump.cpp [llvm-objdump] Fix alignment issues when dumping offloading sections 2022-07-08 14:30:06 -04:00
OffloadDump.h [llvm-objdump] Add support for dumping embedded offloading data 2022-07-01 21:13:28 -04:00
OtoolOpts.td Add a (nonfunctional) -dyld_info flag to llvm-objdump. 2022-02-22 11:06:27 -08:00
SourcePrinter.cpp Cleanup include: DebugInfo/Symbolize 2022-02-24 13:25:11 +01:00
SourcePrinter.h Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
WasmDump.cpp [llvm-objdump] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr 2022-01-23 12:50:12 +00:00
WasmDump.h
XCOFFDump.cpp [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
XCOFFDump.h [llvm-objdump] Change some nonnull pointers to references. NFC 2022-07-07 12:14:59 -07:00
llvm-objdump.cpp [llvm-objdump] Create fake sections for a ELF core file 2022-07-14 13:39:59 +01:00
llvm-objdump.h [llvm-objdump] Create fake sections for a ELF core file 2022-07-14 13:39:59 +01:00