<div dir="ltr">Yeah, I suspected that was the "C". I just forgot that Chunk had a subclass "SectionChunk" in the initial version.<div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 5:13 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We have a notion of "chunk" in COFF, and when we ported LLD/COFF to ELF that notion was used to represent ELF sections. After that we removed Chunk class from ELF, but we can still find remains of it in variable names. That's why it was named SC (short for section chunk).</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 4:57 PM, Sean Silva 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: silvas<br>
Date: Wed Dec 14 18:57:53 2016<br>
New Revision: 289748<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=289748&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=289748&view=rev</a><br>
Log:<br>
Rename this variable.<br>
<br>
`SC` didn't make much sense. We don't seem to have a clear convention,<br>
but `IS` sounds good here because it emphasizes that it is an input<br>
section (this is one place in the code where we are dealing with both<br>
input sections and output sections at the same time so that extra<br>
emphasis makes it a bit clearer).<br>
<br>
Modified:<br>
lld/trunk/ELF/Symbols.cpp<br>
<br>
Modified: lld/trunk/ELF/Symbols.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=289748&r1=289747&r2=289748&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/lld/trunk/ELF/Symbols.cp<wbr>p?rev=289748&r1=289747&r2=2897<wbr>48&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/Symbols.cpp (original)<br>
+++ lld/trunk/ELF/Symbols.cpp Wed Dec 14 18:57:53 2016<br>
@@ -44,17 +44,17 @@ static typename ELFT::uint getSymVA(cons<br>
}<br>
case SymbolBody::DefinedRegularKind<wbr>: {<br>
auto &D = cast<DefinedRegular<ELFT>>(Bod<wbr>y);<br>
- InputSectionBase<ELFT> *SC = D.Section;<br>
+ InputSectionBase<ELFT> *IS = D.Section;<br>
<br>
// According to the ELF spec reference to a local symbol from outside<br>
// the group are not allowed. Unfortunately .eh_frame breaks that rule<br>
// and must be treated specially. For now we just replace the symbol with<br>
// 0.<br>
- if (SC == &InputSection<ELFT>::Discarded<wbr>)<br>
+ if (IS == &InputSection<ELFT>::Discarded<wbr>)<br>
return 0;<br>
<br>
// This is an absolute symbol.<br>
- if (!SC)<br>
+ if (!IS)<br>
return D.Value;<br>
<br>
uintX_t Offset = D.Value;<br>
@@ -62,7 +62,7 @@ static typename ELFT::uint getSymVA(cons<br>
Offset += Addend;<br>
Addend = 0;<br>
}<br>
- uintX_t VA = (SC->OutSec ? SC->OutSec->Addr : 0) + SC->getOffset(Offset);<br>
+ uintX_t VA = (IS->OutSec ? IS->OutSec->Addr : 0) + IS->getOffset(Offset);<br>
if (D.isTls() && !Config->Relocatable) {<br>
if (!Out<ELFT>::TlsPhdr)<br>
fatal(toString(D.File) +<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>