[lld][COFF] Fix bug causing assertion in Chunk::setAlignment
authorAndrew Ng <andrew.ng@sony.com>
Tue, 10 Jan 2023 14:03:48 +0000 (14:03 +0000)
committerAndrew Ng <andrew.ng@sony.com>
Tue, 10 Jan 2023 14:19:53 +0000 (14:19 +0000)
commit85a2f29fd485d29e6a93de6f0c2bfdc009d06a56
treeaa831717dedee314b9fedde6d0b2c0dcdc55c257
parent264976d98e785fa061ce6ac06db4a9bda2590506
[lld][COFF] Fix bug causing assertion in Chunk::setAlignment

Reinstate use of FakeSection class to avoid constructing SectionChunk
from unintialised coff_section in FakeSectionChunk constructor.

Issue was caused by commit 5a58b19f9c93f3ac51bcde318508131ae78aa10c,
"[LLD] Remove global state in lld/COFF".
lld/COFF/COFFLinkerContext.cpp
lld/COFF/COFFLinkerContext.h
lld/COFF/Chunks.h