[PATCH] D47053: [ELF] Clarify the first entry of .got.plt NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 21:54:52 PDT 2018
MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
glibc sysdeps/x86_64/dl-machine.h (and on some other architectures) uses it to compute run-time load address of the shared object.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D47053
Files:
ELF/Arch/X86_64.cpp
Index: ELF/Arch/X86_64.cpp
===================================================================
--- ELF/Arch/X86_64.cpp
+++ ELF/Arch/X86_64.cpp
@@ -113,10 +113,10 @@
}
template <class ELFT> void X86_64<ELFT>::writeGotPltHeader(uint8_t *Buf) const {
- // The first entry holds the value of _DYNAMIC. It is not clear why that is
- // required, but it is documented in the psabi and the glibc dynamic linker
- // seems to use it (note that this is relevant for linking ld.so, not any
- // other program).
+ // The first entry holds the link-time address of _DYNAMIC. It is documented
+ // in the psABI and glibc dynamic linker elf_machine_dynamic uses it to
+ // compute run-time load address of the shared object (note that this is
+ // relevant for linking ld.so, not any other program).
write64le(Buf, InX::Dynamic->getVA());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47053.147440.patch
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180518/3257174f/attachment.bin>
More information about the llvm-commits
mailing list