<div dir="ltr">This was: <a href="https://reviews.llvm.org/D27778">https://reviews.llvm.org/D27778</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 2:45 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 16:45:52 2016<br>
New Revision: 289733<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=289733&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=289733&view=rev</a><br>
Log:<br>
Rename InputSection.cpp:getSymVA to getRelocTargetVA.<br>
<br>
This name was really confusing because there is also another static<br>
helper Symbols.cpp:getSymVA which has the same name.<br>
<br>
Modified:<br>
lld/trunk/ELF/InputSection.cpp<br>
<br>
Modified: lld/trunk/ELF/InputSection.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=289733&r1=289732&r2=289733&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/lld/trunk/ELF/<wbr>InputSection.cpp?rev=289733&<wbr>r1=289732&r2=289733&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- lld/trunk/ELF/InputSection.cpp (original)<br>
+++ lld/trunk/ELF/InputSection.cpp Wed Dec 14 16:45:52 2016<br>
@@ -337,9 +337,9 @@ static uint64_t getAArch64UndefinedRelat<br>
}<br>
<br>
template <class ELFT><br>
-static typename ELFT::uint getSymVA(uint32_t Type, typename ELFT::uint A,<br>
- typename ELFT::uint P,<br>
- const SymbolBody &Body, RelExpr Expr) {<br>
+static typename ELFT::uint<br>
+getRelocTargetVA(uint32_t Type, typename ELFT::uint A, typename ELFT::uint P,<br>
+ const SymbolBody &Body, RelExpr Expr) {<br>
switch (Expr) {<br>
case R_HINT:<br>
case R_TLSDESC_CALL:<br>
@@ -507,7 +507,7 @@ void InputSection<ELFT>::<wbr>relocateNonAllo<br>
uint64_t SymVA = 0;<br>
if (!Sym.isTls() || Out<ELFT>::TlsPhdr)<br>
SymVA = SignExtend64<sizeof(uintX_t) * 8>(<br>
- getSymVA<ELFT>(Type, Addend, AddrLoc, Sym, R_ABS));<br>
+ getRelocTargetVA<ELFT>(Type, Addend, AddrLoc, Sym, R_ABS));<br>
Target->relocateOne(BufLoc, Type, SymVA);<br>
}<br>
}<br>
@@ -535,29 +535,29 @@ void InputSectionBase<ELFT>::<wbr>relocate(ui<br>
<br>
uintX_t AddrLoc = OutSec->Addr + Offset;<br>
RelExpr Expr = Rel.Expr;<br>
- uint64_t SymVA =<br>
- SignExtend64<Bits>(getSymVA<<wbr>ELFT>(Type, A, AddrLoc, *Rel.Sym, Expr));<br>
+ uint64_t TargetVA = SignExtend64<Bits>(<br>
+ getRelocTargetVA<ELFT>(Type, A, AddrLoc, *Rel.Sym, Expr));<br>
<br>
switch (Expr) {<br>
case R_RELAX_GOT_PC:<br>
case R_RELAX_GOT_PC_NOPIC:<br>
- Target->relaxGot(BufLoc, SymVA);<br>
+ Target->relaxGot(BufLoc, TargetVA);<br>
break;<br>
case R_RELAX_TLS_IE_TO_LE:<br>
- Target->relaxTlsIeToLe(BufLoc, Type, SymVA);<br>
+ Target->relaxTlsIeToLe(BufLoc, Type, TargetVA);<br>
break;<br>
case R_RELAX_TLS_LD_TO_LE:<br>
- Target->relaxTlsLdToLe(BufLoc, Type, SymVA);<br>
+ Target->relaxTlsLdToLe(BufLoc, Type, TargetVA);<br>
break;<br>
case R_RELAX_TLS_GD_TO_LE:<br>
case R_RELAX_TLS_GD_TO_LE_NEG:<br>
- Target->relaxTlsGdToLe(BufLoc, Type, SymVA);<br>
+ Target->relaxTlsGdToLe(BufLoc, Type, TargetVA);<br>
break;<br>
case R_RELAX_TLS_GD_TO_IE:<br>
case R_RELAX_TLS_GD_TO_IE_ABS:<br>
case R_RELAX_TLS_GD_TO_IE_PAGE_PC:<br>
case R_RELAX_TLS_GD_TO_IE_END:<br>
- Target->relaxTlsGdToIe(BufLoc, Type, SymVA);<br>
+ Target->relaxTlsGdToIe(BufLoc, Type, TargetVA);<br>
break;<br>
case R_PPC_PLT_OPD:<br>
// Patch a nop (0x60000000) to a ld.<br>
@@ -565,7 +565,7 @@ void InputSectionBase<ELFT>::<wbr>relocate(ui<br>
write32be(BufLoc + 4, 0xe8410028); // ld %r2, 40(%r1)<br>
// fallthrough<br>
default:<br>
- Target->relocateOne(BufLoc, Type, SymVA);<br>
+ Target->relocateOne(BufLoc, Type, TargetVA);<br>
break;<br>
}<br>
}<br>
<br>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>