#
#asahi-re · 2021-01-11 18:27
Shiz-rw-r--r-- 1 partynorge staff 85M 11 Jan 19:24 com.apple.kernel
#asahi-re · 2021-01-11 18:26
marcananyway none of this matters as far as the bootloader is concerned
#asahi-re · 2021-01-11 18:26
Shizhum
#asahi-re · 2021-01-11 18:26
Shizand it has a com.apple.kernel, which is a mach-o executable
#asahi-re · 2021-01-11 18:25
marcanthere's one big massive text section outside the fileset
#asahi-re · 2021-01-11 18:25
Shizi just extracted the kernelcache
#asahi-re · 2021-01-11 18:25
Shizwell
#asahi-re · 2021-01-11 18:25
marcanthese days it's all prelinked anyway
#asahi-re · 2021-01-11 18:25
marcanit used to be that
#asahi-re · 2021-01-11 18:25
marcannot quite
#asahi-re · 2021-01-11 18:25
Shizspecial type of mach-O file
#asahi-re · 2021-01-11 18:25
Shizit's just a container with a bunch of inner mach-Os
#asahi-re · 2021-01-11 18:25
Shizyeah, the kernelcache is a fileset
#asahi-re · 2021-01-11 18:25
marcanShiz: fileset?
#asahi-re · 2021-01-11 18:19
Shizmarcan: did you extract the kernel from the fileset? :p
#asahi-re · 2021-01-11 17:42
davidrysk[m]well, will iBoot boot a simpler Mach-O that doesn't have all this crap?
#asahi-re · 2021-01-11 17:38
Shizsounds familiar
#asahi-re · 2021-01-11 17:35
jixI haven't touched osx stuff in over 10 years, but I back then I did some sizecoding and that involved sticking some code into the LC_UNIXTHREAD command so that all those bytes aren't wasted
#asahi-re · 2021-01-11 17:29
jixdavidrysk[m]: LC_UNIXTHREAD is older than LC_MAIN and was also used for userspace stuff before
#asahi-re · 2021-01-11 17:24
davidrysk[m]hm
#asahi-re · 2021-01-11 17:24
davidrysk[m]https://www.hex-rays.com/wp-content/static/tutorials/xnu_debugger_primer/xnu_debugger_primer.html
#asahi-re · 2021-01-11 17:23
Shizoh yay, mach-o filesets
#asahi-re · 2021-01-11 17:22
davidrysk[m](latest Xcode works with macOS 10.15.x fwiw)
#asahi-re · 2021-01-11 17:21
Shizprobably yea
#asahi-re · 2021-01-11 17:21
davidrysk[m]probably is that your local macOS (or your Xcode) is outdated
#asahi-re · 2021-01-11 17:21
davidrysk[m]my otool is fine with that
#asahi-re · 2021-01-11 17:17
Shizit doesn't like LC_FILESET_ENTRY (0x35)
#asahi-re · 2021-01-11 17:16
Shizdoesn't matter anyway, because it segfaults on the kernel :)
#asahi-re · 2021-01-11 17:15
Shizno source sadly
#asahi-re · 2021-01-11 17:15
davidrysk[m](usually are **)
#asahi-re · 2021-01-11 17:15
Shizyep
#asahi-re · 2021-01-11 17:15
davidrysk[m]that looks handy (just note that his tools are proprietary licensed)
#asahi-re · 2021-01-11 17:14
Shizapparently this can dump kernelcaches
#asahi-re · 2021-01-11 17:14
Shizhttp://newosxbook.com/tools/jtool.html
#asahi-re · 2021-01-11 17:14
Shizanyway
#asahi-re · 2021-01-11 17:14
Shizthe kernelcache extracted from the img4, trying on m1 now
#asahi-re · 2021-01-11 17:13
Shizmight be my local macOS version which is outdated
#asahi-re · 2021-01-11 17:13
davidrysk[m](which file?)
#asahi-re · 2021-01-11 17:13
davidrysk[m]Shiz: the img4?
#asahi-re · 2021-01-11 17:13
Shiz davidrysk[m] otool doesn't even recognize it as an object file :)
#asahi-re · 2021-01-11 17:11
davidrysk[m]mach-o support in objdump is incomplete, otool (from apple's cctools) is more complete
#asahi-re · 2021-01-11 17:10
modwizcodeWhy is it wrapped in an img4?
#asahi-re · 2021-01-11 17:09
Shizah, LC_DYLD_CHAINED_FIXUPS
#asahi-re · 2021-01-11 17:07
Shizooh :)
#asahi-re · 2021-01-11 17:07
Shizgobjdump: kc: unknown load command 0x34
#asahi-re · 2021-01-11 17:05
marcandavidrysk[m]: a kernelcache *is* a mach-o (wrapped in an img4)
#asahi-re · 2021-01-11 17:04
Shizmarcan: fwiw, libkern/kxld/kxld_object.c in xnu sources may be relevant
#asahi-re · 2021-01-11 17:03
Shiz(presumably)
#asahi-re · 2021-01-11 17:03
Shizkc being... kernelcache
#asahi-re · 2021-01-11 17:03
Shizidk, but bputil's policy stuff seems to refer to it as kcOS :p

plus ›