summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-08-02 10:59:28 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-08-02 10:59:28 +0000
commit6fe30771aacb605131f749231060fc9b10aca751 (patch)
tree58ab2ffd048054e233a1e3dbc6de761bdc9bc059
parent090d58b2b5602f38814beaf014dada95fc026880 (diff)
downloadbcm5719-llvm-6fe30771aacb605131f749231060fc9b10aca751.tar.gz
bcm5719-llvm-6fe30771aacb605131f749231060fc9b10aca751.zip
[LLD][ELF] - Simplify. NFC.
isHeaderSection can be useful I believe, but probably not right now and not for this case. llvm-svn: 338699
-rw-r--r--lld/ELF/LinkerScript.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 52a46e66320..d94970e4847 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -751,10 +751,6 @@ MemoryRegion *LinkerScript::findMemoryRegion(OutputSection *Sec) {
return nullptr;
}
-static bool isHeaderSection(OutputSection *Sec) {
- return Sec == Out::ElfHeader || Sec == Out::ProgramHeaders;
-}
-
static OutputSection *findFirstSection(PhdrEntry *Load) {
for (OutputSection *Sec : OutputSections)
if (Sec->PtLoad == Load)
@@ -790,8 +786,7 @@ void LinkerScript::assignOffsets(OutputSection *Sec) {
// This, however, should only be done by the first "non-header" section
// in the segment.
if (PhdrEntry *L = Ctx->OutSec->PtLoad)
- if ((Sec == L->FirstSec) ||
- (isHeaderSection(L->FirstSec) && (Sec == findFirstSection(L))))
+ if (Sec == findFirstSection(L))
L->LMAOffset = Ctx->LMAOffset;
// We can call this method multiple times during the creation of
OpenPOWER on IntegriCloud