Skip to content

Commit 3a4615c

Browse files
committed
[ELF] Clarify the first entry of .got.plt NFC
Differential Revision: https://reviews.llvm.org/D47053
1 parent b7355ee commit 3a4615c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lld/ELF/Arch/X86_64.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ RelExpr X86_64::getRelExpr(RelType type, const Symbol &s,
403403
}
404404

405405
void X86_64::writeGotPltHeader(uint8_t *buf) const {
406-
// The first entry holds the value of _DYNAMIC. It is not clear why that is
407-
// required, but it is documented in the psabi and the glibc dynamic linker
408-
// seems to use it (note that this is relevant for linking ld.so, not any
409-
// other program).
406+
// The first entry holds the link-time address of _DYNAMIC. It is documented
407+
// in the psABI and glibc before Aug 2021 used the entry to compute run-time
408+
// load address of the shared object (note that this is relevant for linking
409+
// ld.so, not any other program).
410410
write64le(buf, mainPart->dynamic->getVA());
411411
}
412412

0 commit comments

Comments
 (0)