test/link/elf: remove pie hack due to QEMU bug that is now fixed

This commit is contained in:
Jakub Konka 2024-03-10 10:39:31 +01:00
parent 2cdbad6f10
commit 1a6b2e84ac

View File

@ -259,8 +259,6 @@ fn testAsNeeded(b: *Build, opts: Options) *Step {
exe.addLibraryPath(libbaz.getEmittedBinDirectory());
exe.addRPath(libbaz.getEmittedBinDirectory());
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42\n");
@ -289,8 +287,6 @@ fn testAsNeeded(b: *Build, opts: Options) *Step {
exe.addLibraryPath(libbaz.getEmittedBinDirectory());
exe.addRPath(libbaz.getEmittedBinDirectory());
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42\n");
@ -509,8 +505,6 @@ fn testCopyrel(b: *Build, opts: Options) *Step {
});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3 5\n");
@ -676,8 +670,6 @@ fn testDsoPlt(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello WORLD\n");
@ -715,8 +707,6 @@ fn testDsoUndef(b: *Build, opts: Options) *Step {
\\}
, &.{});
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectExitCode(0);
@ -1300,8 +1290,6 @@ fn testIFuncAlias(b: *Build, opts: Options) *Step {
, &.{});
exe.root_module.pic = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectExitCode(0);
@ -1416,8 +1404,6 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step {
addCSourceBytes(exe, main_c, &.{});
exe.linkLibC();
exe.link_z_lazy = true;
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello world\n");
@ -1427,8 +1413,6 @@ fn testIFuncDynamic(b: *Build, opts: Options) *Step {
const exe = addExecutable(b, opts, .{ .name = "other" });
addCSourceBytes(exe, main_c, &.{});
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello world\n");
@ -1492,8 +1476,6 @@ fn testIFuncFuncPtr(b: *Build, opts: Options) *Step {
, &.{});
exe.root_module.pic = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3\n");
@ -1523,8 +1505,6 @@ fn testIFuncNoPlt(b: *Build, opts: Options) *Step {
, &.{"-fno-plt"});
exe.root_module.pic = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello world\n");
@ -1854,8 +1834,6 @@ fn testLargeAlignmentDso(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello world");
@ -1890,8 +1868,6 @@ fn testLargeAlignmentExe(b: *Build, opts: Options) *Step {
, &.{});
exe.link_function_sections = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const check = exe.checkObject();
check.checkInSymtab();
@ -1920,8 +1896,6 @@ fn testLargeBss(b: *Build, opts: Options) *Step {
\\}
, &.{});
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectExitCode(0);
@ -2015,8 +1989,6 @@ fn testLdScript(b: *Build, opts: Options) *Step {
exe.addLibraryPath(dso.getEmittedBinDirectory());
exe.addRPath(dso.getEmittedBinDirectory());
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectExitCode(0);
@ -2368,8 +2340,6 @@ fn testPltGot(b: *Build, opts: Options) *Step {
exe.linkLibrary(dso);
exe.root_module.pic = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("Hello world\n");
@ -2772,8 +2742,6 @@ fn testTlsDso(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("5 3 5 3 5 3\n");
@ -2932,8 +2900,6 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step {
exe.linkLibrary(a_so);
exe.linkLibrary(b_so);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2 3 4 5 6\n");
@ -2947,8 +2913,6 @@ fn testTlsGdNoPlt(b: *Build, opts: Options) *Step {
exe.linkLibrary(b_so);
exe.linkLibC();
// exe.link_relax = false; // TODO
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2 3 4 5 6\n");
@ -2996,8 +2960,6 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step {
exe.addObject(b_o);
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2 3\n");
@ -3013,8 +2975,6 @@ fn testTlsGdToIe(b: *Build, opts: Options) *Step {
exe.addObject(b_o);
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2 3\n");
@ -3096,8 +3056,6 @@ fn testTlsIe(b: *Build, opts: Options) *Step {
exe.addObject(main_o);
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual(exp_stdout);
@ -3110,8 +3068,6 @@ fn testTlsIe(b: *Build, opts: Options) *Step {
exe.linkLibrary(dso);
exe.linkLibC();
// exe.link_relax = false; // TODO
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual(exp_stdout);
@ -3167,8 +3123,6 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step {
exe.addObject(c_o);
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42 1 2 3\n");
@ -3181,8 +3135,6 @@ fn testTlsLargeAlignment(b: *Build, opts: Options) *Step {
exe.addObject(b_o);
exe.addObject(c_o);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42 1 2 3\n");
@ -3216,8 +3168,6 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step {
\\}
, &.{});
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3 0 5 0 0 0\n");
@ -3240,8 +3190,6 @@ fn testTlsLargeStaticImage(b: *Build, opts: Options) *Step {
, &.{});
exe.root_module.pic = true;
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2 3 0 5\n");
@ -3286,8 +3234,6 @@ fn testTlsLd(b: *Build, opts: Options) *Step {
exe.addObject(main_o);
exe.addObject(a_o);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual(exp_stdout);
@ -3300,8 +3246,6 @@ fn testTlsLd(b: *Build, opts: Options) *Step {
exe.addObject(a_o);
exe.linkLibC();
// exe.link_relax = false; // TODO
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual(exp_stdout);
@ -3335,8 +3279,6 @@ fn testTlsLdDso(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("1 2\n");
@ -3380,8 +3322,6 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step {
exe.addObject(a_o);
exe.addObject(b_o);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3 5 3 5\n");
@ -3394,8 +3334,6 @@ fn testTlsLdNoPlt(b: *Build, opts: Options) *Step {
exe.addObject(b_o);
exe.linkLibC();
// exe.link_relax = false; // TODO
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3 5 3 5\n");
@ -3481,8 +3419,6 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {
exe.addRPath(dso.getEmittedBinDirectory());
exe.linkLibC();
exe.root_module.pic = true;
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectExitCode(0);
@ -3519,8 +3455,6 @@ fn testTlsPic(b: *Build, opts: Options) *Step {
, &.{});
exe.addObject(obj);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3 5 3 5\n");
@ -3568,8 +3502,6 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step {
exe.addObject(b_o);
exe.addObject(c_o);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42\n");
@ -3585,8 +3517,6 @@ fn testTlsSmallAlignment(b: *Build, opts: Options) *Step {
exe.addObject(c_o);
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("42\n");
@ -3737,8 +3667,6 @@ fn testWeakExports(b: *Build, opts: Options) *Step {
const exe = addExecutable(b, opts, .{ .name = "main" });
exe.addObject(obj);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const check = exe.checkObject();
check.checkInDynamicSymtab();
@ -3771,8 +3699,6 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("bar=-1\n");
@ -3789,8 +3715,6 @@ fn testWeakUndefsDso(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("bar=5\n");
@ -3905,8 +3829,6 @@ fn testZText(b: *Build, opts: Options) *Step {
, &.{});
exe.linkLibrary(dso);
exe.linkLibC();
// https://github.com/ziglang/zig/issues/17619
exe.pie = true;
const run = addRunArtifact(exe);
run.expectStdOutEqual("3\n");