<div dir="ltr">Thank you for doing this. This code is for COFF-ism where we have a relocation for offset-in-a-section (so you need to know the address of output section for a chunk.) We don't need this for ELF.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 4:19 PM, Rafael Espindola via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Tue Aug 11 18:19:06 2015<br>
New Revision: 244696<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=244696&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=244696&view=rev</a><br>
Log:<br>
Delete dead code.<br>
<br>
Modified:<br>
lld/trunk/ELF/Chunks.h<br>
lld/trunk/ELF/Writer.cpp<br>
<br>
Modified: lld/trunk/ELF/Chunks.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Chunks.h?rev=244696&r1=244695&r2=244696&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Chunks.h?rev=244696&r1=244695&r2=244696&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Chunks.h (original)<br>
+++ lld/trunk/ELF/Chunks.h Tue Aug 11 18:19:06 2015<br>
@@ -48,11 +48,6 @@ public:<br>
// It is illegal to call this function on non-section chunks.<br>
virtual StringRef getSectionName() const = 0;<br>
<br>
- // An output section has pointers to chunks in the section, and each<br>
- // chunk has a back pointer to an output section.<br>
- void setOutputSection(OutputSection *O) { Out = O; }<br>
- OutputSection *getOutputSection() { return Out; }<br>
-<br>
protected:<br>
// The VA of this chunk in the output. The writer sets a value.<br>
uint64_t VA = 0;<br>
@@ -60,9 +55,6 @@ protected:<br>
// The offset from beginning of the output file. The writer sets a value.<br>
uint64_t FileOff = 0;<br>
<br>
- // The output section for this chunk.<br>
- OutputSection *Out = nullptr;<br>
-<br>
// The alignment of this chunk. The writer uses the value.<br>
uint32_t Align = 1;<br>
};<br>
<br>
Modified: lld/trunk/ELF/Writer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=244696&r1=244695&r2=244696&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=244696&r1=244695&r2=244696&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Writer.cpp (original)<br>
+++ lld/trunk/ELF/Writer.cpp Tue Aug 11 18:19:06 2015<br>
@@ -119,7 +119,6 @@ void OutputSection::addSectionChunk(Sect<br>
typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;<br>
<br>
Chunks.push_back(C);<br>
- C->setOutputSection(this);<br>
uintX_t Off = Header.sh_size;<br>
Off = RoundUpToAlignment(Off, C->getAlign());<br>
C->setVA(Off);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>