[PATCH] D35871: [PDB] Write public symbol records and the publics hash table

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 10:53:55 PDT 2017


rnk added inline comments.


================
Comment at: lld/COFF/PDB.cpp:551
+static Optional<PublicSym32> createPublic(Defined *Def) {
+  // Relative symbols are unrepresentable in a COFF symbol table.
+  // FIXME: Reconsider?
----------------
pcc wrote:
> I guess this should talk about PDBs rather than COFF symbol tables.
I changed this to check for a valid chunk instead. Absolute and synthetic symbols are a risk here because they may not have chunks, so we cannot get their OutputSection, which means they'll have no SectionIndex.


================
Comment at: lld/COFF/PDB.cpp:574
+    // Skip section symbols.
+    if (COFFRef.isSection())
+      return None;
----------------
pcc wrote:
> Can section symbols appear in `SymbolTable::Symtab`? I believe that it only contains external symbols.
I think not, this must be a hold-over from the object file iteration approach.


https://reviews.llvm.org/D35871





More information about the llvm-commits mailing list