forked from OSchip/llvm-project
parent
6cdc2c1bc8
commit
7d73564b82
|
@ -459,11 +459,9 @@ void MCAssembler::LayoutSection(MCAsmLayout &Layout,
|
||||||
// Unless this section is virtual (where we are allowed to adjust the offset
|
// Unless this section is virtual (where we are allowed to adjust the offset
|
||||||
// freely), the padding goes in the previous section.
|
// freely), the padding goes in the previous section.
|
||||||
if (!IsVirtual) {
|
if (!IsVirtual) {
|
||||||
// Find the previous non-virtual section.
|
assert(SectionOrderIndex && "Invalid initial section address!");
|
||||||
iterator it = &SD;
|
MCSectionData *Prev = Layout.getSectionOrder()[SectionOrderIndex - 1];
|
||||||
assert(it != begin() && "Invalid initial section address!");
|
Layout.setSectionFileSize(Prev, Layout.getSectionFileSize(Prev) + Pad);
|
||||||
for (--it; getBackend().isVirtualSection(it->getSection()); --it) ;
|
|
||||||
Layout.setSectionFileSize(&*it, Layout.getSectionFileSize(&*it) + Pad);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StartAddress += Pad;
|
StartAddress += Pad;
|
||||||
|
|
Loading…
Reference in New Issue