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 | 6622fe7873294cf9d3879871b0119d4a75bc6dc5 (patch) | |
| tree | eb31fc39dafe45d9cedd36c2ae2b6eb0fcda1aab /llvm/lib | |
| parent | c6ac7940d924f86ebb5701d1d55bd45b83851e37 (diff) | |
| download | bcm5719-llvm-6622fe7873294cf9d3879871b0119d4a75bc6dc5.tar.gz bcm5719-llvm-6622fe7873294cf9d3879871b0119d4a75bc6dc5.zip | |
MC/Mach-O: Fix address compution for zero fill sections.
llvm-svn: 97984
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 3f40a6d6a4c..1ec1d815de4 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/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()); |

