zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit b8a8fb927b791b369234012a3d4ff5e2c4c466c9 (tree)
parent 4c07d41b52d3acdfe81e4712526e60cef78484ab
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 26 Dec 2023 17:08:14 -0700

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.

Diffstat:
Msrc/link/Elf.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

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