[PATCH] D47391: [COFF] Don't crash when emitting symbol table for SafeSEH input files
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 25 15:12:55 PDT 2018
rnk added inline comments.
================
Comment at: COFF/Writer.cpp:614
if (auto *D = dyn_cast<DefinedRegular>(Def))
- if (D->getChunk()->isCodeView())
+ if (D->getChunk()->isCodeView() || D->getChunk()->isSXData())
return None;
----------------
smeenai wrote:
> Does this need to be generalized to all RVA table sections, e.g. the control flow guard sections? We aren't using that right now, so it's not an immediate concern, but just wondering in general.
It does. I think these are all the cases where we pull out chunks and set them aside so they don't make it to the final output:
if (C->isCodeView())
DebugChunks.push_back(C);
else if (Config->GuardCF != GuardCFLevel::Off && Name == ".gfids$y")
GuardFidChunks.push_back(C);
else if (Config->GuardCF != GuardCFLevel::Off && Name == ".gljmp$y")
GuardLJmpChunks.push_back(C);
else if (Name == ".sxdata")
SXDataChunks.push_back(C);
They are still marked as "live" so we can figure out which debug info (or RVA tables) to toss and which to keep, but none of them will ever make it into the output.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D47391
More information about the llvm-commits
mailing list