[lld] [llvm] [lld][COFF] Remove duplicate strtab entries (PR #141197)

Haohai Wen via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 23:58:30 PDT 2025


================
@@ -121,7 +121,7 @@ void COFFWriter::layoutSections() {
 Expected<size_t> COFFWriter::finalizeStringTable() {
   for (const auto &S : Obj.getSections())
     if (S.Name.size() > COFF::NameSize)
-      StrTabBuilder.add(S.Name);
+      StrTabBuilder.add(S.Name, /*Priority=*/UINT8_MAX);
----------------
HaohaiWen wrote:

This is the same potential issue like https://github.com/llvm/llvm-project/commit/4d2eda2bb3156cee63ea486be34b01164b178e10.
We need to put long section name in the front of string table.

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


More information about the llvm-commits mailing list