authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-12-01 12:08:16-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-12-01 12:08:16-05:00
logfa45407e78c7a20281bf063f659d74f86c127ea1
tree197855faee5e26d160a705f42fbd4f2260c10977
parent9ea23272fac7f4580d29f7ee557108883f127a5d

LLD patch: Fix for LLD on linker scripts with empty sections

This reapplies 569cf286ff79a10126b9f20f39fa8c64df9b8b25 to the embedded LLD.

1 files changed, 1 insertions(+), 1 deletions(-)

deps/lld/ELF/LinkerScript.cpp+1-1
...@@ -751,7 +751,7 @@ void LinkerScript::adjustSectionsAfterSorting() {...@@ -751,7 +751,7 @@ void LinkerScript::adjustSectionsAfterSorting() {
751 if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base)) {751 if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base)) {
752 Cmd->MemRegion = findMemoryRegion(Cmd);752 Cmd->MemRegion = findMemoryRegion(Cmd);
753 // Handle align (e.g. ".foo : ALIGN(16) { ... }").753 // Handle align (e.g. ".foo : ALIGN(16) { ... }").
754 if (Cmd->AlignExpr)754 if (Cmd->AlignExpr && Cmd->Sec)
755 Cmd->Sec->updateAlignment(Cmd->AlignExpr().getValue());755 Cmd->Sec->updateAlignment(Cmd->AlignExpr().getValue());
756 }756 }
757 }757 }