link-tests: rename CheckMachOStep to CheckObjectStep and accept obj format
This commit is contained in:
@@ -28,7 +28,7 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
|
||||
});
|
||||
|
||||
if (builtin.os.tag == .macos) {
|
||||
cases.addBuildFile("test/link/entry/build.zig", .{
|
||||
cases.addBuildFile("test/link/macho/entry/build.zig", .{
|
||||
.build_modes = true,
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn build(b: *Builder) void {
|
||||
dylib.linkLibC();
|
||||
dylib.install();
|
||||
|
||||
const check_dylib = dylib.checkMachO();
|
||||
const check_dylib = dylib.checkObject(.macho);
|
||||
check_dylib.check("cmd ID_DYLIB");
|
||||
check_dylib.checkNext("path @rpath/liba.dylib");
|
||||
check_dylib.checkNext("timestamp 2");
|
||||
@@ -30,7 +30,7 @@ pub fn build(b: *Builder) void {
|
||||
exe.addLibraryPath(b.pathFromRoot("zig-out/lib/"));
|
||||
exe.addRPath(b.pathFromRoot("zig-out/lib"));
|
||||
|
||||
const check_exe = exe.checkMachO();
|
||||
const check_exe = exe.checkObject(.macho);
|
||||
check_exe.check("cmd LOAD_DYLIB");
|
||||
check_exe.checkNext("path @rpath/liba.dylib");
|
||||
check_exe.checkNext("timestamp 2");
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn build(b: *Builder) void {
|
||||
exe.linkLibC();
|
||||
exe.entry_symbol_name = "_non_main";
|
||||
|
||||
const check_exe = exe.checkMachO();
|
||||
const check_exe = exe.checkObject(.macho);
|
||||
|
||||
check_exe.check("segname __TEXT");
|
||||
check_exe.checkNextExtract("vmaddr {vmaddr}");
|
||||
|
||||
@@ -14,7 +14,7 @@ pub fn build(b: *Builder) void {
|
||||
exe.linkLibC();
|
||||
exe.pagezero_size = 0x4000;
|
||||
|
||||
const check = exe.checkMachO();
|
||||
const check = exe.checkObject(.macho);
|
||||
check.check("LC 0");
|
||||
check.checkNext("segname __PAGEZERO");
|
||||
check.checkNext("vmaddr 0");
|
||||
@@ -33,7 +33,7 @@ pub fn build(b: *Builder) void {
|
||||
exe.linkLibC();
|
||||
exe.pagezero_size = 0;
|
||||
|
||||
const check = exe.checkMachO();
|
||||
const check = exe.checkObject(.macho);
|
||||
check.check("LC 0");
|
||||
check.checkNext("segname __TEXT");
|
||||
check.checkNext("vmaddr 0");
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn build(b: *Builder) void {
|
||||
exe.linkLibC();
|
||||
exe.stack_size = 0x100000000;
|
||||
|
||||
const check_exe = exe.checkMachO();
|
||||
const check_exe = exe.checkObject(.macho);
|
||||
check_exe.check("cmd MAIN");
|
||||
check_exe.checkNext("stacksize 100000000");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user