[llvm-branch-commits] [llvm] 8dafed5 - [LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 8 08:46:47 PDT 2022
Author: Tobias Hieta
Date: 2022-07-08T17:43:05+02:00
New Revision: 8dafed566b369f5d641fe1f04c5325ec42af64e3
URL: https://github.com/llvm/llvm-project/commit/8dafed566b369f5d641fe1f04c5325ec42af64e3
DIFF: https://github.com/llvm/llvm-project/commit/8dafed566b369f5d641fe1f04c5325ec42af64e3.diff
LOG: [LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
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
Added:
Modified:
lld/COFF/PDB.cpp
llvm/include/llvm/DebugInfo/CodeView/CodeView.h
llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
Removed:
################################################################################
diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp
index 2ceb4fb98031c..9b5baa64f0373 100644
--- a/lld/COFF/PDB.cpp
+++ b/lld/COFF/PDB.cpp
@@ -811,6 +811,10 @@ void DebugSHandler::handleDebugS(SectionChunk *debugChunk) {
// 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));
diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h b/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
index d4cb6ae7a28ee..b7a3e1561a079 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
+++ b/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
@@ -330,6 +330,9 @@ enum class DebugSubsectionKind : uint32_t {
MergedAssemblyInput = 0xfc,
CoffSymbolRVA = 0xfd,
+
+ XfgHashType = 0xff,
+ XfgHashVirtual = 0x100,
};
/// Equivalent to CV_ptrtype_e.
diff --git a/llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp b/llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
index a167d45982a90..9c05d585831a9 100644
--- a/llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/FormatUtil.cpp
@@ -66,6 +66,8 @@ std::string llvm::pdb::formatChunkKind(DebugSubsectionKind Kind,
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 @@ std::string llvm::pdb::formatChunkKind(DebugSubsectionKind Kind,
"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);
More information about the llvm-branch-commits
mailing list