[llvm] Add support to YAML for program headers with content. (PR #192364)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 02:37:09 PDT 2026


================
@@ -419,10 +421,13 @@ ELFState<ELFT>::ELFState(ELFYAML::Object &D, yaml::ErrorHandler EH)
                     "DWARF output");
       ImplicitSections.insert(StringRef(SecName).copy(StringAlloc));
     }
-  // TODO: Only create the .strtab here if any symbols have been requested.
-  ImplicitSections.insert(".strtab");
-  if (!SecHdrTable || !SecHdrTable->NoHeaders.value_or(false))
+  // Don't create implicit string table sections when there are no section
+  // headers (e.g., core files). The .strtab is only needed for symbols.
+  if (!SecHdrTable || !SecHdrTable->NoHeaders.value_or(false)) {
----------------
jh7370 wrote:

This seems tangential to supporting program headers with content?

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


More information about the llvm-commits mailing list