[PATCH] D123448: [readobj] Improve the messages output by unsupported options when using --elf-output-style=GNU
kazuminn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 9 01:09:02 PDT 2022
kazuminn created this revision.
kazuminn added a reviewer: jakehehrlich.
Herald added a subscriber: rupprecht.
Herald added a reviewer: jhenderson.
Herald added a project: All.
kazuminn requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
I'm bigginer for good first issue.
implemented: Improve the messages output by unsupported options when using --elf-output-style=GNU on llvm-readobj
github url:
https://github.com/llvm/llvm-project/issues/51294
Of course, I built it and tested it manually.
I don't have commit rights, so when merge, do it for someone else.
I couldn't find the readobj code owner from CODE_OWNER.txt, so I've nominated someone close.
Let me know if you have a more appropriate review.
Thanks.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123448
Files:
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/tools/llvm-readobj/ObjDumper.h
llvm/tools/llvm-readobj/llvm-readobj.cpp
Index: llvm/tools/llvm-readobj/llvm-readobj.cpp
===================================================================
--- llvm/tools/llvm-readobj/llvm-readobj.cpp
+++ llvm/tools/llvm-readobj/llvm-readobj.cpp
@@ -408,6 +408,8 @@
Dumper->printSectionDetails();
else
Dumper->printSectionHeaders();
+ } else if (opts::Output == opts::GNU) {
+ Dumper->printELFOutputStyle();
}
if (opts::HashSymbols)
Index: llvm/tools/llvm-readobj/ObjDumper.h
===================================================================
--- llvm/tools/llvm-readobj/ObjDumper.h
+++ llvm/tools/llvm-readobj/ObjDumper.h
@@ -131,6 +131,7 @@
virtual void printHashHistograms() {}
virtual void printCGProfile() {}
virtual void printBBAddrMaps() {}
+ virtual void printELFOutputStyle() {}
virtual void printAddrsig() {}
virtual void printNotes() {}
virtual void printELFLinkerOptions() {}
Index: llvm/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -574,6 +574,7 @@
void printHashHistograms() override;
void printCGProfile() override;
void printBBAddrMaps() override;
+ void printELFOutputStyle() override;
void printAddrsig() override;
void printNotes() override;
void printELFLinkerOptions() override;
@@ -4802,6 +4803,10 @@
OS << "GNUStyle::printBBAddrMaps not implemented\n";
}
+template <class ELFT> void GNUELFDumper<ELFT>::printELFOutputStyle() {
+ OS << "GNUStyle::printELFOutputStyle not implemented\n";
+}
+
static Expected<std::vector<uint64_t>> toULEB128Array(ArrayRef<uint8_t> Data) {
std::vector<uint64_t> Ret;
const uint8_t *Cur = Data.begin();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123448.421702.patch
Type: text/x-patch
Size: 1741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220409/6ac4c9a1/attachment.bin>
More information about the llvm-commits
mailing list