diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-03-09 01:12:20 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-09 01:12:20 +0000 |
| commit | a9a76afd28e23c9fea2f9840d63127a3b61e96bc (patch) | |
| tree | 095e00fbe066dea3427abc233fec6168457571a1 /lib/MC/MCAssembler.cpp | |
| parent | ac291e25c71325ce8706eae08f10abb599933cfd (diff) | |
| download | external_llvm-a9a76afd28e23c9fea2f9840d63127a3b61e96bc.zip external_llvm-a9a76afd28e23c9fea2f9840d63127a3b61e96bc.tar.gz external_llvm-a9a76afd28e23c9fea2f9840d63127a3b61e96bc.tar.bz2 | |
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
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
| -rw-r--r-- | lib/MC/MCAssembler.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 4b78dc0..e2d7de9 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -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", { |
