XNU as a loadable kernel module inside Linux (macOS personality for arm64 Linux)
C
kcdis: the addresses after a run of zero words (#50)
Fred Nix201e85c5fd61
diff --git a/tools/dev/kcdis.py b/tools/dev/kcdis.pyindex a417192..0985f75 100644--- a/tools/dev/kcdis.py+++ b/tools/dev/kcdis.py@@ -16,7 +16,8 @@ for _ in range(ncmds):t = tempfile.mkdtemp()open(t + '/c.s', 'w').write('.text\n.globl _x\n_x:\n' + ''.join('.inst 0x%08x\n' % w for w in words))subprocess.run(['xcrun', 'clang', '-arch', 'arm64e', '-c', t + '/c.s', '-o', t + '/c.o'], check=True)- out = subprocess.run(['xcrun', 'llvm-objdump', '-d', '--no-show-raw-insn', '--mattr=+v8.5a,+pauth', t + '/c.o'],+ # -z: a run of zero words is one '...' line otherwise, and the lines are counted for the addresses below+ out = subprocess.run(['xcrun', 'llvm-objdump', '-d', '-z', '--no-show-raw-insn', '--mattr=+v8.5a,+pauth', t + '/c.o'],capture_output=True, text=True).stdout.splitlines()k = 0for l in out: