update embedded LLD to 6.0.0rc2

This commit is contained in:
Andrew Kelley
2018-02-07 17:38:02 -05:00
parent aa043a6339
commit 38aed5af8b
31 changed files with 857 additions and 46 deletions

View File

@@ -709,6 +709,14 @@ OutputSection *ScriptParser::readOutputSectionDescription(StringRef OutSec) {
if (consume(">"))
Cmd->MemoryRegionName = next();
if (consume("AT")) {
expect(">");
Cmd->LMARegionName = next();
}
if (Cmd->LMAExpr && !Cmd->LMARegionName.empty())
error("section can't have both LMA and a load region");
Cmd->Phdrs = readOutputSectionPhdrs();
if (consume("="))
@@ -922,7 +930,10 @@ ByteCommand *ScriptParser::readByteCommand(StringRef Tok) {
StringRef ScriptParser::readParenLiteral() {
expect("(");
bool Orig = InExpr;
InExpr = false;
StringRef Tok = next();
InExpr = Orig;
expect(")");
return Tok;
}
@@ -1282,8 +1293,8 @@ void ScriptParser::readMemory() {
// Add the memory region to the region map.
if (Script->MemoryRegions.count(Name))
setError("region '" + Name + "' already defined");
MemoryRegion *MR = make<MemoryRegion>();
*MR = {Name, Origin, Length, Flags, NegFlags};
MemoryRegion *MR =
make<MemoryRegion>(Name, Origin, Length, Flags, NegFlags);
Script->MemoryRegions[Name] = MR;
}
}