diff options
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 9f6af981aca1..10ae27c2acc2 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -231,7 +231,7 @@ void MachObjectWriter::writeSection(const MCAsmLayout &Layout, uint64_t Start = W.OS.tell(); (void) Start; - writeWithPadding(Section.getSectionName(), 16); + writeWithPadding(Section.getName(), 16); writeWithPadding(Section.getSegmentName(), 16); if (is64Bit()) { W.write<uint64_t>(VMAddr); // address @@ -831,11 +831,11 @@ uint64_t MachObjectWriter::writeObject(MCAssembler &Asm, SectionDataFileSize = std::max(SectionDataFileSize, Address + FileSize); } - // The section data is padded to 4 bytes. + // The section data is padded to pointer size bytes. // // FIXME: Is this machine dependent? unsigned SectionDataPadding = - offsetToAlignment(SectionDataFileSize, Align(4)); + offsetToAlignment(SectionDataFileSize, is64Bit() ? Align(8) : Align(4)); SectionDataFileSize += SectionDataPadding; // Write the prolog, starting with the header and load command... |