mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Fix for LLD on linker scripts with empty sections
This commit is contained in:
parent
522b431057
commit
569cf286ff
1 changed files with 1 additions and 1 deletions
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…
Add table
Reference in a new issue