[lld] [llvm] [Object][ELF] Support extended header for Object Parser in ELF (PR #162288)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 00:24:38 PDT 2025


================
@@ -3595,9 +3602,10 @@ static std::string getSectionHeadersNumString(const ELFFile<ELFT> &Obj,
 template <class ELFT>
 static std::string getSectionHeaderTableIndexString(const ELFFile<ELFT> &Obj,
                                                     StringRef FileName) {
-  const typename ELFT::Ehdr &ElfHeader = Obj.getHeader();
-  if (ElfHeader.e_shstrndx != SHN_XINDEX)
-    return to_string(ElfHeader.e_shstrndx);
+  auto strndx = Obj.getHeader().e_shstrndx;
+
----------------
MaskRay wrote:

the llvm coding style doesn't prefer a blank line between a declaration and its immediate use.

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


More information about the llvm-commits mailing list