[llvm] [llvm-readobj][ELF] Implement JSON output for --dynamic-table (PR #95976)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 00:16:53 PDT 2024
================
@@ -7365,6 +7369,55 @@ template <class ELFT> void LLVMELFDumper<ELFT>::printDynamicTable() {
W.startLine() << "]\n";
}
+template <class ELFT>
+void JSONELFDumper<ELFT>::printAuxillaryDynamicTableEntryInfo(
+ const Elf_Dyn &Entry) {
+ switch (Entry.getTag()) {
+ case DT_SONAME:
+ this->W.printString("Name", this->getDynamicString(Entry.getVal()));
+ break;
+ case DT_AUXILIARY:
+ LLVM_FALLTHROUGH;
----------------
jh7370 wrote:
I'm not sure `LLVM_FALLTHROUGH` is needed where there's no body to the case statement. You should be able to just do:
```
case DT_AUXILIARY:
case DT_FILTER:
case DT_NEEDED:
ListScope L(this->W, "Libraries");
```
https://github.com/llvm/llvm-project/pull/95976
More information about the llvm-commits
mailing list