[llvm] [llvm-readelf] Add --extra-sym-info (PR #65580)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 00:09:19 PDT 2023


================
@@ -4058,17 +4075,31 @@ GNUELFDumper<ELFT>::getSymbolSectionNdx(const Elf_Sym &Symbol,
         SectionIndex <= ELF::SHN_HIRESERVE)
       return std::string("RSV[0x") +
              to_string(format_hex_no_prefix(SectionIndex, 4)) + "]";
-    // A normal section with an index
-    return to_string(format_decimal(SectionIndex, 3));
+    break;
   }
+
+  std::string Extra;
+  if (ExtraSymInfo) {
+    auto Sec = this->Obj.getSection(SectionIndex);
+    if (!Sec) {
+      this->reportUniqueWarning(Sec.takeError());
----------------
jh7370 wrote:

Looks like this and the below warning aren't actually tested?

https://github.com/llvm/llvm-project/pull/65580


More information about the llvm-commits mailing list