[PATCH] D38135: [dwarfdump] Skip 'stripped' sections
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 07:49:54 PDT 2017
JDevlieghere created this revision.
When dsymutil generates the companion file, its strips all unnecessary
sections by omitting their body and setting the offset in their
corresponding load command to zero.
One such section is the .eh_frame section, as it contains runtime
information rather than debug information and is part of the __TEXT
segment. When reading this section, we would just read the number of
bytes specified in the load command, starting from offset 0 (i.e. the
beginning of the file).
Rather than trying to parse this obviously invalid section, dwarfdump
now skips this.
PS: The same thing occurs for tools like objdump when trying to dump or
disassemble stripped sections in the __TEXT segment. I will address this
in a separate patch.
Repository:
rL LLVM
https://reviews.llvm.org/D38135
Files:
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/ObjectFile.cpp
test/tools/llvm-dwarfdump/X86/Inputs/foo.c
test/tools/llvm-dwarfdump/X86/stripped.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38135.116188.patch
Type: text/x-patch
Size: 3997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170921/4d58b7ea/attachment.bin>
More information about the llvm-commits
mailing list