diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-08 21:10:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-08 21:10:42 +0000 |
commit | 37fad5ce4d81fd459fafe1517d6cd17e7ab49958 (patch) | |
tree | a00cfcda678bedbf15a4b604d435e6de93bcf8b5 /lib/MC/MCAssembler.cpp | |
parent | 0ce6bd55c38b2e146b5ce887bae576ee538bb575 (diff) |
MC/Mach-O: Fix address compution for zero fill sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 3f40a6d6a4..1ec1d815de 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -1049,8 +1049,8 @@ void MCAssembler::LayoutSection(MCSectionData &SD) { // Align the fragment offset; it is safe to adjust the offset freely since // this is only in virtual sections. - uint64_t Aligned = RoundUpToAlignment(Address, ZFF.getAlignment()); - F.setOffset(Aligned - SD.getAddress()); + Address = RoundUpToAlignment(Address, ZFF.getAlignment()); + F.setOffset(Address - SD.getAddress()); // FIXME: This is misnamed. F.setFileSize(ZFF.getSize()); |