From ca19c42b74e94b24f82fca95c5411557b29e1809 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 4 Aug 2020 01:39:03 -0700 Subject: [PATCH] stage2: fix updating debug line info not resizing properly --- src-self-hosted/link.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src-self-hosted/link.zig b/src-self-hosted/link.zig index c3f5146113..db879e2732 100644 --- a/src-self-hosted/link.zig +++ b/src-self-hosted/link.zig @@ -1960,6 +1960,7 @@ pub const File = struct { prev.next = src_fn.next; } next.prev = src_fn.prev; + src_fn.next = null; // Populate where it used to be with NOPs. const file_pos = debug_line_sect.sh_offset + src_fn.off; try self.pwriteWithNops(0, &[0]u8{}, src_fn.len, file_pos);