[lld] r218418 - [AArch64] Fix an incorrect PLT entry.

Chad Rosier mcrosier at codeaurora.org
Wed Sep 24 14:52:31 PDT 2014


Author: mcrosier
Date: Wed Sep 24 16:52:31 2014
New Revision: 218418

URL: http://llvm.org/viewvc/llvm-project?rev=218418&view=rev
Log:
[AArch64] Fix an incorrect PLT entry.

This patch is difficult to test in isolation, so a subsequent patch will test
further.

Patch by Daniel Stewart <stewartd at codeaurora.org>!
Phabricator Revision: http://reviews.llvm.org/D5377

Modified:
    lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp?rev=218418&r1=218417&r2=218418&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp Wed Sep 24 16:52:31 2014
@@ -413,6 +413,7 @@ public:
     _PLT0->addReferenceELF_AArch64(R_AARCH64_LD64_GOT_LO12_NC, 8, _got1, 0);
     _PLT0->addReferenceELF_AArch64(ADD_AARCH64_GOTRELINDEX, 12, _got1, 0);
 #ifndef NDEBUG
+    _PLT0->_name = "__PLT0";
     _got0->_name = "__got0";
     _got1->_name = "__got1";
 #endif
@@ -432,7 +433,7 @@ public:
     pa->addReferenceELF_AArch64(R_AARCH64_NONE, 12, getPLT0(), 0);
     // Set the starting address of the got entry to the first instruction in
     // the plt0 entry.
-    ga->addReferenceELF_AArch64(R_AARCH64_ABS32, 0, pa, 0);
+    ga->addReferenceELF_AArch64(R_AARCH64_ABS32, 0, getPLT0(), 0);
 #ifndef NDEBUG
     ga->_name = "__got_";
     ga->_name += a->name();





More information about the llvm-commits mailing list