Index: lld/trunk/ELF/LinkerScript.h =================================================================== --- lld/trunk/ELF/LinkerScript.h +++ lld/trunk/ELF/LinkerScript.h @@ -86,9 +86,6 @@ // SECTIONS commands. std::vector Sections; - // Section fill attribute for each section. - llvm::StringMap> Filler; - // Used to assign addresses to sections. std::vector> Commands; Index: lld/trunk/ELF/LinkerScript.cpp =================================================================== --- lld/trunk/ELF/LinkerScript.cpp +++ lld/trunk/ELF/LinkerScript.cpp @@ -410,10 +410,11 @@ template ArrayRef LinkerScript::getFiller(StringRef Name) { - auto I = Opt.Filler.find(Name); - if (I == Opt.Filler.end()) - return {}; - return I->second; + for (const std::unique_ptr &Base : Opt.Commands) + if (auto *Cmd = dyn_cast(Base.get())) + if (Cmd->Name == Name) + return Cmd->Filler; + return {}; } // Returns the index of the given section name in linker script @@ -754,7 +755,7 @@ return; } Tok = Tok.substr(3); - Opt.Filler[OutSec] = parseHex(Tok); + Cmd->Filler = parseHex(Tok); next(); } }