diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-06-05 11:37:53 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-06-05 11:37:53 +0000 |
commit | b42196661ba7ccfa3d68906ed52e0488305291b2 (patch) | |
tree | 68cfb986cbf8347e6bc0edf1a64b81623ed948a0 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 5a81af547c2c7a3444e4b4a6b752c4fc1e5d95b1 (diff) | |
download | llvm-b42196661ba7ccfa3d68906ed52e0488305291b2.zip llvm-b42196661ba7ccfa3d68906ed52e0488305291b2.tar.gz llvm-b42196661ba7ccfa3d68906ed52e0488305291b2.tar.bz2 |
[llvm-objdump] - Disassemble non-executable sections if specifically requested.
This is https://bugs.llvm.org/show_bug.cgi?id=41897.
Previously -d + -j .data had no effect, that wasn't consistent with GNU,
which proccesses .data in that case. With this patch we follow this behavior.
Diffeential revision: https://reviews.llvm.org/D62848
llvm-svn: 362596
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 1312ea8..4e734a9 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1095,7 +1095,8 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj, array_pod_sort(AbsoluteSymbols.begin(), AbsoluteSymbols.end()); for (const SectionRef &Section : ToolSectionFilter(*Obj)) { - if (!DisassembleAll && (!Section.isText() || Section.isVirtual())) + if (FilterSections.empty() && !DisassembleAll && + (!Section.isText() || Section.isVirtual())) continue; uint64_t SectionAddr = Section.getAddress(); |