Commit e9079cb8 by Jan Voung

Get text align in elf writer from the target asm method instead.

Rather than hard code 32. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4080 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/948343007
parent b5447a04
......@@ -225,8 +225,7 @@ void ELFObjectWriter::writeFunctionCode(const IceString &FuncName,
SectionName += "." + FuncName;
bool IsELF64 = isELF64(Ctx.getTargetArch());
const Elf64_Xword ShFlags = SHF_ALLOC | SHF_EXECINSTR;
// TODO(jvoung): Should be bundle size. Grab it from that target?
const Elf64_Xword ShAlign = 32;
const Elf64_Xword ShAlign = 1 << Asm->getBundleAlignLog2Bytes();
Section = createSection<ELFTextSection>(SectionName, SHT_PROGBITS, ShFlags,
ShAlign, 0);
Elf64_Off OffsetInFile = alignFileOffset(Section->getSectionAlign());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment