authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-12-26 17:08:14-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-01 17:51:21-07:00
logb8a8fb927b791b369234012a3d4ff5e2c4c466c9
treee0c954cc266992d701f808503b472db1a6e98150
parent4c07d41b52d3acdfe81e4712526e60cef78484ab

link.File.Elf: bump 32-bit image_base default to 64K

Now that we always pass --image-base to LLD, including when Zig chooses the default value, LLD is complaining about 32-bit architectures because it requires being at least equal to the max page size, which is 64K.

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

src/link/Elf.zig+1-1
...@@ -294,7 +294,7 @@ pub fn createEmpty(...@@ -294,7 +294,7 @@ pub fn createEmpty(
294 if (is_dyn_lib) break :b 0;294 if (is_dyn_lib) break :b 0;
295 if (output_mode == .Exe and comp.config.pie) break :b 0;295 if (output_mode == .Exe and comp.config.pie) break :b 0;
296 break :b options.image_base orelse switch (ptr_width) {296 break :b options.image_base orelse switch (ptr_width) {
297 .p32 => 0x1000,297 .p32 => 0x10000,
298 .p64 => 0x1000000,298 .p64 => 0x1000000,
299 };299 };
300 },300 },