| author | |
| committer | |
| log | f26459e59429c85f89c1d5db5817e64b74b0b4ee |
| tree | d372e060ed2c8c12c27cc1b28f35a2c19afdf34e |
| parent | c4519d6bbae661b2e569b9b86887020a3013414e |
29 files changed, 85 insertions(+), 85 deletions(-)
lib/std/Build/Step/CheckObject.zig+1-1| ... | @@ -2018,7 +2018,7 @@ const ElfDumper = struct { | ... | @@ -2018,7 +2018,7 @@ const ElfDumper = struct { |
| 2018 | const symtab = switch (@"type") { | 2018 | const symtab = switch (@"type") { |
| 2019 | .symtab => ctx.symtab, | 2019 | .symtab => ctx.symtab, |
| 2020 | .dysymtab => ctx.dysymtab, | 2020 | .dysymtab => ctx.dysymtab, |
| 2021 | } orelse return; | 2021 | }; |
| 2022 | 2022 | ||
| 2023 | try writer.writeAll(switch (@"type") { | 2023 | try writer.writeAll(switch (@"type") { |
| 2024 | .symtab => symtab_label, | 2024 | .symtab => symtab_label, |
test/link/elf.zig+26-26| ... | @@ -506,7 +506,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { | ... | @@ -506,7 +506,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { |
| 506 | test_step.dependOn(&run.step); | 506 | test_step.dependOn(&run.step); |
| 507 | 507 | ||
| 508 | const check = exe.checkObject(); | 508 | const check = exe.checkObject(); |
| 509 | check.checkStart(); | 509 | check.checkInHeaders(); |
| 510 | check.checkExact("section headers"); | 510 | check.checkExact("section headers"); |
| 511 | check.checkExact("name .copyrel"); | 511 | check.checkExact("name .copyrel"); |
| 512 | check.checkExact("addralign 20"); | 512 | check.checkExact("addralign 20"); |
| ... | @@ -525,7 +525,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { | ... | @@ -525,7 +525,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { |
| 525 | test_step.dependOn(&run.step); | 525 | test_step.dependOn(&run.step); |
| 526 | 526 | ||
| 527 | const check = exe.checkObject(); | 527 | const check = exe.checkObject(); |
| 528 | check.checkStart(); | 528 | check.checkInHeaders(); |
| 529 | check.checkExact("section headers"); | 529 | check.checkExact("section headers"); |
| 530 | check.checkExact("name .copyrel"); | 530 | check.checkExact("name .copyrel"); |
| 531 | check.checkExact("addralign 8"); | 531 | check.checkExact("addralign 8"); |
| ... | @@ -544,7 +544,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { | ... | @@ -544,7 +544,7 @@ fn testCopyrelAlignment(b: *Build, opts: Options) *Step { |
| 544 | test_step.dependOn(&run.step); | 544 | test_step.dependOn(&run.step); |
| 545 | 545 | ||
| 546 | const check = exe.checkObject(); | 546 | const check = exe.checkObject(); |
| 547 | check.checkStart(); | 547 | check.checkInHeaders(); |
| 548 | check.checkExact("section headers"); | 548 | check.checkExact("section headers"); |
| 549 | check.checkExact("name .copyrel"); | 549 | check.checkExact("name .copyrel"); |
| 550 | check.checkExact("addralign 100"); | 550 | check.checkExact("addralign 100"); |
| ... | @@ -815,7 +815,7 @@ fn testEntryPoint(b: *Build, opts: Options) *Step { | ... | @@ -815,7 +815,7 @@ fn testEntryPoint(b: *Build, opts: Options) *Step { |
| 815 | exe.entry = .{ .symbol_name = "foo" }; | 815 | exe.entry = .{ .symbol_name = "foo" }; |
| 816 | 816 | ||
| 817 | const check = exe.checkObject(); | 817 | const check = exe.checkObject(); |
| 818 | check.checkStart(); | 818 | check.checkInHeaders(); |
| 819 | check.checkExact("header"); | 819 | check.checkExact("header"); |
| 820 | check.checkExact("entry 1000"); | 820 | check.checkExact("entry 1000"); |
| 821 | test_step.dependOn(&check.step); | 821 | test_step.dependOn(&check.step); |
| ... | @@ -831,7 +831,7 @@ fn testEntryPoint(b: *Build, opts: Options) *Step { | ... | @@ -831,7 +831,7 @@ fn testEntryPoint(b: *Build, opts: Options) *Step { |
| 831 | exe.entry = .{ .symbol_name = "bar" }; | 831 | exe.entry = .{ .symbol_name = "bar" }; |
| 832 | 832 | ||
| 833 | const check = exe.checkObject(); | 833 | const check = exe.checkObject(); |
| 834 | check.checkStart(); | 834 | check.checkInHeaders(); |
| 835 | check.checkExact("header"); | 835 | check.checkExact("header"); |
| 836 | check.checkExact("entry 2000"); | 836 | check.checkExact("entry 2000"); |
| 837 | test_step.dependOn(&check.step); | 837 | test_step.dependOn(&check.step); |
| ... | @@ -1460,13 +1460,13 @@ fn testIFuncStaticPie(b: *Build, opts: Options) *Step { | ... | @@ -1460,13 +1460,13 @@ fn testIFuncStaticPie(b: *Build, opts: Options) *Step { |
| 1460 | test_step.dependOn(&run.step); | 1460 | test_step.dependOn(&run.step); |
| 1461 | 1461 | ||
| 1462 | const check = exe.checkObject(); | 1462 | const check = exe.checkObject(); |
| 1463 | check.checkStart(); | 1463 | check.checkInHeaders(); |
| 1464 | check.checkExact("header"); | 1464 | check.checkExact("header"); |
| 1465 | check.checkExact("type DYN"); | 1465 | check.checkExact("type DYN"); |
| 1466 | check.checkStart(); | 1466 | check.checkInHeaders(); |
| 1467 | check.checkExact("section headers"); | 1467 | check.checkExact("section headers"); |
| 1468 | check.checkExact("name .dynamic"); | 1468 | check.checkExact("name .dynamic"); |
| 1469 | check.checkStart(); | 1469 | check.checkInHeaders(); |
| 1470 | check.checkExact("section headers"); | 1470 | check.checkExact("section headers"); |
| 1471 | check.checkNotPresent("name .interp"); | 1471 | check.checkNotPresent("name .interp"); |
| 1472 | test_step.dependOn(&check.step); | 1472 | test_step.dependOn(&check.step); |
| ... | @@ -1494,7 +1494,7 @@ fn testImageBase(b: *Build, opts: Options) *Step { | ... | @@ -1494,7 +1494,7 @@ fn testImageBase(b: *Build, opts: Options) *Step { |
| 1494 | test_step.dependOn(&run.step); | 1494 | test_step.dependOn(&run.step); |
| 1495 | 1495 | ||
| 1496 | const check = exe.checkObject(); | 1496 | const check = exe.checkObject(); |
| 1497 | check.checkStart(); | 1497 | check.checkInHeaders(); |
| 1498 | check.checkExact("header"); | 1498 | check.checkExact("header"); |
| 1499 | check.checkExtract("entry {addr}"); | 1499 | check.checkExtract("entry {addr}"); |
| 1500 | check.checkComputeCompare("addr", .{ .op = .gte, .value = .{ .literal = 0x8000000 } }); | 1500 | check.checkComputeCompare("addr", .{ .op = .gte, .value = .{ .literal = 0x8000000 } }); |
| ... | @@ -1507,7 +1507,7 @@ fn testImageBase(b: *Build, opts: Options) *Step { | ... | @@ -1507,7 +1507,7 @@ fn testImageBase(b: *Build, opts: Options) *Step { |
| 1507 | exe.image_base = 0xffffffff8000000; | 1507 | exe.image_base = 0xffffffff8000000; |
| 1508 | 1508 | ||
| 1509 | const check = exe.checkObject(); | 1509 | const check = exe.checkObject(); |
| 1510 | check.checkStart(); | 1510 | check.checkInHeaders(); |
| 1511 | check.checkExact("header"); | 1511 | check.checkExact("header"); |
| 1512 | check.checkExtract("entry {addr}"); | 1512 | check.checkExtract("entry {addr}"); |
| 1513 | check.checkComputeCompare("addr", .{ .op = .gte, .value = .{ .literal = 0xffffffff8000000 } }); | 1513 | check.checkComputeCompare("addr", .{ .op = .gte, .value = .{ .literal = 0xffffffff8000000 } }); |
| ... | @@ -1937,10 +1937,10 @@ fn testLinkingC(b: *Build, opts: Options) *Step { | ... | @@ -1937,10 +1937,10 @@ fn testLinkingC(b: *Build, opts: Options) *Step { |
| 1937 | test_step.dependOn(&run.step); | 1937 | test_step.dependOn(&run.step); |
| 1938 | 1938 | ||
| 1939 | const check = exe.checkObject(); | 1939 | const check = exe.checkObject(); |
| 1940 | check.checkStart(); | 1940 | check.checkInHeaders(); |
| 1941 | check.checkExact("header"); | 1941 | check.checkExact("header"); |
| 1942 | check.checkExact("type EXEC"); | 1942 | check.checkExact("type EXEC"); |
| 1943 | check.checkStart(); | 1943 | check.checkInHeaders(); |
| 1944 | check.checkExact("section headers"); | 1944 | check.checkExact("section headers"); |
| 1945 | check.checkNotPresent("name .dynamic"); | 1945 | check.checkNotPresent("name .dynamic"); |
| 1946 | test_step.dependOn(&check.step); | 1946 | test_step.dependOn(&check.step); |
| ... | @@ -1967,10 +1967,10 @@ fn testLinkingCpp(b: *Build, opts: Options) *Step { | ... | @@ -1967,10 +1967,10 @@ fn testLinkingCpp(b: *Build, opts: Options) *Step { |
| 1967 | test_step.dependOn(&run.step); | 1967 | test_step.dependOn(&run.step); |
| 1968 | 1968 | ||
| 1969 | const check = exe.checkObject(); | 1969 | const check = exe.checkObject(); |
| 1970 | check.checkStart(); | 1970 | check.checkInHeaders(); |
| 1971 | check.checkExact("header"); | 1971 | check.checkExact("header"); |
| 1972 | check.checkExact("type EXEC"); | 1972 | check.checkExact("type EXEC"); |
| 1973 | check.checkStart(); | 1973 | check.checkInHeaders(); |
| 1974 | check.checkExact("section headers"); | 1974 | check.checkExact("section headers"); |
| 1975 | check.checkNotPresent("name .dynamic"); | 1975 | check.checkNotPresent("name .dynamic"); |
| 1976 | test_step.dependOn(&check.step); | 1976 | test_step.dependOn(&check.step); |
| ... | @@ -2055,10 +2055,10 @@ fn testLinkingZig(b: *Build, opts: Options) *Step { | ... | @@ -2055,10 +2055,10 @@ fn testLinkingZig(b: *Build, opts: Options) *Step { |
| 2055 | test_step.dependOn(&run.step); | 2055 | test_step.dependOn(&run.step); |
| 2056 | 2056 | ||
| 2057 | const check = exe.checkObject(); | 2057 | const check = exe.checkObject(); |
| 2058 | check.checkStart(); | 2058 | check.checkInHeaders(); |
| 2059 | check.checkExact("header"); | 2059 | check.checkExact("header"); |
| 2060 | check.checkExact("type EXEC"); | 2060 | check.checkExact("type EXEC"); |
| 2061 | check.checkStart(); | 2061 | check.checkInHeaders(); |
| 2062 | check.checkExact("section headers"); | 2062 | check.checkExact("section headers"); |
| 2063 | check.checkNotPresent("name .dynamic"); | 2063 | check.checkNotPresent("name .dynamic"); |
| 2064 | test_step.dependOn(&check.step); | 2064 | test_step.dependOn(&check.step); |
| ... | @@ -2075,7 +2075,7 @@ fn testNoEhFrameHdr(b: *Build, opts: Options) *Step { | ... | @@ -2075,7 +2075,7 @@ fn testNoEhFrameHdr(b: *Build, opts: Options) *Step { |
| 2075 | exe.linkLibC(); | 2075 | exe.linkLibC(); |
| 2076 | 2076 | ||
| 2077 | const check = exe.checkObject(); | 2077 | const check = exe.checkObject(); |
| 2078 | check.checkStart(); | 2078 | check.checkInHeaders(); |
| 2079 | check.checkExact("section headers"); | 2079 | check.checkExact("section headers"); |
| 2080 | check.checkNotPresent("name .eh_frame_hdr"); | 2080 | check.checkNotPresent("name .eh_frame_hdr"); |
| 2081 | test_step.dependOn(&check.step); | 2081 | test_step.dependOn(&check.step); |
| ... | @@ -2103,10 +2103,10 @@ fn testPie(b: *Build, opts: Options) *Step { | ... | @@ -2103,10 +2103,10 @@ fn testPie(b: *Build, opts: Options) *Step { |
| 2103 | test_step.dependOn(&run.step); | 2103 | test_step.dependOn(&run.step); |
| 2104 | 2104 | ||
| 2105 | const check = exe.checkObject(); | 2105 | const check = exe.checkObject(); |
| 2106 | check.checkStart(); | 2106 | check.checkInHeaders(); |
| 2107 | check.checkExact("header"); | 2107 | check.checkExact("header"); |
| 2108 | check.checkExact("type DYN"); | 2108 | check.checkExact("type DYN"); |
| 2109 | check.checkStart(); | 2109 | check.checkInHeaders(); |
| 2110 | check.checkExact("section headers"); | 2110 | check.checkExact("section headers"); |
| 2111 | check.checkExact("name .dynamic"); | 2111 | check.checkExact("name .dynamic"); |
| 2112 | test_step.dependOn(&check.step); | 2112 | test_step.dependOn(&check.step); |
| ... | @@ -2326,13 +2326,13 @@ fn testRelocatableNoEhFrame(b: *Build, opts: Options) *Step { | ... | @@ -2326,13 +2326,13 @@ fn testRelocatableNoEhFrame(b: *Build, opts: Options) *Step { |
| 2326 | obj2.addObject(obj1); | 2326 | obj2.addObject(obj1); |
| 2327 | 2327 | ||
| 2328 | const check1 = obj1.checkObject(); | 2328 | const check1 = obj1.checkObject(); |
| 2329 | check1.checkStart(); | 2329 | check1.checkInHeaders(); |
| 2330 | check1.checkExact("section headers"); | 2330 | check1.checkExact("section headers"); |
| 2331 | check1.checkNotPresent(".eh_frame"); | 2331 | check1.checkNotPresent(".eh_frame"); |
| 2332 | test_step.dependOn(&check1.step); | 2332 | test_step.dependOn(&check1.step); |
| 2333 | 2333 | ||
| 2334 | const check2 = obj2.checkObject(); | 2334 | const check2 = obj2.checkObject(); |
| 2335 | check2.checkStart(); | 2335 | check2.checkInHeaders(); |
| 2336 | check2.checkExact("section headers"); | 2336 | check2.checkExact("section headers"); |
| 2337 | check2.checkNotPresent(".eh_frame"); | 2337 | check2.checkNotPresent(".eh_frame"); |
| 2338 | test_step.dependOn(&check2.step); | 2338 | test_step.dependOn(&check2.step); |
| ... | @@ -2369,7 +2369,7 @@ fn testSharedAbsSymbol(b: *Build, opts: Options) *Step { | ... | @@ -2369,7 +2369,7 @@ fn testSharedAbsSymbol(b: *Build, opts: Options) *Step { |
| 2369 | test_step.dependOn(&run.step); | 2369 | test_step.dependOn(&run.step); |
| 2370 | 2370 | ||
| 2371 | const check = exe.checkObject(); | 2371 | const check = exe.checkObject(); |
| 2372 | check.checkStart(); | 2372 | check.checkInHeaders(); |
| 2373 | check.checkExact("header"); | 2373 | check.checkExact("header"); |
| 2374 | check.checkExact("type DYN"); | 2374 | check.checkExact("type DYN"); |
| 2375 | // TODO fix/improve in CheckObject | 2375 | // TODO fix/improve in CheckObject |
| ... | @@ -2390,7 +2390,7 @@ fn testSharedAbsSymbol(b: *Build, opts: Options) *Step { | ... | @@ -2390,7 +2390,7 @@ fn testSharedAbsSymbol(b: *Build, opts: Options) *Step { |
| 2390 | // test_step.dependOn(&run.step); | 2390 | // test_step.dependOn(&run.step); |
| 2391 | 2391 | ||
| 2392 | // const check = exe.checkObject(); | 2392 | // const check = exe.checkObject(); |
| 2393 | // check.checkStart(); | 2393 | // check.checkInHeaders(); |
| 2394 | // check.checkExact("header"); | 2394 | // check.checkExact("header"); |
| 2395 | // check.checkExact("type EXEC"); | 2395 | // check.checkExact("type EXEC"); |
| 2396 | // // TODO fix/improve in CheckObject | 2396 | // // TODO fix/improve in CheckObject |
| ... | @@ -2422,7 +2422,7 @@ fn testStrip(b: *Build, opts: Options) *Step { | ... | @@ -2422,7 +2422,7 @@ fn testStrip(b: *Build, opts: Options) *Step { |
| 2422 | exe.linkLibC(); | 2422 | exe.linkLibC(); |
| 2423 | 2423 | ||
| 2424 | const check = exe.checkObject(); | 2424 | const check = exe.checkObject(); |
| 2425 | check.checkStart(); | 2425 | check.checkInHeaders(); |
| 2426 | check.checkExact("section headers"); | 2426 | check.checkExact("section headers"); |
| 2427 | check.checkExact("name .debug_info"); | 2427 | check.checkExact("name .debug_info"); |
| 2428 | test_step.dependOn(&check.step); | 2428 | test_step.dependOn(&check.step); |
| ... | @@ -2435,7 +2435,7 @@ fn testStrip(b: *Build, opts: Options) *Step { | ... | @@ -2435,7 +2435,7 @@ fn testStrip(b: *Build, opts: Options) *Step { |
| 2435 | exe.linkLibC(); | 2435 | exe.linkLibC(); |
| 2436 | 2436 | ||
| 2437 | const check = exe.checkObject(); | 2437 | const check = exe.checkObject(); |
| 2438 | check.checkStart(); | 2438 | check.checkInHeaders(); |
| 2439 | check.checkExact("section headers"); | 2439 | check.checkExact("section headers"); |
| 2440 | check.checkNotPresent("name .debug_info"); | 2440 | check.checkNotPresent("name .debug_info"); |
| 2441 | test_step.dependOn(&check.step); | 2441 | test_step.dependOn(&check.step); |
| ... | @@ -3521,7 +3521,7 @@ fn testZStackSize(b: *Build, opts: Options) *Step { | ... | @@ -3521,7 +3521,7 @@ fn testZStackSize(b: *Build, opts: Options) *Step { |
| 3521 | exe.linkLibC(); | 3521 | exe.linkLibC(); |
| 3522 | 3522 | ||
| 3523 | const check = exe.checkObject(); | 3523 | const check = exe.checkObject(); |
| 3524 | check.checkStart(); | 3524 | check.checkInHeaders(); |
| 3525 | check.checkExact("program headers"); | 3525 | check.checkExact("program headers"); |
| 3526 | check.checkExact("type GNU_STACK"); | 3526 | check.checkExact("type GNU_STACK"); |
| 3527 | check.checkExact("memsz 800000"); | 3527 | check.checkExact("memsz 800000"); |
test/link/macho/dead_strip_dylibs/build.zig+2-2| ... | @@ -19,11 +19,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -19,11 +19,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 19 | const exe = createScenario(b, optimize, "no-dead-strip"); | 19 | const exe = createScenario(b, optimize, "no-dead-strip"); |
| 20 | 20 | ||
| 21 | const check = exe.checkObject(); | 21 | const check = exe.checkObject(); |
| 22 | check.checkStart(); | 22 | check.checkInHeaders(); |
| 23 | check.checkExact("cmd LOAD_DYLIB"); | 23 | check.checkExact("cmd LOAD_DYLIB"); |
| 24 | check.checkContains("Cocoa"); | 24 | check.checkContains("Cocoa"); |
| 25 | 25 | ||
| 26 | check.checkStart(); | 26 | check.checkInHeaders(); |
| 27 | check.checkExact("cmd LOAD_DYLIB"); | 27 | check.checkExact("cmd LOAD_DYLIB"); |
| 28 | check.checkContains("libobjc"); | 28 | check.checkContains("libobjc"); |
| 29 | 29 |
test/link/macho/dylib/build.zig+3-3| ... | @@ -25,7 +25,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -25,7 +25,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 25 | dylib.linkLibC(); | 25 | dylib.linkLibC(); |
| 26 | 26 | ||
| 27 | const check_dylib = dylib.checkObject(); | 27 | const check_dylib = dylib.checkObject(); |
| 28 | check_dylib.checkStart(); | 28 | check_dylib.checkInHeaders(); |
| 29 | check_dylib.checkExact("cmd ID_DYLIB"); | 29 | check_dylib.checkExact("cmd ID_DYLIB"); |
| 30 | check_dylib.checkExact("name @rpath/liba.dylib"); | 30 | check_dylib.checkExact("name @rpath/liba.dylib"); |
| 31 | check_dylib.checkExact("timestamp 2"); | 31 | check_dylib.checkExact("timestamp 2"); |
| ... | @@ -46,14 +46,14 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -46,14 +46,14 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 46 | exe.linkLibC(); | 46 | exe.linkLibC(); |
| 47 | 47 | ||
| 48 | const check_exe = exe.checkObject(); | 48 | const check_exe = exe.checkObject(); |
| 49 | check_exe.checkStart(); | 49 | check_exe.checkInHeaders(); |
| 50 | check_exe.checkExact("cmd LOAD_DYLIB"); | 50 | check_exe.checkExact("cmd LOAD_DYLIB"); |
| 51 | check_exe.checkExact("name @rpath/liba.dylib"); | 51 | check_exe.checkExact("name @rpath/liba.dylib"); |
| 52 | check_exe.checkExact("timestamp 2"); | 52 | check_exe.checkExact("timestamp 2"); |
| 53 | check_exe.checkExact("current version 10000"); | 53 | check_exe.checkExact("current version 10000"); |
| 54 | check_exe.checkExact("compatibility version 10000"); | 54 | check_exe.checkExact("compatibility version 10000"); |
| 55 | 55 | ||
| 56 | check_exe.checkStart(); | 56 | check_exe.checkInHeaders(); |
| 57 | check_exe.checkExact("cmd RPATH"); | 57 | check_exe.checkExact("cmd RPATH"); |
| 58 | check_exe.checkExactPath("path", dylib.getOutputDirectorySource()); | 58 | check_exe.checkExactPath("path", dylib.getOutputDirectorySource()); |
| 59 | test_step.dependOn(&check_exe.step); | 59 | test_step.dependOn(&check_exe.step); |
test/link/macho/entry/build.zig+2-2| ... | @@ -24,11 +24,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -24,11 +24,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 24 | 24 | ||
| 25 | const check_exe = exe.checkObject(); | 25 | const check_exe = exe.checkObject(); |
| 26 | 26 | ||
| 27 | check_exe.checkStart(); | 27 | check_exe.checkInHeaders(); |
| 28 | check_exe.checkExact("segname __TEXT"); | 28 | check_exe.checkExact("segname __TEXT"); |
| 29 | check_exe.checkExtract("vmaddr {vmaddr}"); | 29 | check_exe.checkExtract("vmaddr {vmaddr}"); |
| 30 | 30 | ||
| 31 | check_exe.checkStart(); | 31 | check_exe.checkInHeaders(); |
| 32 | check_exe.checkExact("cmd MAIN"); | 32 | check_exe.checkExact("cmd MAIN"); |
| 33 | check_exe.checkExtract("entryoff {entryoff}"); | 33 | check_exe.checkExtract("entryoff {entryoff}"); |
| 34 | 34 |
test/link/macho/entry_in_dylib/build.zig+3-3| ... | @@ -34,15 +34,15 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -34,15 +34,15 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 34 | exe.forceUndefinedSymbol("_my_main"); | 34 | exe.forceUndefinedSymbol("_my_main"); |
| 35 | 35 | ||
| 36 | const check_exe = exe.checkObject(); | 36 | const check_exe = exe.checkObject(); |
| 37 | check_exe.checkStart(); | 37 | check_exe.checkInHeaders(); |
| 38 | check_exe.checkExact("segname __TEXT"); | 38 | check_exe.checkExact("segname __TEXT"); |
| 39 | check_exe.checkExtract("vmaddr {text_vmaddr}"); | 39 | check_exe.checkExtract("vmaddr {text_vmaddr}"); |
| 40 | 40 | ||
| 41 | check_exe.checkStart(); | 41 | check_exe.checkInHeaders(); |
| 42 | check_exe.checkExact("sectname __stubs"); | 42 | check_exe.checkExact("sectname __stubs"); |
| 43 | check_exe.checkExtract("addr {stubs_vmaddr}"); | 43 | check_exe.checkExtract("addr {stubs_vmaddr}"); |
| 44 | 44 | ||
| 45 | check_exe.checkStart(); | 45 | check_exe.checkInHeaders(); |
| 46 | check_exe.checkExact("cmd MAIN"); | 46 | check_exe.checkExact("cmd MAIN"); |
| 47 | check_exe.checkExtract("entryoff {entryoff}"); | 47 | check_exe.checkExtract("entryoff {entryoff}"); |
| 48 | 48 |
test/link/macho/headerpad/build.zig+4-4| ... | @@ -21,7 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -21,7 +21,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 21 | exe.headerpad_max_install_names = true; | 21 | exe.headerpad_max_install_names = true; |
| 22 | 22 | ||
| 23 | const check = exe.checkObject(); | 23 | const check = exe.checkObject(); |
| 24 | check.checkStart(); | 24 | check.checkInHeaders(); |
| 25 | check.checkExact("sectname __text"); | 25 | check.checkExact("sectname __text"); |
| 26 | check.checkExtract("offset {offset}"); | 26 | check.checkExtract("offset {offset}"); |
| 27 | 27 | ||
| ... | @@ -47,7 +47,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -47,7 +47,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 47 | exe.headerpad_size = 0x10000; | 47 | exe.headerpad_size = 0x10000; |
| 48 | 48 | ||
| 49 | const check = exe.checkObject(); | 49 | const check = exe.checkObject(); |
| 50 | check.checkStart(); | 50 | check.checkInHeaders(); |
| 51 | check.checkExact("sectname __text"); | 51 | check.checkExact("sectname __text"); |
| 52 | check.checkExtract("offset {offset}"); | 52 | check.checkExtract("offset {offset}"); |
| 53 | check.checkComputeCompare("offset", .{ .op = .gte, .value = .{ .literal = 0x10000 } }); | 53 | check.checkComputeCompare("offset", .{ .op = .gte, .value = .{ .literal = 0x10000 } }); |
| ... | @@ -65,7 +65,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -65,7 +65,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 65 | exe.headerpad_size = 0x10000; | 65 | exe.headerpad_size = 0x10000; |
| 66 | 66 | ||
| 67 | const check = exe.checkObject(); | 67 | const check = exe.checkObject(); |
| 68 | check.checkStart(); | 68 | check.checkInHeaders(); |
| 69 | check.checkExact("sectname __text"); | 69 | check.checkExact("sectname __text"); |
| 70 | check.checkExtract("offset {offset}"); | 70 | check.checkExtract("offset {offset}"); |
| 71 | check.checkComputeCompare("offset", .{ .op = .gte, .value = .{ .literal = 0x10000 } }); | 71 | check.checkComputeCompare("offset", .{ .op = .gte, .value = .{ .literal = 0x10000 } }); |
| ... | @@ -83,7 +83,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -83,7 +83,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 83 | exe.headerpad_max_install_names = true; | 83 | exe.headerpad_max_install_names = true; |
| 84 | 84 | ||
| 85 | const check = exe.checkObject(); | 85 | const check = exe.checkObject(); |
| 86 | check.checkStart(); | 86 | check.checkInHeaders(); |
| 87 | check.checkExact("sectname __text"); | 87 | check.checkExact("sectname __text"); |
| 88 | check.checkExtract("offset {offset}"); | 88 | check.checkExtract("offset {offset}"); |
| 89 | 89 |
test/link/macho/needed_framework/build.zig+1-1| ... | @@ -26,7 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -26,7 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 26 | exe.dead_strip_dylibs = true; | 26 | exe.dead_strip_dylibs = true; |
| 27 | 27 | ||
| 28 | const check = exe.checkObject(); | 28 | const check = exe.checkObject(); |
| 29 | check.checkStart(); | 29 | check.checkInHeaders(); |
| 30 | check.checkExact("cmd LOAD_DYLIB"); | 30 | check.checkExact("cmd LOAD_DYLIB"); |
| 31 | check.checkContains("Cocoa"); | 31 | check.checkContains("Cocoa"); |
| 32 | test_step.dependOn(&check.step); | 32 | test_step.dependOn(&check.step); |
test/link/macho/needed_library/build.zig+1-1| ... | @@ -39,7 +39,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -39,7 +39,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 39 | exe.dead_strip_dylibs = true; | 39 | exe.dead_strip_dylibs = true; |
| 40 | 40 | ||
| 41 | const check = exe.checkObject(); | 41 | const check = exe.checkObject(); |
| 42 | check.checkStart(); | 42 | check.checkInHeaders(); |
| 43 | check.checkExact("cmd LOAD_DYLIB"); | 43 | check.checkExact("cmd LOAD_DYLIB"); |
| 44 | check.checkExact("name @rpath/liba.dylib"); | 44 | check.checkExact("name @rpath/liba.dylib"); |
| 45 | test_step.dependOn(&check.step); | 45 | test_step.dependOn(&check.step); |
test/link/macho/pagezero/build.zig+3-3| ... | @@ -20,13 +20,13 @@ pub fn build(b: *std.Build) void { | ... | @@ -20,13 +20,13 @@ pub fn build(b: *std.Build) void { |
| 20 | exe.pagezero_size = 0x4000; | 20 | exe.pagezero_size = 0x4000; |
| 21 | 21 | ||
| 22 | const check = exe.checkObject(); | 22 | const check = exe.checkObject(); |
| 23 | check.checkStart(); | 23 | check.checkInHeaders(); |
| 24 | check.checkExact("LC 0"); | 24 | check.checkExact("LC 0"); |
| 25 | check.checkExact("segname __PAGEZERO"); | 25 | check.checkExact("segname __PAGEZERO"); |
| 26 | check.checkExact("vmaddr 0"); | 26 | check.checkExact("vmaddr 0"); |
| 27 | check.checkExact("vmsize 4000"); | 27 | check.checkExact("vmsize 4000"); |
| 28 | 28 | ||
| 29 | check.checkStart(); | 29 | check.checkInHeaders(); |
| 30 | check.checkExact("segname __TEXT"); | 30 | check.checkExact("segname __TEXT"); |
| 31 | check.checkExact("vmaddr 4000"); | 31 | check.checkExact("vmaddr 4000"); |
| 32 | 32 | ||
| ... | @@ -44,7 +44,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -44,7 +44,7 @@ pub fn build(b: *std.Build) void { |
| 44 | exe.pagezero_size = 0; | 44 | exe.pagezero_size = 0; |
| 45 | 45 | ||
| 46 | const check = exe.checkObject(); | 46 | const check = exe.checkObject(); |
| 47 | check.checkStart(); | 47 | check.checkInHeaders(); |
| 48 | check.checkExact("LC 0"); | 48 | check.checkExact("LC 0"); |
| 49 | check.checkExact("segname __TEXT"); | 49 | check.checkExact("segname __TEXT"); |
| 50 | check.checkExact("vmaddr 0"); | 50 | check.checkExact("vmaddr 0"); |
test/link/macho/search_strategy/build.zig+1-1| ... | @@ -20,7 +20,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -20,7 +20,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 20 | const exe = createScenario(b, optimize, target, "search_dylibs_first", .mode_first); | 20 | const exe = createScenario(b, optimize, target, "search_dylibs_first", .mode_first); |
| 21 | 21 | ||
| 22 | const check = exe.checkObject(); | 22 | const check = exe.checkObject(); |
| 23 | check.checkStart(); | 23 | check.checkInHeaders(); |
| 24 | check.checkExact("cmd LOAD_DYLIB"); | 24 | check.checkExact("cmd LOAD_DYLIB"); |
| 25 | check.checkExact("name @rpath/libsearch_dylibs_first.dylib"); | 25 | check.checkExact("name @rpath/libsearch_dylibs_first.dylib"); |
| 26 | test_step.dependOn(&check.step); | 26 | test_step.dependOn(&check.step); |
test/link/macho/stack_size/build.zig+1-1| ... | @@ -25,7 +25,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -25,7 +25,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 25 | exe.stack_size = 0x100000000; | 25 | exe.stack_size = 0x100000000; |
| 26 | 26 | ||
| 27 | const check_exe = exe.checkObject(); | 27 | const check_exe = exe.checkObject(); |
| 28 | check_exe.checkStart(); | 28 | check_exe.checkInHeaders(); |
| 29 | check_exe.checkExact("cmd MAIN"); | 29 | check_exe.checkExact("cmd MAIN"); |
| 30 | check_exe.checkExact("stacksize 100000000"); | 30 | check_exe.checkExact("stacksize 100000000"); |
| 31 | test_step.dependOn(&check_exe.step); | 31 | test_step.dependOn(&check_exe.step); |
test/link/macho/strict_validation/build.zig+7-7| ... | @@ -26,13 +26,13 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -26,13 +26,13 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 26 | 26 | ||
| 27 | const check_exe = exe.checkObject(); | 27 | const check_exe = exe.checkObject(); |
| 28 | 28 | ||
| 29 | check_exe.checkStart(); | 29 | check_exe.checkInHeaders(); |
| 30 | check_exe.checkExact("cmd SEGMENT_64"); | 30 | check_exe.checkExact("cmd SEGMENT_64"); |
| 31 | check_exe.checkExact("segname __LINKEDIT"); | 31 | check_exe.checkExact("segname __LINKEDIT"); |
| 32 | check_exe.checkExtract("fileoff {fileoff}"); | 32 | check_exe.checkExtract("fileoff {fileoff}"); |
| 33 | check_exe.checkExtract("filesz {filesz}"); | 33 | check_exe.checkExtract("filesz {filesz}"); |
| 34 | 34 | ||
| 35 | check_exe.checkStart(); | 35 | check_exe.checkInHeaders(); |
| 36 | check_exe.checkExact("cmd DYLD_INFO_ONLY"); | 36 | check_exe.checkExact("cmd DYLD_INFO_ONLY"); |
| 37 | check_exe.checkExtract("rebaseoff {rebaseoff}"); | 37 | check_exe.checkExtract("rebaseoff {rebaseoff}"); |
| 38 | check_exe.checkExtract("rebasesize {rebasesize}"); | 38 | check_exe.checkExtract("rebasesize {rebasesize}"); |
| ... | @@ -43,31 +43,31 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -43,31 +43,31 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 43 | check_exe.checkExtract("exportoff {exportoff}"); | 43 | check_exe.checkExtract("exportoff {exportoff}"); |
| 44 | check_exe.checkExtract("exportsize {exportsize}"); | 44 | check_exe.checkExtract("exportsize {exportsize}"); |
| 45 | 45 | ||
| 46 | check_exe.checkStart(); | 46 | check_exe.checkInHeaders(); |
| 47 | check_exe.checkExact("cmd FUNCTION_STARTS"); | 47 | check_exe.checkExact("cmd FUNCTION_STARTS"); |
| 48 | check_exe.checkExtract("dataoff {fstartoff}"); | 48 | check_exe.checkExtract("dataoff {fstartoff}"); |
| 49 | check_exe.checkExtract("datasize {fstartsize}"); | 49 | check_exe.checkExtract("datasize {fstartsize}"); |
| 50 | 50 | ||
| 51 | check_exe.checkStart(); | 51 | check_exe.checkInHeaders(); |
| 52 | check_exe.checkExact("cmd DATA_IN_CODE"); | 52 | check_exe.checkExact("cmd DATA_IN_CODE"); |
| 53 | check_exe.checkExtract("dataoff {diceoff}"); | 53 | check_exe.checkExtract("dataoff {diceoff}"); |
| 54 | check_exe.checkExtract("datasize {dicesize}"); | 54 | check_exe.checkExtract("datasize {dicesize}"); |
| 55 | 55 | ||
| 56 | check_exe.checkStart(); | 56 | check_exe.checkInHeaders(); |
| 57 | check_exe.checkExact("cmd SYMTAB"); | 57 | check_exe.checkExact("cmd SYMTAB"); |
| 58 | check_exe.checkExtract("symoff {symoff}"); | 58 | check_exe.checkExtract("symoff {symoff}"); |
| 59 | check_exe.checkExtract("nsyms {symnsyms}"); | 59 | check_exe.checkExtract("nsyms {symnsyms}"); |
| 60 | check_exe.checkExtract("stroff {stroff}"); | 60 | check_exe.checkExtract("stroff {stroff}"); |
| 61 | check_exe.checkExtract("strsize {strsize}"); | 61 | check_exe.checkExtract("strsize {strsize}"); |
| 62 | 62 | ||
| 63 | check_exe.checkStart(); | 63 | check_exe.checkInHeaders(); |
| 64 | check_exe.checkExact("cmd DYSYMTAB"); | 64 | check_exe.checkExact("cmd DYSYMTAB"); |
| 65 | check_exe.checkExtract("indirectsymoff {dysymoff}"); | 65 | check_exe.checkExtract("indirectsymoff {dysymoff}"); |
| 66 | check_exe.checkExtract("nindirectsyms {dysymnsyms}"); | 66 | check_exe.checkExtract("nindirectsyms {dysymnsyms}"); |
| 67 | 67 | ||
| 68 | switch (builtin.cpu.arch) { | 68 | switch (builtin.cpu.arch) { |
| 69 | .aarch64 => { | 69 | .aarch64 => { |
| 70 | check_exe.checkStart(); | 70 | check_exe.checkInHeaders(); |
| 71 | check_exe.checkExact("cmd CODE_SIGNATURE"); | 71 | check_exe.checkExact("cmd CODE_SIGNATURE"); |
| 72 | check_exe.checkExtract("dataoff {codesigoff}"); | 72 | check_exe.checkExtract("dataoff {codesigoff}"); |
| 73 | check_exe.checkExtract("datasize {codesigsize}"); | 73 | check_exe.checkExtract("datasize {codesigsize}"); |
test/link/macho/unwind_info/build.zig+1-1| ... | @@ -32,7 +32,7 @@ fn testUnwindInfo( | ... | @@ -32,7 +32,7 @@ fn testUnwindInfo( |
| 32 | exe.link_gc_sections = dead_strip; | 32 | exe.link_gc_sections = dead_strip; |
| 33 | 33 | ||
| 34 | const check = exe.checkObject(); | 34 | const check = exe.checkObject(); |
| 35 | check.checkStart(); | 35 | check.checkInHeaders(); |
| 36 | check.checkExact("segname __TEXT"); | 36 | check.checkExact("segname __TEXT"); |
| 37 | check.checkExact("sectname __gcc_except_tab"); | 37 | check.checkExact("sectname __gcc_except_tab"); |
| 38 | check.checkExact("sectname __unwind_info"); | 38 | check.checkExact("sectname __unwind_info"); |
test/link/macho/weak_framework/build.zig+1-1| ... | @@ -23,7 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -23,7 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 23 | exe.linkFrameworkWeak("Cocoa"); | 23 | exe.linkFrameworkWeak("Cocoa"); |
| 24 | 24 | ||
| 25 | const check = exe.checkObject(); | 25 | const check = exe.checkObject(); |
| 26 | check.checkStart(); | 26 | check.checkInHeaders(); |
| 27 | check.checkExact("cmd LOAD_WEAK_DYLIB"); | 27 | check.checkExact("cmd LOAD_WEAK_DYLIB"); |
| 28 | check.checkContains("Cocoa"); | 28 | check.checkContains("Cocoa"); |
| 29 | test_step.dependOn(&check.step); | 29 | test_step.dependOn(&check.step); |
test/link/macho/weak_library/build.zig+1-1| ... | @@ -37,7 +37,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -37,7 +37,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 37 | exe.addRPath(dylib.getEmittedBinDirectory()); | 37 | exe.addRPath(dylib.getEmittedBinDirectory()); |
| 38 | 38 | ||
| 39 | const check = exe.checkObject(); | 39 | const check = exe.checkObject(); |
| 40 | check.checkStart(); | 40 | check.checkInHeaders(); |
| 41 | check.checkExact("cmd LOAD_WEAK_DYLIB"); | 41 | check.checkExact("cmd LOAD_WEAK_DYLIB"); |
| 42 | check.checkExact("name @rpath/liba.dylib"); | 42 | check.checkExact("name @rpath/liba.dylib"); |
| 43 | 43 |
test/link/wasm/archive/build.zig+1-1| ... | @@ -27,7 +27,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -27,7 +27,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 27 | lib.strip = false; | 27 | lib.strip = false; |
| 28 | 28 | ||
| 29 | const check = lib.checkObject(); | 29 | const check = lib.checkObject(); |
| 30 | check.checkStart(); | 30 | check.checkInHeaders(); |
| 31 | check.checkExact("Section custom"); | 31 | check.checkExact("Section custom"); |
| 32 | check.checkExact("name __trunch"); // Ensure it was imported and resolved | 32 | check.checkExact("name __trunch"); // Ensure it was imported and resolved |
| 33 | 33 |
test/link/wasm/basic-features/build.zig+1-1| ... | @@ -21,7 +21,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -21,7 +21,7 @@ pub fn build(b: *std.Build) void { |
| 21 | 21 | ||
| 22 | // Verify the result contains the features explicitly set on the target for the library. | 22 | // Verify the result contains the features explicitly set on the target for the library. |
| 23 | const check = lib.checkObject(); | 23 | const check = lib.checkObject(); |
| 24 | check.checkStart(); | 24 | check.checkInHeaders(); |
| 25 | check.checkExact("name target_features"); | 25 | check.checkExact("name target_features"); |
| 26 | check.checkExact("features 1"); | 26 | check.checkExact("features 1"); |
| 27 | check.checkExact("+ atomics"); | 27 | check.checkExact("+ atomics"); |
test/link/wasm/bss/build.zig+4-4| ... | @@ -31,18 +31,18 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt | ... | @@ -31,18 +31,18 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 31 | const check_lib = lib.checkObject(); | 31 | const check_lib = lib.checkObject(); |
| 32 | 32 | ||
| 33 | // since we import memory, make sure it exists with the correct naming | 33 | // since we import memory, make sure it exists with the correct naming |
| 34 | check_lib.checkStart(); | 34 | check_lib.checkInHeaders(); |
| 35 | check_lib.checkExact("Section import"); | 35 | check_lib.checkExact("Section import"); |
| 36 | check_lib.checkExact("entries 1"); | 36 | check_lib.checkExact("entries 1"); |
| 37 | check_lib.checkExact("module env"); // default module name is "env" | 37 | check_lib.checkExact("module env"); // default module name is "env" |
| 38 | check_lib.checkExact("name memory"); // as per linker specification | 38 | check_lib.checkExact("name memory"); // as per linker specification |
| 39 | 39 | ||
| 40 | // since we are importing memory, ensure it's not exported | 40 | // since we are importing memory, ensure it's not exported |
| 41 | check_lib.checkStart(); | 41 | check_lib.checkInHeaders(); |
| 42 | check_lib.checkNotPresent("Section export"); | 42 | check_lib.checkNotPresent("Section export"); |
| 43 | 43 | ||
| 44 | // validate the name of the stack pointer | 44 | // validate the name of the stack pointer |
| 45 | check_lib.checkStart(); | 45 | check_lib.checkInHeaders(); |
| 46 | check_lib.checkExact("Section custom"); | 46 | check_lib.checkExact("Section custom"); |
| 47 | check_lib.checkExact("type data_segment"); | 47 | check_lib.checkExact("type data_segment"); |
| 48 | check_lib.checkExact("names 2"); | 48 | check_lib.checkExact("names 2"); |
| ... | @@ -77,7 +77,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt | ... | @@ -77,7 +77,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize_mode: std.builtin.Opt |
| 77 | lib.link_gc_sections = false; | 77 | lib.link_gc_sections = false; |
| 78 | 78 | ||
| 79 | const check_lib = lib.checkObject(); | 79 | const check_lib = lib.checkObject(); |
| 80 | check_lib.checkStart(); | 80 | check_lib.checkInHeaders(); |
| 81 | check_lib.checkExact("Section custom"); | 81 | check_lib.checkExact("Section custom"); |
| 82 | check_lib.checkExact("type data_segment"); | 82 | check_lib.checkExact("type data_segment"); |
| 83 | check_lib.checkExact("names 2"); | 83 | check_lib.checkExact("names 2"); |
test/link/wasm/export-data/build.zig+2-2| ... | @@ -22,7 +22,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -22,7 +22,7 @@ pub fn build(b: *std.Build) void { |
| 22 | 22 | ||
| 23 | const check_lib = lib.checkObject(); | 23 | const check_lib = lib.checkObject(); |
| 24 | 24 | ||
| 25 | check_lib.checkStart(); | 25 | check_lib.checkInHeaders(); |
| 26 | check_lib.checkExact("Section global"); | 26 | check_lib.checkExact("Section global"); |
| 27 | check_lib.checkExact("entries 3"); | 27 | check_lib.checkExact("entries 3"); |
| 28 | check_lib.checkExact("type i32"); // stack pointer so skip other fields | 28 | check_lib.checkExact("type i32"); // stack pointer so skip other fields |
| ... | @@ -35,7 +35,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -35,7 +35,7 @@ pub fn build(b: *std.Build) void { |
| 35 | check_lib.checkComputeCompare("foo_address", .{ .op = .eq, .value = .{ .literal = 4 } }); | 35 | check_lib.checkComputeCompare("foo_address", .{ .op = .eq, .value = .{ .literal = 4 } }); |
| 36 | check_lib.checkComputeCompare("bar_address", .{ .op = .eq, .value = .{ .literal = 0 } }); | 36 | check_lib.checkComputeCompare("bar_address", .{ .op = .eq, .value = .{ .literal = 0 } }); |
| 37 | 37 | ||
| 38 | check_lib.checkStart(); | 38 | check_lib.checkInHeaders(); |
| 39 | check_lib.checkExact("Section export"); | 39 | check_lib.checkExact("Section export"); |
| 40 | check_lib.checkExact("entries 3"); | 40 | check_lib.checkExact("entries 3"); |
| 41 | check_lib.checkExact("name foo"); | 41 | check_lib.checkExact("name foo"); |
test/link/wasm/export/build.zig+3-3| ... | @@ -46,21 +46,21 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -46,21 +46,21 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 46 | force_export.use_lld = false; | 46 | force_export.use_lld = false; |
| 47 | 47 | ||
| 48 | const check_no_export = no_export.checkObject(); | 48 | const check_no_export = no_export.checkObject(); |
| 49 | check_no_export.checkStart(); | 49 | check_no_export.checkInHeaders(); |
| 50 | check_no_export.checkExact("Section export"); | 50 | check_no_export.checkExact("Section export"); |
| 51 | check_no_export.checkExact("entries 1"); | 51 | check_no_export.checkExact("entries 1"); |
| 52 | check_no_export.checkExact("name memory"); | 52 | check_no_export.checkExact("name memory"); |
| 53 | check_no_export.checkExact("kind memory"); | 53 | check_no_export.checkExact("kind memory"); |
| 54 | 54 | ||
| 55 | const check_dynamic_export = dynamic_export.checkObject(); | 55 | const check_dynamic_export = dynamic_export.checkObject(); |
| 56 | check_dynamic_export.checkStart(); | 56 | check_dynamic_export.checkInHeaders(); |
| 57 | check_dynamic_export.checkExact("Section export"); | 57 | check_dynamic_export.checkExact("Section export"); |
| 58 | check_dynamic_export.checkExact("entries 2"); | 58 | check_dynamic_export.checkExact("entries 2"); |
| 59 | check_dynamic_export.checkExact("name foo"); | 59 | check_dynamic_export.checkExact("name foo"); |
| 60 | check_dynamic_export.checkExact("kind function"); | 60 | check_dynamic_export.checkExact("kind function"); |
| 61 | 61 | ||
| 62 | const check_force_export = force_export.checkObject(); | 62 | const check_force_export = force_export.checkObject(); |
| 63 | check_force_export.checkStart(); | 63 | check_force_export.checkInHeaders(); |
| 64 | check_force_export.checkExact("Section export"); | 64 | check_force_export.checkExact("Section export"); |
| 65 | check_force_export.checkExact("entries 2"); | 65 | check_force_export.checkExact("entries 2"); |
| 66 | check_force_export.checkExact("name foo"); | 66 | check_force_export.checkExact("name foo"); |
test/link/wasm/extern-mangle/build.zig+1-1| ... | @@ -22,7 +22,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -22,7 +22,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 22 | lib.rdynamic = true; // export `foo` | 22 | lib.rdynamic = true; // export `foo` |
| 23 | 23 | ||
| 24 | const check_lib = lib.checkObject(); | 24 | const check_lib = lib.checkObject(); |
| 25 | check_lib.checkStart(); | 25 | check_lib.checkInHeaders(); |
| 26 | check_lib.checkExact("Section import"); | 26 | check_lib.checkExact("Section import"); |
| 27 | check_lib.checkExact("entries 2"); // a.hello & b.hello | 27 | check_lib.checkExact("entries 2"); // a.hello & b.hello |
| 28 | check_lib.checkExact("module a"); | 28 | check_lib.checkExact("module a"); |
test/link/wasm/function-table/build.zig+4-4| ... | @@ -52,7 +52,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -52,7 +52,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 52 | const check_export = export_table.checkObject(); | 52 | const check_export = export_table.checkObject(); |
| 53 | const check_regular = regular_table.checkObject(); | 53 | const check_regular = regular_table.checkObject(); |
| 54 | 54 | ||
| 55 | check_import.checkStart(); | 55 | check_import.checkInHeaders(); |
| 56 | check_import.checkExact("Section import"); | 56 | check_import.checkExact("Section import"); |
| 57 | check_import.checkExact("entries 1"); | 57 | check_import.checkExact("entries 1"); |
| 58 | check_import.checkExact("module env"); | 58 | check_import.checkExact("module env"); |
| ... | @@ -63,20 +63,20 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -63,20 +63,20 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 63 | check_import.checkNotPresent("max"); // when importing, we do not provide a max | 63 | check_import.checkNotPresent("max"); // when importing, we do not provide a max |
| 64 | check_import.checkNotPresent("Section table"); // we're importing it | 64 | check_import.checkNotPresent("Section table"); // we're importing it |
| 65 | 65 | ||
| 66 | check_export.checkStart(); | 66 | check_export.checkInHeaders(); |
| 67 | check_export.checkExact("Section export"); | 67 | check_export.checkExact("Section export"); |
| 68 | check_export.checkExact("entries 2"); | 68 | check_export.checkExact("entries 2"); |
| 69 | check_export.checkExact("name __indirect_function_table"); // as per linker specification | 69 | check_export.checkExact("name __indirect_function_table"); // as per linker specification |
| 70 | check_export.checkExact("kind table"); | 70 | check_export.checkExact("kind table"); |
| 71 | 71 | ||
| 72 | check_regular.checkStart(); | 72 | check_regular.checkInHeaders(); |
| 73 | check_regular.checkExact("Section table"); | 73 | check_regular.checkExact("Section table"); |
| 74 | check_regular.checkExact("entries 1"); | 74 | check_regular.checkExact("entries 1"); |
| 75 | check_regular.checkExact("type funcref"); | 75 | check_regular.checkExact("type funcref"); |
| 76 | check_regular.checkExact("min 2"); // index starts at 1 & 1 function pointer = 2. | 76 | check_regular.checkExact("min 2"); // index starts at 1 & 1 function pointer = 2. |
| 77 | check_regular.checkExact("max 2"); | 77 | check_regular.checkExact("max 2"); |
| 78 | 78 | ||
| 79 | check_regular.checkStart(); | 79 | check_regular.checkInHeaders(); |
| 80 | check_regular.checkExact("Section element"); | 80 | check_regular.checkExact("Section element"); |
| 81 | check_regular.checkExact("entries 1"); | 81 | check_regular.checkExact("entries 1"); |
| 82 | check_regular.checkExact("table index 0"); | 82 | check_regular.checkExact("table index 0"); |
test/link/wasm/infer-features/build.zig+1-1| ... | @@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -34,7 +34,7 @@ pub fn build(b: *std.Build) void { |
| 34 | 34 | ||
| 35 | // Verify the result contains the features from the C Object file. | 35 | // Verify the result contains the features from the C Object file. |
| 36 | const check = lib.checkObject(); | 36 | const check = lib.checkObject(); |
| 37 | check.checkStart(); | 37 | check.checkInHeaders(); |
| 38 | check.checkExact("name target_features"); | 38 | check.checkExact("name target_features"); |
| 39 | check.checkExact("features 7"); | 39 | check.checkExact("features 7"); |
| 40 | check.checkExact("+ atomics"); | 40 | check.checkExact("+ atomics"); |
test/link/wasm/producers/build.zig+1-1| ... | @@ -29,7 +29,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -29,7 +29,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 29 | const version_fmt = "version " ++ builtin.zig_version_string; | 29 | const version_fmt = "version " ++ builtin.zig_version_string; |
| 30 | 30 | ||
| 31 | const check_lib = lib.checkObject(); | 31 | const check_lib = lib.checkObject(); |
| 32 | check_lib.checkStart(); | 32 | check_lib.checkInHeaders(); |
| 33 | check_lib.checkExact("name producers"); | 33 | check_lib.checkExact("name producers"); |
| 34 | check_lib.checkExact("fields 2"); | 34 | check_lib.checkExact("fields 2"); |
| 35 | check_lib.checkExact("field_name language"); | 35 | check_lib.checkExact("field_name language"); |
test/link/wasm/segments/build.zig+4-4| ... | @@ -27,15 +27,15 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -27,15 +27,15 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 27 | b.installArtifact(lib); | 27 | b.installArtifact(lib); |
| 28 | 28 | ||
| 29 | const check_lib = lib.checkObject(); | 29 | const check_lib = lib.checkObject(); |
| 30 | check_lib.checkStart(); | 30 | check_lib.checkInHeaders(); |
| 31 | check_lib.checkExact("Section data"); | 31 | check_lib.checkExact("Section data"); |
| 32 | check_lib.checkExact("entries 2"); // rodata & data, no bss because we're exporting memory | 32 | check_lib.checkExact("entries 2"); // rodata & data, no bss because we're exporting memory |
| 33 | 33 | ||
| 34 | check_lib.checkStart(); | 34 | check_lib.checkInHeaders(); |
| 35 | check_lib.checkExact("Section custom"); | 35 | check_lib.checkExact("Section custom"); |
| 36 | check_lib.checkStart(); | 36 | check_lib.checkInHeaders(); |
| 37 | check_lib.checkExact("name name"); // names custom section | 37 | check_lib.checkExact("name name"); // names custom section |
| 38 | check_lib.checkStart(); | 38 | check_lib.checkInHeaders(); |
| 39 | check_lib.checkExact("type data_segment"); | 39 | check_lib.checkExact("type data_segment"); |
| 40 | check_lib.checkExact("names 2"); | 40 | check_lib.checkExact("names 2"); |
| 41 | check_lib.checkExact("index 0"); | 41 | check_lib.checkExact("index 0"); |
test/link/wasm/stack_pointer/build.zig+3-3| ... | @@ -30,7 +30,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -30,7 +30,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 30 | const check_lib = lib.checkObject(); | 30 | const check_lib = lib.checkObject(); |
| 31 | 31 | ||
| 32 | // ensure global exists and its initial value is equal to explitic stack size | 32 | // ensure global exists and its initial value is equal to explitic stack size |
| 33 | check_lib.checkStart(); | 33 | check_lib.checkInHeaders(); |
| 34 | check_lib.checkExact("Section global"); | 34 | check_lib.checkExact("Section global"); |
| 35 | check_lib.checkExact("entries 1"); | 35 | check_lib.checkExact("entries 1"); |
| 36 | check_lib.checkExact("type i32"); // on wasm32 the stack pointer must be i32 | 36 | check_lib.checkExact("type i32"); // on wasm32 the stack pointer must be i32 |
| ... | @@ -39,13 +39,13 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -39,13 +39,13 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 39 | check_lib.checkComputeCompare("stack_pointer", .{ .op = .eq, .value = .{ .literal = lib.stack_size.? } }); | 39 | check_lib.checkComputeCompare("stack_pointer", .{ .op = .eq, .value = .{ .literal = lib.stack_size.? } }); |
| 40 | 40 | ||
| 41 | // validate memory section starts after virtual stack | 41 | // validate memory section starts after virtual stack |
| 42 | check_lib.checkStart(); | 42 | check_lib.checkInHeaders(); |
| 43 | check_lib.checkExact("Section data"); | 43 | check_lib.checkExact("Section data"); |
| 44 | check_lib.checkExtract("i32.const {data_start}"); | 44 | check_lib.checkExtract("i32.const {data_start}"); |
| 45 | check_lib.checkComputeCompare("data_start", .{ .op = .eq, .value = .{ .variable = "stack_pointer" } }); | 45 | check_lib.checkComputeCompare("data_start", .{ .op = .eq, .value = .{ .variable = "stack_pointer" } }); |
| 46 | 46 | ||
| 47 | // validate the name of the stack pointer | 47 | // validate the name of the stack pointer |
| 48 | check_lib.checkStart(); | 48 | check_lib.checkInHeaders(); |
| 49 | check_lib.checkExact("Section custom"); | 49 | check_lib.checkExact("Section custom"); |
| 50 | check_lib.checkExact("type global"); | 50 | check_lib.checkExact("type global"); |
| 51 | check_lib.checkExact("names 1"); | 51 | check_lib.checkExact("names 1"); |
test/link/wasm/type/build.zig+1-1| ... | @@ -26,7 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -26,7 +26,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 26 | b.installArtifact(lib); | 26 | b.installArtifact(lib); |
| 27 | 27 | ||
| 28 | const check_lib = lib.checkObject(); | 28 | const check_lib = lib.checkObject(); |
| 29 | check_lib.checkStart(); | 29 | check_lib.checkInHeaders(); |
| 30 | check_lib.checkExact("Section type"); | 30 | check_lib.checkExact("Section type"); |
| 31 | // only 2 entries, although we have more functions. | 31 | // only 2 entries, although we have more functions. |
| 32 | // This is to test functions with the same function signature | 32 | // This is to test functions with the same function signature |
test/standalone/ios/build.zig+1-1| ... | @@ -30,7 +30,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -30,7 +30,7 @@ pub fn build(b: *std.Build) void { |
| 30 | exe.linkLibC(); | 30 | exe.linkLibC(); |
| 31 | 31 | ||
| 32 | const check = exe.checkObject(); | 32 | const check = exe.checkObject(); |
| 33 | check.checkStart(); | 33 | check.checkInHeaders(); |
| 34 | check.checkExact("cmd BUILD_VERSION"); | 34 | check.checkExact("cmd BUILD_VERSION"); |
| 35 | check.checkExact("platform IOS"); | 35 | check.checkExact("platform IOS"); |
| 36 | test_step.dependOn(&check.step); | 36 | test_step.dependOn(&check.step); |