summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/std/start.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index a8109f7ed9..796df42c00 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -539,6 +539,7 @@ fn expandStackSize(phdrs: []elf.Phdr) void {
for (phdrs) |*phdr| {
switch (phdr.p_type) {
elf.PT_GNU_STACK => {
+ if (phdr.p_memsz == 0) break;
assert(phdr.p_memsz % std.mem.page_size == 0);
// Silently fail if we are unable to get limits.