[llvm] r222414 - [ELF] Prevent ARM ELF object writer from generating deprecated relocation code R_ARM_PLT32

Jyoti Allur jyoti.allur at samsung.com
Wed Nov 19 21:58:11 PST 2014


Author: jyoti.allur
Date: Wed Nov 19 23:58:11 2014
New Revision: 222414

URL: http://llvm.org/viewvc/llvm-project?rev=222414&view=rev
Log:
[ELF] Prevent ARM ELF object writer from generating deprecated relocation code R_ARM_PLT32

Modified:
    llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
    llvm/trunk/test/MC/ARM/symbol-variants.s
    llvm/trunk/test/tools/llvm-readobj/reloc-types.test

Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp?rev=222414&r1=222413&r2=222414&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp Wed Nov 19 23:58:11 2014
@@ -102,7 +102,7 @@ unsigned ARMELFObjectWriter::GetRelocTyp
     case ARM::fixup_arm_uncondbl:
       switch (Modifier) {
       case MCSymbolRefExpr::VK_PLT:
-        Type = ELF::R_ARM_PLT32;
+        Type = ELF::R_ARM_CALL;
         break;
       case MCSymbolRefExpr::VK_ARM_TLSCALL:
         Type = ELF::R_ARM_TLS_CALL;

Modified: llvm/trunk/test/MC/ARM/symbol-variants.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/symbol-variants.s?rev=222414&r1=222413&r2=222414&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/symbol-variants.s (original)
+++ llvm/trunk/test/MC/ARM/symbol-variants.s Wed Nov 19 23:58:11 2014
@@ -19,8 +19,8 @@
 @ plt
 bl f04(PLT)
 bl f05(plt)
- at ARM: 10 R_ARM_PLT32 f04
- at ARM: 14 R_ARM_PLT32 f05
+ at ARM: 10 R_ARM_CALL f04
+ at ARM: 14 R_ARM_CALL f05
 @THUMB: 10 R_ARM_THM_CALL f04
 @THUMB: 14 R_ARM_THM_CALL f05
 

Modified: llvm/trunk/test/tools/llvm-readobj/reloc-types.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/reloc-types.test?rev=222414&r1=222413&r2=222414&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/reloc-types.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/reloc-types.test Wed Nov 19 23:58:11 2014
@@ -261,7 +261,6 @@ ELF-ARM: Type: R_ARM_RELATIVE (23)
 ELF-ARM: Type: R_ARM_GOTOFF32 (24)
 ELF-ARM: Type: R_ARM_BASE_PREL (25)
 ELF-ARM: Type: R_ARM_GOT_BREL (26)
-ELF-ARM: Type: R_ARM_PLT32 (27)
 ELF-ARM: Type: R_ARM_CALL (28)
 ELF-ARM: Type: R_ARM_JUMP24 (29)
 ELF-ARM: Type: R_ARM_THM_JUMP24 (30)





More information about the llvm-commits mailing list