mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.
llvm-svn: 98027
This commit is contained in:
parent
d79b87c260
commit
e3986eb967
@ -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