mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 08:33:06 +00:00
Fix for LLD on linker scripts with empty sections
This commit is contained in:
parent
522b431057
commit
569cf286ff
2
deps/lld/ELF/LinkerScript.cpp
vendored
2
deps/lld/ELF/LinkerScript.cpp
vendored
@ -751,7 +751,7 @@ void LinkerScript::adjustSectionsAfterSorting() {
|
||||
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base)) {
|
||||
Cmd->MemRegion = findMemoryRegion(Cmd);
|
||||
// Handle align (e.g. ".foo : ALIGN(16) { ... }").
|
||||
if (Cmd->AlignExpr)
|
||||
if (Cmd->AlignExpr && Cmd->Sec)
|
||||
Cmd->Sec->updateAlignment(Cmd->AlignExpr().getValue());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user