[lld] r269360 - Handle thunks in adjustExpr.

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


Author: rafael
Date: Thu May 12 16:47:26 2016
New Revision: 269360

URL: http://llvm.org/viewvc/llvm-project?rev=269360&view=rev
Log:
Handle thunks in adjustExpr.

This is similar to the other changes this function does. With this all
Relocations.push_back calls look similar.

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=269360&r1=269359&r2=269360&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu May 12 16:47:26 2016
@@ -683,8 +683,8 @@ void Writer<ELFT>::scanRelocs(InputSecti
       continue;
     }
 
-    if (Target->needsThunk(Type, File, Body)) {
-      C.Relocations.push_back({R_THUNK, Type, Offset, Addend, &Body});
+    if (Expr == R_THUNK) {
+      C.Relocations.push_back({Expr, Type, Offset, Addend, &Body});
       continue;
     }
 




More information about the llvm-commits mailing list