mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
768069ee7a
commit
f8b8ad77a8
@ -1281,17 +1281,13 @@ void MCAssembler::Finish() {
|
||||
|
||||
// Align this section if necessary by adding padding bytes to the previous
|
||||
// section.
|
||||
if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment())) {
|
||||
assert(Prev && "Missing prev section!");
|
||||
Prev->setFileSize(Prev->getFileSize() + Pad);
|
||||
if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment()))
|
||||
Address += Pad;
|
||||
}
|
||||
|
||||
SD.setAddress(Address);
|
||||
LayoutSection(SD);
|
||||
Address += SD.getSize();
|
||||
|
||||
Prev = &SD;
|
||||
}
|
||||
|
||||
DEBUG_WITH_TYPE("mc-dump", {
|
||||
|
Loading…
Reference in New Issue
Block a user