diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-12-01 12:08:16 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-12-01 12:08:16 -0500 |
| commit | fa45407e78c7a20281bf063f659d74f86c127ea1 (patch) | |
| tree | 197855faee5e26d160a705f42fbd4f2260c10977 /deps/lld/ELF/LinkerScript.cpp | |
| parent | 9ea23272fac7f4580d29f7ee557108883f127a5d (diff) | |
| download | zig-fa45407e78c7a20281bf063f659d74f86c127ea1.tar.gz zig-fa45407e78c7a20281bf063f659d74f86c127ea1.zip | |
LLD patch: Fix for LLD on linker scripts with empty sections
This reapplies 569cf286ff79a10126b9f20f39fa8c64df9b8b25
to the embedded LLD.
Diffstat (limited to 'deps/lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | deps/lld/ELF/LinkerScript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/lld/ELF/LinkerScript.cpp b/deps/lld/ELF/LinkerScript.cpp index 8bdbd8db20..614f5e2c8b 100644 --- a/deps/lld/ELF/LinkerScript.cpp +++ b/deps/lld/ELF/LinkerScript.cpp @@ -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()); } } |
