[PATCH] D89921: [LLD] [COFF] Align all debug directories
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 10:50:52 PST 2020
rnk added inline comments.
================
Comment at: lld/COFF/Writer.cpp:988
+ for (std::pair<COFF::DebugType, Chunk *> r : debugRecords) {
+ r.second->setAlignment(4);
+ debugInfoSec->addChunk(r.second);
----------------
penzn wrote:
> Do we need "less than four" check? To be honest, I've lifted that from `createGuardCFTable`, and either way wold work for the issue we are fixing. I don't think `/align` flag would affect the alignment on this level.
I don't think so. So far there are at most two kinds of sections here, just the two added above. They both need 4 byte alignment, and can't receive a higher alignment from anywhere else. We need to be careful in the cfguard code because we are adjusting the alignment of user-provided sections, so they could've requested a 4k alignment, for example, and we wouldn't want to reduce it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89921/new/
https://reviews.llvm.org/D89921
More information about the llvm-commits
mailing list