[lld] r250167 - ELF2: Remove dead code.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 09:03:39 PDT 2015


Author: ruiu
Date: Tue Oct 13 11:03:39 2015
New Revision: 250167

URL: http://llvm.org/viewvc/llvm-project?rev=250167&view=rev
Log:
ELF2: Remove dead code.

This code is completely a stub. We can resurrect when we start working on ARM.

Modified:
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/Target.cpp
    lld/trunk/ELF/Target.h
    lld/trunk/test/elf2/incompatible.s

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=250167&r1=250166&r2=250167&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Oct 13 11:03:39 2015
@@ -60,8 +60,6 @@ static TargetInfo *createTarget() {
     return new X86TargetInfo();
   case EM_AARCH64:
     return new AArch64TargetInfo();
-  case EM_ARM:
-    return new ARMTargetInfo();
   case EM_MIPS:
     return new MipsTargetInfo();
   case EM_PPC:

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=250167&r1=250166&r2=250167&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Tue Oct 13 11:03:39 2015
@@ -454,23 +454,6 @@ void PPCTargetInfo::relocateOne(uint8_t
                                 const void *RelP, uint32_t Type,
                                 uint64_t BaseAddr, uint64_t SymVA) const {}
 
-ARMTargetInfo::ARMTargetInfo() {
-  // PCRelReloc = FIXME
-  // GotReloc = FIXME
-  VAStart = 0x8000;
-}
-void ARMTargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
-                                  uint64_t PltEntryAddr) const {}
-bool ARMTargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const {
-  return false;
-}
-bool ARMTargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const {
-  return false;
-}
-void ARMTargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd,
-                                const void *RelP, uint32_t Type,
-                                uint64_t BaseAddr, uint64_t SymVA) const {}
-
 AArch64TargetInfo::AArch64TargetInfo() {
   // PCRelReloc = FIXME
   // GotReloc = FIXME

Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=250167&r1=250166&r2=250167&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Tue Oct 13 11:03:39 2015
@@ -100,18 +100,6 @@ public:
                    uint64_t SymVA) const override;
 };
 
-class ARMTargetInfo final : public TargetInfo {
-public:
-  ARMTargetInfo();
-  void writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
-                     uint64_t PltEntryAddr) const override;
-  bool relocNeedsGot(uint32_t Type, const SymbolBody &S) const override;
-  bool relocNeedsPlt(uint32_t Type, const SymbolBody &S) const override;
-  void relocateOne(uint8_t *Buf, uint8_t *BufEnd, const void *RelP,
-                   uint32_t Type, uint64_t BaseAddr,
-                   uint64_t SymVA) const override;
-};
-
 class AArch64TargetInfo final : public TargetInfo {
 public:
   AArch64TargetInfo();

Modified: lld/trunk/test/elf2/incompatible.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/incompatible.s?rev=250167&r1=250166&r2=250167&view=diff
==============================================================================
--- lld/trunk/test/elf2/incompatible.s (original)
+++ lld/trunk/test/elf2/incompatible.s Tue Oct 13 11:03:39 2015
@@ -1,7 +1,7 @@
 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %ta.o
 // RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %tb.o
 // RUN: ld.lld2 -shared %tb.o -o %ti686.so
-// RUN: llvm-mc -filetype=obj -triple=arm-unknown-linux %s -o %tc.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tc.o
 
 // RUN: not ld.lld2 %ta.o %tb.o -o %t 2>&1 | \
 // RUN:   FileCheck --check-prefix=A-AND-B %s
@@ -55,4 +55,4 @@
 _start:
         .long foo
 
-// REQUIRES: x86,arm
+// REQUIRES: x86,aarch64




More information about the llvm-commits mailing list