[lld] r251782 - [ELF2] Revert of r251692
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 00:24:17 PST 2015
Author: grimar
Date: Mon Nov 2 02:24:16 2015
New Revision: 251782
URL: http://llvm.org/viewvc/llvm-project?rev=251782&view=rev
Log:
[ELF2] Revert of r251692
Modified:
lld/trunk/ELF/Target.cpp
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=251782&r1=251781&r2=251782&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Mon Nov 2 02:24:16 2015
@@ -228,10 +228,6 @@ void X86_64TargetInfo::writePltZeroEntry
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *GOT+16(%rip)
0x0f, 0x1f, 0x40, 0x00 // nopl 0x0(rax)
};
- // 1. NextPC = PltEntryAddr + 6,
- // GotEntryAddr - NextPC + 8 = GotEntryAddr - PltEntryAddr + 2.
- // 2. NextPC = PltEntryAddr + 6 + 6,
- // GotEntryAddr - NextPC + 16 = GotEntryAddr - PltEntryAddr + 4.
memcpy(Buf, PltData, sizeof(PltData));
write32le(Buf + 2, GotEntryAddr - PltEntryAddr + 2); // GOT+8
write32le(Buf + 8, GotEntryAddr - PltEntryAddr + 4); // GOT+16
@@ -247,12 +243,6 @@ void X86_64TargetInfo::writePltEntry(uin
};
memcpy(Buf, Inst, sizeof(Inst));
- // 1. NextPC = PltEntryAddr + 6,
- // GotEntryAddr - NextPC = GotEntryAddr - PltEntryAddr - 6.
- // 2. Index is just and index of PLT record.
- // 3. NextPC = PltEntryAddr + 6 + 5 + 5 = PltEntryAddr + 16,
- // PltEntryAddr - Index * PltEntrySize - PltZeroEntrySize - NextPC =
- // -Index * PltEntrySize - PltZeroEntrySize - 16.
write32le(Buf + 2, GotEntryAddr - PltEntryAddr - 6);
write32le(Buf + 7, Index);
write32le(Buf + 12, -Index * PltEntrySize - PltZeroEntrySize - 16);
More information about the llvm-commits
mailing list