aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Arch/X86_64.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp
index c28e01e..de45901 100644
--- a/lld/ELF/Arch/X86_64.cpp
+++ b/lld/ELF/Arch/X86_64.cpp
@@ -403,10 +403,10 @@ RelExpr X86_64::getRelExpr(RelType type, const Symbol &s,
}
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());
}