[lld] r262017 - Fix some confusion about what can be preempted.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 06:27:48 PST 2016


Author: rafael
Date: Fri Feb 26 08:27:47 2016
New Revision: 262017

URL: http://llvm.org/viewvc/llvm-project?rev=262017&view=rev
Log:
Fix some confusion about what can be preempted.

For shared libraries we allow any weak undefined symbol to eventually be
resolved, even if we never see a definition in another .so. This matches
the behavior when handling other undefined symbols in a shared library.

For executables, we require seeing a definition in a .so or resolve it
to zero. This is also similar to how non weak symbols are handled.

Added:
    lld/trunk/test/ELF/Inputs/dynamic-reloc-weak.s
    lld/trunk/test/ELF/Inputs/plt-aarch64.s
Modified:
    lld/trunk/ELF/InputSection.cpp
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h
    lld/trunk/ELF/Target.cpp
    lld/trunk/ELF/Target.h
    lld/trunk/ELF/Writer.cpp
    lld/trunk/test/ELF/dynamic-reloc-weak.s
    lld/trunk/test/ELF/plt-aarch64.s

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Fri Feb 26 08:27:47 2016
@@ -275,7 +275,7 @@ void InputSectionBase<ELFT>::relocate(ui
     if (Target->needsPlt<ELFT>(Type, *Body)) {
       SymVA = Body->getPltVA<ELFT>();
     } else if (Target->needsGot(Type, *Body)) {
-      if (Config->EMachine == EM_MIPS && !canBePreempted(Body, true))
+      if (Config->EMachine == EM_MIPS && !canBePreempted(Body))
         // Under some conditions relocations against non-local symbols require
         // entries in the local part of MIPS GOT. In that case we need an entry
         // initialized by full address of the symbol.
@@ -289,7 +289,7 @@ void InputSectionBase<ELFT>::relocate(ui
       continue;
     } else if (Target->isTlsDynRel(Type, *Body)) {
       continue;
-    } else if (Target->isSizeRel(Type) && canBePreempted(Body, false)) {
+    } else if (Target->isSizeRel(Type) && canBePreempted(Body)) {
       // A SIZE relocation is supposed to set a symbol size, but if a symbol
       // can be preempted, the size at runtime may be different than link time.
       // If that's the case, we leave the field alone rather than filling it

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Feb 26 08:27:47 2016
@@ -176,7 +176,7 @@ template <class ELFT> void GotSection<EL
     // for detailed description:
     // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
     // As the first approach, we can just store addresses for all symbols.
-    if (Config->EMachine != EM_MIPS && canBePreempted(B, false))
+    if (Config->EMachine != EM_MIPS && canBePreempted(B))
       continue; // The dynamic linker will take care of it.
     uintX_t VA = B->getVA<ELFT>();
     write<uintX_t, ELFT::TargetEndianness, sizeof(uintX_t)>(Entry, VA);
@@ -926,7 +926,7 @@ elf2::getLocalRelTarget(const ObjectFile
 
 // Returns true if a symbol can be replaced at load-time by a symbol
 // with the same name defined in other ELF executable or DSO.
-bool elf2::canBePreempted(const SymbolBody *Body, bool NeedsGot) {
+bool elf2::canBePreempted(const SymbolBody *Body) {
   if (!Body)
     return false;  // Body is a local symbol.
   if (Body->isShared())
@@ -936,26 +936,14 @@ bool elf2::canBePreempted(const SymbolBo
     if (!Body->isWeak())
       return true;
 
-    // This is an horrible corner case. Ideally we would like to say that any
-    // undefined symbol can be preempted so that the dynamic linker has a
-    // chance of finding it at runtime.
-    //
-    // The problem is that the code sequence used to test for weak undef
-    // functions looks like
-    // if (func) func()
-    // If the code is -fPIC the first reference is a load from the got and
-    // everything works.
-    // If the code is not -fPIC there is no reasonable way to solve it:
-    // * A relocation writing to the text segment will fail (it is ro).
-    // * A copy relocation doesn't work for functions.
-    // * The trick of using a plt entry as the address would fail here since
-    //   the plt entry would have a non zero address.
-    // Since we cannot do anything better, we just resolve the symbol to 0 and
-    // don't produce a dynamic relocation.
-    //
-    // As an extra hack, assume that if we are producing a shared library the
-    // user knows what he or she is doing and can handle a dynamic relocation.
-    return Config->Shared || NeedsGot;
+    // Ideally the static linker should see a definition for every symbol, but
+    // shared object are normally allowed to have undefined references that the
+    // static linker never sees a definition for.
+    if (Config->Shared)
+      return true;
+
+    // Otherwise, just resolve to 0.
+    return false;
   }
   if (!Config->Shared)
     return false;

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Fri Feb 26 08:27:47 2016
@@ -53,7 +53,7 @@ getLocalRelTarget(const ObjectFile<ELFT>
                   const llvm::object::Elf_Rel_Impl<ELFT, IsRela> &Rel,
                   typename llvm::object::ELFFile<ELFT>::uintX_t Addend);
 
-bool canBePreempted(const SymbolBody *Body, bool NeedsGot);
+bool canBePreempted(const SymbolBody *Body);
 
 bool isValidCIdentifier(StringRef S);
 

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Fri Feb 26 08:27:47 2016
@@ -93,7 +93,7 @@ public:
   bool needsCopyRelImpl(uint32_t Type) const override;
   bool needsDynRelative(unsigned Type) const override;
   bool needsGot(uint32_t Type, SymbolBody &S) const override;
-  bool needsPltImpl(uint32_t Type, const SymbolBody &S) const override;
+  bool needsPltImpl(uint32_t Type) const override;
   void relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P,
                    uint64_t SA, uint64_t ZA = 0,
                    uint8_t *PairedLoc = nullptr) const override;
@@ -129,7 +129,7 @@ public:
   bool needsCopyRelImpl(uint32_t Type) const override;
   bool needsGot(uint32_t Type, SymbolBody &S) const override;
   bool refersToGotEntry(uint32_t Type) const override;
-  bool needsPltImpl(uint32_t Type, const SymbolBody &S) const override;
+  bool needsPltImpl(uint32_t Type) const override;
   void relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P,
                    uint64_t SA, uint64_t ZA = 0,
                    uint8_t *PairedLoc = nullptr) const override;
@@ -165,7 +165,7 @@ public:
   void writePlt(uint8_t *Buf, uint64_t GotEntryAddr, uint64_t PltEntryAddr,
                 int32_t Index, unsigned RelOff) const override;
   bool needsGot(uint32_t Type, SymbolBody &S) const override;
-  bool needsPltImpl(uint32_t Type, const SymbolBody &S) const override;
+  bool needsPltImpl(uint32_t Type) const override;
   void relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P,
                    uint64_t SA, uint64_t ZA = 0,
                    uint8_t *PairedLoc = nullptr) const override;
@@ -186,7 +186,7 @@ public:
   bool isRelRelative(uint32_t Type) const override;
   bool needsCopyRelImpl(uint32_t Type) const override;
   bool needsGot(uint32_t Type, SymbolBody &S) const override;
-  bool needsPltImpl(uint32_t Type, const SymbolBody &S) const override;
+  bool needsPltImpl(uint32_t Type) const override;
   void relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P,
                    uint64_t SA, uint64_t ZA = 0,
                    uint8_t *PairedLoc = nullptr) const override;
@@ -222,7 +222,7 @@ public:
   void writeGotHeader(uint8_t *Buf) const override;
   bool needsCopyRelImpl(uint32_t Type) const override;
   bool needsGot(uint32_t Type, SymbolBody &S) const override;
-  bool needsPltImpl(uint32_t Type, const SymbolBody &S) const override;
+  bool needsPltImpl(uint32_t Type) const override;
   void relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P,
                    uint64_t S, uint64_t ZA = 0,
                    uint8_t *PairedLoc = nullptr) const override;
@@ -294,9 +294,7 @@ bool TargetInfo::isSizeRel(uint32_t Type
 
 bool TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const { return false; }
 
-bool TargetInfo::needsPltImpl(uint32_t Type, const SymbolBody &S) const {
-  return false;
-}
+bool TargetInfo::needsPltImpl(uint32_t Type) const { return false; }
 
 bool TargetInfo::refersToGotEntry(uint32_t Type) const { return false; }
 
@@ -305,7 +303,7 @@ TargetInfo::PltNeed TargetInfo::needsPlt
                                          const SymbolBody &S) const {
   if (isGnuIFunc<ELFT>(S))
     return Plt_Explicit;
-  if (needsPltImpl(Type, S))
+  if (canBePreempted(&S) && needsPltImpl(Type))
     return Plt_Explicit;
 
   // This handles a non PIC program call to function in a shared library.
@@ -401,7 +399,7 @@ bool X86TargetInfo::isTlsDynRel(unsigned
       Type == R_386_TLS_GOTIE)
     return Config->Shared;
   if (Type == R_386_TLS_IE)
-    return canBePreempted(&S, true);
+    return canBePreempted(&S);
   return Type == R_386_TLS_GD;
 }
 
@@ -454,14 +452,14 @@ bool X86TargetInfo::needsCopyRelImpl(uin
 
 bool X86TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const {
   if (S.IsTls && Type == R_386_TLS_GD)
-    return Target->canRelaxTls(Type, &S) && canBePreempted(&S, true);
+    return Target->canRelaxTls(Type, &S) && canBePreempted(&S);
   if (Type == R_386_TLS_GOTIE || Type == R_386_TLS_IE)
     return !canRelaxTls(Type, &S);
   return Type == R_386_GOT32 || needsPlt<ELF32LE>(Type, S);
 }
 
-bool X86TargetInfo::needsPltImpl(uint32_t Type, const SymbolBody &S) const {
-  return Type == R_386_PLT32 && canBePreempted(&S, true);
+bool X86TargetInfo::needsPltImpl(uint32_t Type) const {
+  return Type == R_386_PLT32;
 }
 
 bool X86TargetInfo::isGotRelative(uint32_t Type) const {
@@ -527,9 +525,8 @@ bool X86TargetInfo::canRelaxTls(unsigned
   if (Config->Shared || (S && !S->IsTls))
     return false;
   return Type == R_386_TLS_LDO_32 || Type == R_386_TLS_LDM ||
-         Type == R_386_TLS_GD ||
-         (Type == R_386_TLS_IE && !canBePreempted(S, true)) ||
-         (Type == R_386_TLS_GOTIE && !canBePreempted(S, true));
+         Type == R_386_TLS_GD || (Type == R_386_TLS_IE && !canBePreempted(S)) ||
+         (Type == R_386_TLS_GOTIE && !canBePreempted(S));
 }
 
 bool X86TargetInfo::needsDynRelative(unsigned Type) const {
@@ -541,7 +538,7 @@ unsigned X86TargetInfo::relaxTls(uint8_t
                                  const SymbolBody *S) const {
   switch (Type) {
   case R_386_TLS_GD:
-    if (canBePreempted(S, true))
+    if (canBePreempted(S))
       relocateTlsGdToIe(Loc, BufEnd, P, SA);
     else
       relocateTlsGdToLe(Loc, BufEnd, P, SA);
@@ -725,7 +722,7 @@ bool X86_64TargetInfo::refersToGotEntry(
 
 bool X86_64TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const {
   if (Type == R_X86_64_TLSGD)
-    return Target->canRelaxTls(Type, &S) && canBePreempted(&S, true);
+    return Target->canRelaxTls(Type, &S) && canBePreempted(&S);
   if (Type == R_X86_64_GOTTPOFF)
     return !canRelaxTls(Type, &S);
   return refersToGotEntry(Type) || needsPlt<ELF64LE>(Type, S);
@@ -750,15 +747,8 @@ bool X86_64TargetInfo::isTlsDynRel(unsig
   return Type == R_X86_64_GOTTPOFF || Type == R_X86_64_TLSGD;
 }
 
-bool X86_64TargetInfo::needsPltImpl(uint32_t Type, const SymbolBody &S) const {
-  switch (Type) {
-  default:
-    return Plt_No;
-  case R_X86_64_PLT32:
-    if (canBePreempted(&S, true))
-      return true;
-    return false;
-  }
+bool X86_64TargetInfo::needsPltImpl(uint32_t Type) const {
+  return Type == R_X86_64_PLT32;
 }
 
 bool X86_64TargetInfo::isRelRelative(uint32_t Type) const {
@@ -785,7 +775,7 @@ bool X86_64TargetInfo::canRelaxTls(unsig
     return false;
   return Type == R_X86_64_TLSGD || Type == R_X86_64_TLSLD ||
          Type == R_X86_64_DTPOFF32 ||
-         (Type == R_X86_64_GOTTPOFF && !canBePreempted(S, true));
+         (Type == R_X86_64_GOTTPOFF && !canBePreempted(S));
 }
 
 // "Ulrich Drepper, ELF Handling For Thread-Local Storage" (5.5
@@ -902,7 +892,7 @@ unsigned X86_64TargetInfo::relaxTls(uint
     relocateTlsIeToLe(Loc, BufEnd, P, SA);
     return 0;
   case R_X86_64_TLSGD: {
-    if (canBePreempted(S, true))
+    if (canBePreempted(S))
       relocateTlsGdToIe(Loc, BufEnd, P, SA);
     else
       relocateTlsGdToLe(Loc, BufEnd, P, SA);
@@ -1064,11 +1054,9 @@ bool PPC64TargetInfo::needsGot(uint32_t
   }
 }
 
-bool PPC64TargetInfo::needsPltImpl(uint32_t Type, const SymbolBody &S) const {
+bool PPC64TargetInfo::needsPltImpl(uint32_t Type) const {
   // These are function calls that need to be redirected through a PLT stub.
-  if (Type == R_PPC64_REL24 && canBePreempted(&S, false))
-    return true;
-  return false;
+  return Type == R_PPC64_REL24;
 }
 
 bool PPC64TargetInfo::isRelRelative(uint32_t Type) const {
@@ -1330,7 +1318,7 @@ bool AArch64TargetInfo::needsGot(uint32_
   }
 }
 
-bool AArch64TargetInfo::needsPltImpl(uint32_t Type, const SymbolBody &S) const {
+bool AArch64TargetInfo::needsPltImpl(uint32_t Type) const {
   switch (Type) {
   default:
     return false;
@@ -1338,9 +1326,7 @@ bool AArch64TargetInfo::needsPltImpl(uin
   case R_AARCH64_CONDBR19:
   case R_AARCH64_JUMP26:
   case R_AARCH64_TSTBR14:
-    if (canBePreempted(&S, true))
-      return true;
-    return false;
+    return true;
   }
 }
 
@@ -1477,13 +1463,13 @@ bool AArch64TargetInfo::canRelaxTls(unsi
   // an executable.  And if the target is local it can also be fully relaxed to
   // Local-Exec.
   if (isTlsGlobalDynamicRel(Type))
-    return !canBePreempted(S, true);
+    return !canBePreempted(S);
 
   // Initial-Exec relocs can be relaxed to Local-Exec if the target is a local
   // symbol.
   if (Type == R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 ||
       Type == R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC)
-    return !canBePreempted(S, true);
+    return !canBePreempted(S);
 
   return false;
 }
@@ -1496,7 +1482,7 @@ unsigned AArch64TargetInfo::relaxTls(uin
   case R_AARCH64_TLSDESC_LD64_LO12_NC:
   case R_AARCH64_TLSDESC_ADD_LO12_NC:
   case R_AARCH64_TLSDESC_CALL: {
-    if (canBePreempted(S, true))
+    if (canBePreempted(S))
       fatal("Unsupported TLS optimization");
     uint64_t X = S ? S->getVA<ELF64LE>() : SA;
     relocateTlsGdToLe(Type, Loc, BufEnd, P, X);
@@ -1707,11 +1693,8 @@ bool MipsTargetInfo<ELFT>::refersToGotEn
 }
 
 template <class ELFT>
-bool MipsTargetInfo<ELFT>::needsPltImpl(uint32_t Type,
-                                        const SymbolBody &S) const {
-  if (Type == R_MIPS_26 && canBePreempted(&S, false))
-    return true;
-  return false;
+bool MipsTargetInfo<ELFT>::needsPltImpl(uint32_t Type) const {
+  return Type == R_MIPS_26;
 }
 
 template <class ELFT>

Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Fri Feb 26 08:27:47 2016
@@ -98,7 +98,7 @@ public:
 
 private:
   virtual bool needsCopyRelImpl(uint32_t Type) const;
-  virtual bool needsPltImpl(uint32_t Type, const SymbolBody &S) const;
+  virtual bool needsPltImpl(uint32_t Type) const;
 };
 
 uint64_t getPPC64TocBase();

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Feb 26 08:27:47 2016
@@ -281,7 +281,7 @@ static bool handleTlsRelocation(unsigned
       }
       return true;
     }
-    if (!canBePreempted(Body, true))
+    if (!canBePreempted(Body))
       return true;
   }
   return !Target->isTlsDynRel(Type, *Body);
@@ -335,7 +335,7 @@ void Writer<ELFT>::scanRelocs(
                                     Body, getAddend<ELFT>(RI)});
 
     // MIPS has a special rule to create GOTs for local symbols.
-    if (Config->EMachine == EM_MIPS && !canBePreempted(Body, true) &&
+    if (Config->EMachine == EM_MIPS && !canBePreempted(Body) &&
         (Type == R_MIPS_GOT16 || Type == R_MIPS_CALL16)) {
       // FIXME (simon): Do not add so many redundant entries.
       Out<ELFT>::Got->addMipsLocalEntry();
@@ -362,7 +362,7 @@ void Writer<ELFT>::scanRelocs(
       if (Body->isInPlt())
         continue;
       Out<ELFT>::Plt->addEntry(Body);
-      bool CBP = canBePreempted(Body, /*NeedsGot=*/true);
+      bool CBP = canBePreempted(Body);
       if (Target->UseLazyBinding) {
         Out<ELFT>::GotPlt->addEntry(Body);
         Out<ELFT>::RelaPlt->addReloc(
@@ -419,7 +419,7 @@ void Writer<ELFT>::scanRelocs(
         continue;
       }
 
-      bool CBP = canBePreempted(Body, /*NeedsGot=*/true);
+      bool CBP = canBePreempted(Body);
       bool Dynrel = Config->Shared && !Target->isRelRelative(Type) &&
                     !Target->isSizeRel(Type);
       if (CBP || Dynrel) {
@@ -452,7 +452,7 @@ void Writer<ELFT>::scanRelocs(
         continue;
     }
 
-    if (canBePreempted(Body, /*NeedsGot=*/false)) {
+    if (canBePreempted(Body)) {
       // We don't know anything about the finaly symbol. Just ask the dynamic
       // linker to handle the relocation for us.
       Out<ELFT>::RelaDyn->addReloc({Target->getDynRel(Type), &C, RI.r_offset,

Added: lld/trunk/test/ELF/Inputs/dynamic-reloc-weak.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/dynamic-reloc-weak.s?rev=262017&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/dynamic-reloc-weak.s (added)
+++ lld/trunk/test/ELF/Inputs/dynamic-reloc-weak.s Fri Feb 26 08:27:47 2016
@@ -0,0 +1,11 @@
+        .type sym1, at function
+        .global sym1
+sym1:
+
+        .type sym2, at function
+        .global sym2
+sym2:
+
+        .type sym3, at function
+        .global sym3
+sym3:

Added: lld/trunk/test/ELF/Inputs/plt-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/plt-aarch64.s?rev=262017&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/plt-aarch64.s (added)
+++ lld/trunk/test/ELF/Inputs/plt-aarch64.s Fri Feb 26 08:27:47 2016
@@ -0,0 +1,5 @@
+.global bar
+bar:
+
+.global weak
+weak:

Modified: lld/trunk/test/ELF/dynamic-reloc-weak.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/dynamic-reloc-weak.s?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/test/ELF/dynamic-reloc-weak.s (original)
+++ lld/trunk/test/ELF/dynamic-reloc-weak.s Fri Feb 26 08:27:47 2016
@@ -1,5 +1,5 @@
 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/dynamic-reloc-weak.s -o %t2.o
 // RUN: ld.lld -shared %t2.o -o %t2.so
 // RUN: ld.lld %t.o %t2.so -o %t
 // RUN: llvm-readobj -r  %t | FileCheck %s
@@ -19,9 +19,12 @@ _start:
         .weak sym3
         .quad sym3
 
-// Both gold and bfd ld will produce a relocation for sym1 and sym2 only. That
-// That seems odd.  If the dynamic linker must get a chance to resolve sym1
-// and sym2, that should also be the case for sym3.
+        .type sym4, at function
+        .weak sym4
+        .quad sym4
+
+// Test that we produce dynamic relocation for every weak undefined symbol
+// we found.
 
 // CHECK:      Relocations [
 // CHECK-NEXT:   Section ({{.*}}) .rela.dyn {
@@ -29,5 +32,6 @@ _start:
 // CHECK-NEXT:   }
 // CHECK-NEXT:   Section ({{.*}}) .rela.plt {
 // CHECK-NEXT:     0x{{.*}} R_X86_64_JUMP_SLOT sym2 0x0
+// CHECK-NEXT:     0x{{.*}} R_X86_64_JUMP_SLOT sym3 0x0
 // CHECK-NEXT:   }
 // CHECK-NEXT: ]

Modified: lld/trunk/test/ELF/plt-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/plt-aarch64.s?rev=262017&r1=262016&r2=262017&view=diff
==============================================================================
--- lld/trunk/test/ELF/plt-aarch64.s (original)
+++ lld/trunk/test/ELF/plt-aarch64.s Fri Feb 26 08:27:47 2016
@@ -1,5 +1,5 @@
 // RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
-// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/shared.s -o %t2.o
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/plt-aarch64.s -o %t2.o
 // RUN: ld.lld -shared %t2.o -o %t2.so
 // RUN: ld.lld -shared %t.o %t2.so -o %t.so
 // RUN: ld.lld %t.o %t2.so -o %t.exe




More information about the llvm-commits mailing list