[lld] r278470 - Rename getSizeOfHeaders -> getHeaderSize.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 21:00:23 PDT 2016
Author: ruiu
Date: Thu Aug 11 23:00:22 2016
New Revision: 278470
URL: http://llvm.org/viewvc/llvm-project?rev=278470&view=rev
Log:
Rename getSizeOfHeaders -> getHeaderSize.
We have getSectionSize for SIZEOF command. So, I think
getHeaderSize is a better name for SIZEOF_HEADERS.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=278470&r1=278469&r2=278470&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Aug 11 23:00:22 2016
@@ -362,7 +362,7 @@ template <class ELFT> void LinkerScript<
}
// Assign addresses as instructed by linker script SECTIONS sub-commands.
- Dot = getSizeOfHeaders();
+ Dot = getHeaderSize();
uintX_t MinVA = std::numeric_limits<uintX_t>::max();
uintX_t ThreadBssOffset = 0;
@@ -536,7 +536,7 @@ typename ELFT::uint LinkerScript<ELFT>::
}
template <class ELFT>
-typename ELFT::uint LinkerScript<ELFT>::getSizeOfHeaders() {
+typename ELFT::uint LinkerScript<ELFT>::getHeaderSize() {
return Out<ELFT>::ElfHeader->getSize() + Out<ELFT>::ProgramHeaders->getSize();
}
@@ -1036,16 +1036,16 @@ static uint64_t getSectionSize(StringRef
}
}
-static uint64_t getSizeOfHeaders() {
+static uint64_t getHeaderSize() {
switch (Config->EKind) {
case ELF32LEKind:
- return Script<ELF32LE>::X->getSizeOfHeaders();
+ return Script<ELF32LE>::X->getHeaderSize();
case ELF32BEKind:
- return Script<ELF32BE>::X->getSizeOfHeaders();
+ return Script<ELF32BE>::X->getHeaderSize();
case ELF64LEKind:
- return Script<ELF64LE>::X->getSizeOfHeaders();
+ return Script<ELF64LE>::X->getHeaderSize();
case ELF64BEKind:
- return Script<ELF64BE>::X->getSizeOfHeaders();
+ return Script<ELF64BE>::X->getHeaderSize();
default:
llvm_unreachable("unsupported target");
}
@@ -1200,7 +1200,7 @@ Expr ScriptParser::readPrimary() {
return [=](uint64_t Dot) { return getSectionSize(Name); };
}
if (Tok == "SIZEOF_HEADERS")
- return [=](uint64_t Dot) { return getSizeOfHeaders(); };
+ return [=](uint64_t Dot) { return getHeaderSize(); };
// Parse a symbol name or a number literal.
uint64_t V = 0;
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=278470&r1=278469&r2=278470&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Thu Aug 11 23:00:22 2016
@@ -151,7 +151,7 @@ public:
int compareSections(StringRef A, StringRef B);
bool hasPhdrsCommands();
uintX_t getOutputSectionSize(StringRef Name);
- uintX_t getSizeOfHeaders();
+ uintX_t getHeaderSize();
std::vector<OutputSectionBase<ELFT> *> *OutputSections;
More information about the llvm-commits
mailing list