diff options
author | Jacek Caban <jacek@codeweavers.com> | 2025-01-25 22:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-25 22:20:34 +0100 |
commit | 77c325b646301e394bcd89c2980b4c2da8af49cd (patch) | |
tree | 68ed78ea390f65f74f6d10a9e53c1c499878272f /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 89f2fee9f80658650524ba4fc12f01409e45000e (diff) | |
download | llvm-77c325b646301e394bcd89c2980b4c2da8af49cd.zip llvm-77c325b646301e394bcd89c2980b4c2da8af49cd.tar.gz llvm-77c325b646301e394bcd89c2980b4c2da8af49cd.tar.bz2 |
[LLD][COFF] Keep hasData true in NullChunk constructor (#124368)
`NullChunk` instances do write data, even if it's always zero. Setting
`hasData` to false causes `Writer::assignAddresses` to ignore them
when calculating `rawSize`. This typically isn't an issue, as null chunks
are usually positioned within a section, and later chunks adjust the
size accordingly.
However, on ARM64EC, the auxiliary IAT is placed at the end of the
`.rdata` section and terminates with a null chunk. As a result, `rawSize`
is never updated to account for it, and space for the null chunk is not
allocated. Consequently, when `NullChunk::writeTo` is called, it receives
an invalid pointer - either pointing to the next section or beyond the
allocated buffer.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions