Rename PltZero -> PltHeader.
PltZero (or PLT[0]) was an appropriate name for the little code
we have at beginning of the PLT section when we only supported x86
since the code for x86 just fits in the first PLT slot.
It's not the case anymore. The code for ARM64 occupies first two
slots, so PltZero spans PLT[0] and PLT[1], for example.
This patch renames it to avoid confusion.
llvm-svn: 272913
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 2b180c9..a1d6f3f 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -275,8 +275,8 @@
template <class ELFT> void PltSection<ELFT>::writeTo(uint8_t *Buf) {
// At beginning of PLT, we have code to call the dynamic linker
// to resolve dynsyms at runtime. Write such code.
- Target->writePltZero(Buf);
- size_t Off = Target->PltZeroSize;
+ Target->writePltHeader(Buf);
+ size_t Off = Target->PltHeaderSize;
for (auto &I : Entries) {
const SymbolBody *B = I.first;
@@ -296,7 +296,7 @@
template <class ELFT> void PltSection<ELFT>::finalize() {
this->Header.sh_size =
- Target->PltZeroSize + Entries.size() * Target->PltEntrySize;
+ Target->PltHeaderSize + Entries.size() * Target->PltEntrySize;
}
template <class ELFT>