mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 20:43:19 +00:00
LLD patch: Fix for LLD on linker scripts with empty sections
This reapplies 569cf286ff79a10126b9f20f39fa8c64df9b8b25 to the embedded LLD.
This commit is contained in:
parent
9ea23272fa
commit
fa45407e78
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…
x
Reference in New Issue
Block a user