authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-09 23:58:46+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-16 19:33:05+02:00
logb3f40c35dc0bc4a09124918da3651bbae823b4a6
tree4609a5d48af0b97d8b86b008411ca1c9319d7009
parent67a02bee2c75faba31bf3f11fb59f7b7b8c2b9ea

elf: fix testTlsOffsetAlignment test


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

test/link/elf.zig+3-6
...@@ -93,8 +93,7 @@ pub fn build(b: *Build) void {...@@ -93,8 +93,7 @@ pub fn build(b: *Build) void {
93 elf_step.dependOn(testTlsLdNoPlt(b, .{ .target = glibc_target }));93 elf_step.dependOn(testTlsLdNoPlt(b, .{ .target = glibc_target }));
94 // https://github.com/ziglang/zig/issues/1743094 // https://github.com/ziglang/zig/issues/17430
95 // elf_step.dependOn(testTlsNoPic(b, .{ .target = glibc_target }));95 // elf_step.dependOn(testTlsNoPic(b, .{ .target = glibc_target }));
96 // TODO96 elf_step.dependOn(testTlsOffsetAlignment(b, .{ .target = glibc_target }));
97 // elf_step.dependOn(testTlsOffsetAlignment(b, .{ .target = glibc_target }));
98 elf_step.dependOn(testTlsPic(b, .{ .target = glibc_target }));97 elf_step.dependOn(testTlsPic(b, .{ .target = glibc_target }));
99 elf_step.dependOn(testTlsSmallAlignment(b, .{ .target = glibc_target }));98 elf_step.dependOn(testTlsSmallAlignment(b, .{ .target = glibc_target }));
100 elf_step.dependOn(testWeakExports(b, .{ .target = glibc_target }));99 elf_step.dependOn(testWeakExports(b, .{ .target = glibc_target }));
...@@ -2464,7 +2463,7 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {...@@ -2464,7 +2463,7 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {
2464 \\void *(*verify)(void *);2463 \\void *(*verify)(void *);
2465 \\2464 \\
2466 \\int main() {2465 \\int main() {
2467 \\ void *handle = dlopen("a.so", RTLD_NOW);2466 \\ void *handle = dlopen("liba.so", RTLD_NOW);
2468 \\ assert(handle);2467 \\ assert(handle);
2469 \\ *(void**)(&verify) = dlsym(handle, "verify");2468 \\ *(void**)(&verify) = dlsym(handle, "verify");
2470 \\ assert(verify);2469 \\ assert(verify);
...@@ -2477,10 +2476,8 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {...@@ -2477,10 +2476,8 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {
2477 \\ pthread_join(thread, NULL);2476 \\ pthread_join(thread, NULL);
2478 \\}2477 \\}
2479 , &.{});2478 , &.{});
2480 exe.linkLibrary(dso);2479 exe.addRPath(dso.getEmittedBinDirectory());
2481 exe.linkLibC();2480 exe.linkLibC();
2482 exe.linkSystemLibrary2("dl", .{});
2483 exe.linkSystemLibrary2("pthread", .{});
2484 exe.force_pic = true;2481 exe.force_pic = true;
24852482
2486 const run = addRunArtifact(exe);2483 const run = addRunArtifact(exe);