authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-19 22:55:42-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-19 22:55:42-07:00
log669c2054a83cac594e5bbca4a7ca677e3b3a1a0d
treec73cd7810c4ebde803310d64c9b4558813fbbda9
parented1e5cb3f62e12f3939e6f20d387a5c205a44a3d

stage2: debug line nops supports bigger padding


1 files changed, 2 insertions(+), 2 deletions(-)

src/link/Elf.zig+2-2
...@@ -3037,7 +3037,7 @@ const min_nop_size = 2;...@@ -3037,7 +3037,7 @@ const min_nop_size = 2;
30373037
3038/// Writes to the file a buffer, prefixed and suffixed by the specified number of3038/// Writes to the file a buffer, prefixed and suffixed by the specified number of
3039/// bytes of NOPs. Asserts each padding size is at least `min_nop_size` and total padding bytes3039/// bytes of NOPs. Asserts each padding size is at least `min_nop_size` and total padding bytes
3040/// are less than 126,976 bytes (if this limit is ever reached, this function can be3040/// are less than 1044480 bytes (if this limit is ever reached, this function can be
3041/// improved to make more than one pwritev call, or the limit can be raised by a fixed3041/// improved to make more than one pwritev call, or the limit can be raised by a fixed
3042/// amount by increasing the length of `vecs`).3042/// amount by increasing the length of `vecs`).
3043fn pwriteDbgLineNops(3043fn pwriteDbgLineNops(
...@@ -3052,7 +3052,7 @@ fn pwriteDbgLineNops(...@@ -3052,7 +3052,7 @@ fn pwriteDbgLineNops(
30523052
3053 const page_of_nops = [1]u8{DW.LNS_negate_stmt} ** 4096;3053 const page_of_nops = [1]u8{DW.LNS_negate_stmt} ** 4096;
3054 const three_byte_nop = [3]u8{ DW.LNS_advance_pc, 0b1000_0000, 0 };3054 const three_byte_nop = [3]u8{ DW.LNS_advance_pc, 0b1000_0000, 0 };
3055 var vecs: [32]std.os.iovec_const = undefined;3055 var vecs: [256]std.os.iovec_const = undefined;
3056 var vec_index: usize = 0;3056 var vec_index: usize = 0;
3057 {3057 {
3058 var padding_left = prev_padding_size;3058 var padding_left = prev_padding_size;