diff --git a/test/standalone/build.zig.zon b/test/standalone/build.zig.zon index acbb2155d6..981e69d915 100644 --- a/test/standalone/build.zig.zon +++ b/test/standalone/build.zig.zon @@ -139,9 +139,6 @@ .c_embed_path = .{ .path = "c_embed_path", }, - .pie = .{ - .path = "pie", - }, .issue_12706 = .{ .path = "issue_12706", }, diff --git a/test/standalone/pie/build.zig b/test/standalone/pie/build.zig deleted file mode 100644 index 79d078a9eb..0000000000 --- a/test/standalone/pie/build.zig +++ /dev/null @@ -1,26 +0,0 @@ -const std = @import("std"); - -pub fn build(b: *std.Build) void { - const test_step = b.step("test", "Test it"); - b.default_step = test_step; - - const optimize: std.builtin.OptimizeMode = .Debug; - const target = b.resolveTargetQuery(.{ - .os_tag = .linux, - .cpu_arch = .x86_64, - }); - - const main = b.addTest(.{ - .root_module = b.createModule(.{ - .root_source_file = b.path("main.zig"), - .optimize = optimize, - .target = target, - }), - }); - main.pie = true; - - const run = b.addRunArtifact(main); - run.skip_foreign_checks = true; - - test_step.dependOn(&run.step); -} diff --git a/test/standalone/pie/main.zig b/test/standalone/pie/main.zig deleted file mode 100644 index edf6a3fcaa..0000000000 --- a/test/standalone/pie/main.zig +++ /dev/null @@ -1,15 +0,0 @@ -const std = @import("std"); -const elf = std.elf; - -threadlocal var foo: u8 = 42; - -test "Check ELF header" { - // PIE executables are marked as ET_DYN, regular exes as ET_EXEC. - const header = @as(*elf.Ehdr, @ptrFromInt(std.process.getBaseAddress())); - try std.testing.expectEqual(elf.ET.DYN, header.e_type); -} - -test "TLS is initialized" { - // Ensure the TLS is initialized by the startup code. - try std.testing.expectEqual(@as(u8, 42), foo); -}