[lld] r269361 - This reverts commit r269359 and r269360.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 14:51:16 PDT 2016


Author: rafael
Date: Thu May 12 16:51:16 2016
New Revision: 269361

URL: http://llvm.org/viewvc/llvm-project?rev=269361&view=rev
Log:
This reverts commit r269359 and r269360.

I will commit again with a fixed commit message.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=269361&r1=269360&r2=269361&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu May 12 16:51:16 2016
@@ -69,8 +69,7 @@ private:
 
   void scanRelocs(InputSection<ELFT> &C);
   void scanRelocs(InputSectionBase<ELFT> &S, const Elf_Shdr &RelSec);
-  RelExpr adjustExpr(const elf::ObjectFile<ELFT> &File, SymbolBody &S,
-                     bool IsWrite, RelExpr Expr, uint32_t Type);
+  RelExpr adjustExpr(SymbolBody &S, bool IsWrite, RelExpr Expr, uint32_t Type);
   void createPhdrs();
   void assignAddresses();
   void assignFileOffsets();
@@ -514,11 +513,8 @@ static RelExpr fromPlt(RelExpr Expr) {
 }
 
 template <class ELFT>
-RelExpr Writer<ELFT>::adjustExpr(const elf::ObjectFile<ELFT> &File,
-                                 SymbolBody &Body, bool IsWrite, RelExpr Expr,
+RelExpr Writer<ELFT>::adjustExpr(SymbolBody &Body, bool IsWrite, RelExpr Expr,
                                  uint32_t Type) {
-  if (Target->needsThunk(Type, File, Body))
-    return R_THUNK;
   bool Preemptible = Body.isPreemptible();
   if (Body.isGnuIFunc())
     Expr = toPlt(Expr);
@@ -618,7 +614,7 @@ void Writer<ELFT>::scanRelocs(InputSecti
       continue;
 
     bool Preemptible = Body.isPreemptible();
-    Expr = adjustExpr(File, Body, IsWrite, Expr, Type);
+    Expr = adjustExpr(Body, IsWrite, Expr, Type);
     if (HasError)
       continue;
 
@@ -683,8 +679,8 @@ void Writer<ELFT>::scanRelocs(InputSecti
       continue;
     }
 
-    if (Expr == R_THUNK) {
-      C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
+    if (Target->needsThunk(Type, File, Body)) {
+      C.Relocations.push_back({R_THUNK, Type, Offset, Addend, &Body});
       continue;
     }
 




More information about the llvm-commits mailing list