[ELF] Clarify the first entry of .got.plt NFC
Differential Revision: https://reviews.llvm.org/D47053
GitOrigin-RevId: 3a4615c0fe985fe7b971bf5c067ff0f7ce5e3d10
diff --git a/ELF/Arch/X86_64.cpp b/ELF/Arch/X86_64.cpp
index c28e01e..de45901 100644
--- a/ELF/Arch/X86_64.cpp
+++ b/ELF/Arch/X86_64.cpp
@@ -403,10 +403,10 @@
}
void X86_64::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 before Aug 2021 used the entry 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, mainPart->dynamic->getVA());
}