summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorDmitry Mikulin <dmitry.mikulin@sony.com>2017-05-24 16:48:31 +0000
committerDmitry Mikulin <dmitry.mikulin@sony.com>2017-05-24 16:48:31 +0000
commitfd0c844fbb86f964ac7d0054557683217518cf9a (patch)
tree35cd947b3ae768479106603cc2001758718c06b5 /lld/ELF/LinkerScript.cpp
parent50a17397242b22e8c8830fb04b815eee6a2ed0e1 (diff)
downloadbcm5719-llvm-fd0c844fbb86f964ac7d0054557683217518cf9a.tar.gz
bcm5719-llvm-fd0c844fbb86f964ac7d0054557683217518cf9a.zip
Do not track section types of previous sections, always use PROGBITS for dummy sections.
Fix for PR33029. llvm-svn: 303770
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index e3c08a34246..6eed99db3d7 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -684,7 +684,6 @@ void LinkerScript::adjustSectionsBeforeSorting() {
// '.' is assigned to, but creating these section should not have any bad
// consequeces and gives us a section to put the symbol in.
uint64_t Flags = SHF_ALLOC;
- uint32_t Type = SHT_PROGBITS;
for (int I = 0, E = Opt.Commands.size(); I != E; ++I) {
auto *Cmd = dyn_cast<OutputSectionCommand>(Opt.Commands[I]);
@@ -692,14 +691,13 @@ void LinkerScript::adjustSectionsBeforeSorting() {
continue;
if (OutputSection *Sec = Cmd->Sec) {
Flags = Sec->Flags;
- Type = Sec->Type;
continue;
}
if (isAllSectionDescription(*Cmd))
continue;
- auto *OutSec = make<OutputSection>(Cmd->Name, Type, Flags);
+ auto *OutSec = make<OutputSection>(Cmd->Name, SHT_PROGBITS, Flags);
OutSec->SectionIndex = I;
OutputSections->push_back(OutSec);
Cmd->Sec = OutSec;
OpenPOWER on IntegriCloud