diff options
author | Esme-Yi <esme.yi@ibm.com> | 2021-05-27 04:53:14 +0000 |
---|---|---|
committer | Esme-Yi <esme.yi@ibm.com> | 2021-05-27 04:53:14 +0000 |
commit | d82f2a123f9c443911fc40009d2017915b850758 (patch) | |
tree | f28cc5b01d53545d109c3b6a476b234f235903a0 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | cc3db8dbdf517cf96264f8f63a828657775062e5 (diff) | |
download | llvm-d82f2a123f9c443911fc40009d2017915b850758.zip llvm-d82f2a123f9c443911fc40009d2017915b850758.tar.gz llvm-d82f2a123f9c443911fc40009d2017915b850758.tar.bz2 |
[llvm-objdump] Print the DEBUG type under `--section-headers`.
Summary: Under the option --section-headers, we can only
print the section types of TEXT, DATA, and BSS for now.
This patch adds the DEBUG type.
Reviewed By: jhenderson, Higuoxing
Differential Revision: https://reviews.llvm.org/D102603
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 084c5ed..bb02ed4 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1764,9 +1764,11 @@ void objdump::printSectionHeaders(const ObjectFile *Obj) { std::string Type = Section.isText() ? "TEXT" : ""; if (Section.isData()) - Type += Type.empty() ? "DATA" : " DATA"; + Type += Type.empty() ? "DATA" : ", DATA"; if (Section.isBSS()) - Type += Type.empty() ? "BSS" : " BSS"; + Type += Type.empty() ? "BSS" : ", BSS"; + if (Section.isDebugSection()) + Type += Type.empty() ? "DEBUG" : ", DEBUG"; if (HasLMAColumn) outs() << format("%3" PRIu64 " %-*s %08" PRIx64 " ", Idx, NameWidth, |