[PATCH] D59594: [ELF] Change GOT*_FROM_END (relative to end(.got)) to GOTPLT* (start(.got.plt))
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 16:37:41 PDT 2019
MaskRay marked 2 inline comments as done.
MaskRay added inline comments.
================
Comment at: ELF/Arch/X86.cpp:196-197
const uint8_t V[] = {
0xff, 0xb3, 0x04, 0x00, 0x00, 0x00, // pushl GOTPLT+4(%ebx)
0xff, 0xa3, 0x08, 0x00, 0x00, 0x00, // jmp *GOTPLT+8(%ebx)
0x90, 0x90, 0x90, 0x90 // nop
----------------
ruiu wrote:
> Is this comment still correct? You are no longer modifying these instructions' operands, so I'm guessing they now have different operands.
`Ebx = GotPlt` now so the 4 lines below can be deleted.
================
Comment at: test/ELF/plt-i686.s:148
// DISASMSHARED-NEXT: 102f: 90 nop
-// DISASMSHARED-NEXT: 1030: ff a3 0c 30 00 00 jmpl *12300(%ebx)
+// DISASMSHARED: bar at plt:
+// DISASMSHARED-NEXT: 1030: ff a3 0c 00 00 00 jmpl *12(%ebx)
----------------
`llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp` cannot recognize our unusual GOT base (end(.got)). It is good now :)
// The jmp instruction at the beginning of each PLT entry jumps to the
// address of the base of the .got.plt section plus the immediate.
uint32_t Imm = support::endian::read32le(PltContents.data() + Byte + 2);
Result.push_back(
std::make_pair(PltSectionVA + Byte, GotPltSectionVA + Imm));
Byte += 6;
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59594/new/
https://reviews.llvm.org/D59594
More information about the llvm-commits
mailing list