[PATCH] D129378: [LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 08:51:19 PDT 2022


thieta created this revision.
thieta added reviewers: rnk, mstorsjo, aganea.
Herald added a subscriber: hiraditya.
Herald added a project: All.
thieta requested review of this revision.
Herald added a project: LLVM.

These are new debug types that ships with the latest
Windows SDK and would warn and finally fail lld-link.

The symbols seems to be related to Microsoft's XFG
which is their version of CFG. We can't handle any of
this yet, so for now we can just ignore these types
so that lld doesn't fail with a new version of Windows
SDK.

Fixes: #56285


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129378

Files:
  lld/COFF/PDB.cpp
  llvm/include/llvm/DebugInfo/CodeView/CodeView.h
  llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp


Index: llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
===================================================================
--- llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
+++ llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
@@ -66,6 +66,8 @@
       RETURN_CASE(DebugSubsectionKind, MergedAssemblyInput,
                   "merged assembly input");
       RETURN_CASE(DebugSubsectionKind, CoffSymbolRVA, "coff symbol rva");
+      RETURN_CASE(DebugSubsectionKind, XfgHashType, "xfg hash type");
+      RETURN_CASE(DebugSubsectionKind, XfgHashVirtual, "xfg hash virtual");
     }
   } else {
     switch (Kind) {
@@ -89,6 +91,11 @@
                   "DEBUG_S_MERGED_ASSEMBLYINPUT");
       RETURN_CASE(DebugSubsectionKind, CoffSymbolRVA,
                   "DEBUG_S_COFF_SYMBOL_RVA");
+      RETURN_CASE(DebugSubsectionKind, XfgHashType,
+                  "DEBUG_S_XFGHASH_TYPE");
+      RETURN_CASE(DebugSubsectionKind, XfgHashVirtual,
+                  "DEBUG_S_XFGHASH_VIRTUAL");
+
     }
   }
   return formatUnknownEnum(Kind);
Index: llvm/include/llvm/DebugInfo/CodeView/CodeView.h
===================================================================
--- llvm/include/llvm/DebugInfo/CodeView/CodeView.h
+++ llvm/include/llvm/DebugInfo/CodeView/CodeView.h
@@ -330,6 +330,9 @@
   MergedAssemblyInput = 0xfc,
 
   CoffSymbolRVA = 0xfd,
+
+  XfgHashType = 0xff,
+  XfgHashVirtual = 0x100,
 };
 
 /// Equivalent to CV_ptrtype_e.
Index: lld/COFF/PDB.cpp
===================================================================
--- lld/COFF/PDB.cpp
+++ lld/COFF/PDB.cpp
@@ -811,6 +811,10 @@
       // Unclear what this is for.
       break;
 
+    case DebugSubsectionKind::XfgHashType:
+    case DebugSubsectionKind::XfgHashVirtual:
+      break;
+
     default:
       warn("ignoring unknown debug$S subsection kind 0x" +
            utohexstr(uint32_t(ss.kind())) + " in file " + toString(&file));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129378.443264.patch
Type: text/x-patch
Size: 1888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220708/9b57b6b7/attachment.bin>


More information about the llvm-commits mailing list