| author | |
| committer | |
| log | 85d87c9ca1f0c0c7fe9efa5ab54e306c6a309de3 |
| tree | a769d6746e8fac5d0b4bc9bf320a3e6e811a3fbe |
| parent | 9f84f7f921d8a74926bb2f0ca1969b7b00f08172 |
This was the cause of aarch64-windows shared libraries causing "bad image" errors
during load-time linking. I also re-enabled the tests that were surfacing this bug.5 files changed, 7 insertions(+), 23 deletions(-)
src/link/Coff.zig+7-3| ... | ... | @@ -274,11 +274,15 @@ pub fn createEmpty( |
| 274 | 274 | |
| 275 | 275 | .image_base = options.image_base orelse switch (output_mode) { |
| 276 | 276 | .Exe => switch (target.cpu.arch) { |
| 277 | .aarch64 => 0x140000000, | |
| 278 | .thumb, .x86_64, .x86 => 0x400000, | |
| 277 | .aarch64, .x86_64 => 0x140000000, | |
| 278 | .thumb, .x86 => 0x400000, | |
| 279 | else => unreachable, | |
| 280 | }, | |
| 281 | .Lib => switch (target.cpu.arch) { | |
| 282 | .aarch64, .x86_64 => 0x180000000, | |
| 283 | .thumb, .x86 => 0x10000000, | |
| 279 | 284 | else => unreachable, |
| 280 | 285 | }, |
| 281 | .Lib => 0x10000000, | |
| 282 | 286 | .Obj => 0, |
| 283 | 287 | }, |
| 284 | 288 |
test/standalone/c_compiler/build.zig-5| ... | ... | @@ -5,11 +5,6 @@ pub fn build(b: *std.Build) void { |
| 5 | 5 | const test_step = b.step("test", "Test it"); |
| 6 | 6 | b.default_step = test_step; |
| 7 | 7 | |
| 8 | if (builtin.os.tag == .windows) { | |
| 9 | // https://github.com/ziglang/zig/issues/16965 | |
| 10 | return; | |
| 11 | } | |
| 12 | ||
| 13 | 8 | add(b, test_step, "test_c_Debug", "test_cpp_Debug", .Debug); |
| 14 | 9 | add(b, test_step, "test_c_ReleaseFast", "test_cpp_ReleaseFast", .ReleaseFast); |
| 15 | 10 | add(b, test_step, "test_c_ReleaseSmall", "test_cpp_ReleaseSmall", .ReleaseSmall); |
test/standalone/coff_dwarf/build.zig-5| ... | ... | @@ -12,11 +12,6 @@ pub fn build(b: *std.Build) void { |
| 12 | 12 | else |
| 13 | 13 | b.resolveTargetQuery(.{ .os_tag = .windows }); |
| 14 | 14 | |
| 15 | if (builtin.cpu.arch == .aarch64) { | |
| 16 | // https://github.com/ziglang/zig/issues/18427 | |
| 17 | return; | |
| 18 | } | |
| 19 | ||
| 20 | 15 | const exe = b.addExecutable(.{ |
| 21 | 16 | .name = "main", |
| 22 | 17 | .root_source_file = b.path("main.zig"), |
test/standalone/load_dynamic_library/build.zig-5| ... | ... | @@ -10,11 +10,6 @@ pub fn build(b: *std.Build) void { |
| 10 | 10 | |
| 11 | 11 | if (builtin.os.tag == .wasi) return; |
| 12 | 12 | |
| 13 | if (builtin.os.tag == .windows) { | |
| 14 | // https://github.com/ziglang/zig/issues/16960 | |
| 15 | return; | |
| 16 | } | |
| 17 | ||
| 18 | 13 | const lib = b.addSharedLibrary(.{ |
| 19 | 14 | .name = "add", |
| 20 | 15 | .root_source_file = b.path("add.zig"), |
test/standalone/shared_library/build.zig-5| ... | ... | @@ -4,11 +4,6 @@ pub fn build(b: *std.Build) void { |
| 4 | 4 | const test_step = b.step("test", "Test it"); |
| 5 | 5 | b.default_step = test_step; |
| 6 | 6 | |
| 7 | if (@import("builtin").os.tag == .windows) { | |
| 8 | // https://github.com/ziglang/zig/issues/16959 | |
| 9 | return; | |
| 10 | } | |
| 11 | ||
| 12 | 7 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 13 | 8 | const target = b.graph.host; |
| 14 | 9 | const lib = b.addSharedLibrary(.{ |