[lld] r272305 - Use errorDynRel like every other target.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 13:42:05 PDT 2016


Author: rafael
Date: Thu Jun  9 15:42:04 2016
New Revision: 272305

URL: http://llvm.org/viewvc/llvm-project?rev=272305&view=rev
Log:
Use errorDynRel like every other target.

Modified:
    lld/trunk/ELF/Target.cpp
    lld/trunk/test/ELF/x86-64-dyn-rel-error.s
    lld/trunk/test/ELF/x86-64-dyn-rel-error2.s

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=272305&r1=272304&r2=272305&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Thu Jun  9 15:42:04 2016
@@ -618,7 +618,7 @@ void X86_64TargetInfo::writePlt(uint8_t
 
 uint32_t X86_64TargetInfo::getDynRel(uint32_t Type) const {
   if (Type == R_X86_64_PC32 || Type == R_X86_64_32)
-    error(getRelName(Type) + " cannot be a dynamic relocation");
+    errorDynRel(Type);
   return Type;
 }
 

Modified: lld/trunk/test/ELF/x86-64-dyn-rel-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-dyn-rel-error.s?rev=272305&r1=272304&r2=272305&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-dyn-rel-error.s (original)
+++ lld/trunk/test/ELF/x86-64-dyn-rel-error.s Thu Jun  9 15:42:04 2016
@@ -9,4 +9,4 @@ _start:
         .data
         .long bar
 
-// CHECK: R_X86_64_32 cannot be a dynamic relocation
+// CHECK: R_X86_64_32 cannot be used when making a shared object; recompile with -fPIC.

Modified: lld/trunk/test/ELF/x86-64-dyn-rel-error2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-dyn-rel-error2.s?rev=272305&r1=272304&r2=272305&view=diff
==============================================================================
--- lld/trunk/test/ELF/x86-64-dyn-rel-error2.s (original)
+++ lld/trunk/test/ELF/x86-64-dyn-rel-error2.s Thu Jun  9 15:42:04 2016
@@ -9,4 +9,4 @@ _start:
         .data
         .long bar - .
 
-// CHECK: R_X86_64_PC32 cannot be a dynamic relocation
+// CHECK: R_X86_64_PC32 cannot be used when making a shared object; recompile with -fPIC.




More information about the llvm-commits mailing list