mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +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
|
// Align this section if necessary by adding padding bytes to the previous
|
||||||
// section.
|
// section.
|
||||||
if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment())) {
|
if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment()))
|
||||||
assert(Prev && "Missing prev section!");
|
|
||||||
Prev->setFileSize(Prev->getFileSize() + Pad);
|
|
||||||
Address += Pad;
|
Address += Pad;
|
||||||
}
|
|
||||||
|
|
||||||
SD.setAddress(Address);
|
SD.setAddress(Address);
|
||||||
LayoutSection(SD);
|
LayoutSection(SD);
|
||||||
Address += SD.getSize();
|
Address += SD.getSize();
|
||||||
|
|
||||||
Prev = &SD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_WITH_TYPE("mc-dump", {
|
DEBUG_WITH_TYPE("mc-dump", {
|
||||||
|
Loading…
Reference in New Issue
Block a user