<div dir="ltr">Then "2" should be dropped from the name.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 9:03 PM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 11/18/2014 10:42 PM, Rui Ueyama wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Nov 18, 2014 at 7:51 PM, Shankar Easwaran <<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: shankare<br>
Date: Tue Nov 18 21:51:48 2014<br>
New Revision: 222312<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=222312&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=222312&view=rev</a><br>
Log:<br>
[ELF] Fix creation of segments.<br>
<br>
Linker was creating a separate output segment in some cases if input<br>
sections<br>
had huge alignments. This patch fixes the issue.<br>
<br>
Added:<br>
lld/trunk/test/elf/X86_64/<u></u>outputsegments.test<br>
Modified:<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h<br>
lld/trunk/test/elf/X86_64/<u></u>alignoffset.test<br>
lld/trunk/test/elf/phdr.test<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=222312&r1=222311&r2=222312&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>SegmentChunks.h?rev=222312&r1=<u></u>222311&r2=222312&view=diff</a><br>
<br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/SegmentChunks.h Tue Nov 18 21:51:48 2014<br>
@@ -406,6 +406,8 @@ void Segment<ELFT>::<u></u>assignFileOffsets(ui<br>
for (auto &slice : slices()) {<br>
bool isFirstSection = true;<br>
for (auto section : slice->sections()) {<br>
+ // Align fileoffset to the alignment of the section.<br>
+ fileOffset = llvm::RoundUpToAlignment(<u></u>fileOffset,<br>
section->align2());<br>
<br>
</blockquote>
Is this correct? align2 seems to imply that's an exponent. If so, it had to<br>
be used as 1 << section->align2().<br>
</blockquote></div></div>
AtomSection::appendAtom handles it and sets the align2 value after shifting.<span class="HOEnZb"><font color="#888888"><br>
<br>
Shankar Easwaran<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation<br>
<br>
</font></span></blockquote></div><br></div>