2021-01-11
00:04aratuk has joined #asahi-re
00:09aratuk has quit [Ping timeout: 265 seconds]
01:39dibas has quit [Ping timeout: 260 seconds]
02:04klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:28dibas has joined #asahi-re
02:28dibas has joined #asahi-re
03:50ransom has joined #asahi-re
03:52Tokamak has joined #asahi-re
04:05aratuk has joined #asahi-re
04:11aratuk has quit [Ping timeout: 264 seconds]
05:32ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:36Tokamak has quit [Remote host closed the connection]
05:45Tokamak has joined #asahi-re
06:40ransom has joined #asahi-re
06:41justMaku has quit [Remote host closed the connection]
06:41q3k|m has quit [Remote host closed the connection]
06:57ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:08Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:40klaus_ has joined #asahi-re
08:07aratuk has joined #asahi-re
08:12aratuk has quit [Ping timeout: 264 seconds]
09:52marcan changed the topic of #asahi-re to: Asahi Linux: porting Linux to Apple Silicon macs | Hardware / boot process / firmware interface reverse engineering | WARNING: this channel (only) may contain binary reverse engineering discussion | RE policy: https://alx.sh/re (MANDATORY READ) | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-re
09:58bylaws has joined #asahi-re
10:03lewurm has joined #asahi-re
10:31rootspring[m] has joined #asahi-re
11:03DarthCloud has quit [Ping timeout: 240 seconds]
11:05DarthCloud has joined #asahi-re
12:09aratuk has joined #asahi-re
12:13aratuk has quit [Ping timeout: 265 seconds]
13:34dstzd has quit [Quit: ZNC - https://znc.in]
13:35dstzd has joined #asahi-re
13:40mogery has joined #asahi-re
14:00aratuk has joined #asahi-re
14:05aratuk has quit [Ping timeout: 272 seconds]
14:07justMaku has joined #asahi-re
14:14robher has joined #asahi-re
14:19q3k|m has joined #asahi-re
14:22justMaku has quit [Quit: Client limit exceeded: 150]
14:24dstzd has quit [Quit: ZNC - https://znc.in]
14:24dstzd has joined #asahi-re
15:06sumoon[m] has joined #asahi-re
15:19klaus_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:30HeN has quit [Quit: Connection closed for inactivity]
15:34Tokamak has joined #asahi-re
15:58klaus_ has joined #asahi-re
16:01aratuk has joined #asahi-re
16:06aratuk has quit [Ping timeout: 264 seconds]
16:10ransom has joined #asahi-re
16:25ransom_ has joined #asahi-re
16:29ransom has quit [Ping timeout: 272 seconds]
16:30davidrysk[m]marcan: https://twitter.com/marcan42/status/1348668349404782592 -- are you looking at the built t8101 kernel?
16:33marcanI'm probably do a trick I've used in the past, of building the mach-o structures inside the memory image in a linker script
16:37davidrysk[m]wonders if PongoOS has done some of this work already
16:39davidrysk[m]oop, PongoOS directly includes APSL-licensed Apple headers :(
16:54davidrysk[m]that's not how a typical (userspace) mach-o encodes its entry point
16:55davidrysk[m]no, it uses LC_MAIN
16:55ransom has joined #asahi-re
16:55davidrysk[m]uh I know corkami made a poster for mach-o
16:56davidrysk[m]too basic :)
16:56davidrysk[m]marcan: are you looking at the kernel or the kernelcollection?
16:57davidrysk[m](about you being tired lol)
16:57modwizcode has joined #asahi-re
16:57ransom_ has quit [Ping timeout: 256 seconds]
16:57davidrysk[m]the manpage for kmutil uses the term "boot kext collection"
16:58davidrysk[m]but isn't clear whether that's just for kexts
16:59davidrysk[m]my point though: kmutil is probably what wraps it into an asn.1
16:59davidrysk[m]the mach-of file for the kernel is at /System/Library/Kernels and doesn't look wrapped in an asn.1 to me
17:01davidrysk[m]question I have: will iBoot load a mach-o that has an LC_MAIN pointing to the entry point?
17:01davidrysk[m]without the configure-boot option in kmutil we can't test :)
17:02davidrysk[m]Shiz: yes, but does it use kernelcache for configure-boot --custom-boot-object? the documentation for that specifically states that you use that to load a mach-o
17:03mogeryy has joined #asahi-re
17:04mogery has quit [Ping timeout: 260 seconds]
17:10modwizcodeWhy is it wrapped in an img4?
17:11davidrysk[m]mach-o support in objdump is incomplete, otool (from apple's cctools) is more complete
17:13davidrysk[m]Shiz: the img4?
17:13davidrysk[m](which file?)
17:15davidrysk[m]that looks handy (just note that his tools are proprietary licensed)
17:15davidrysk[m](usually are **)
17:21davidrysk[m]my otool is fine with that
17:21davidrysk[m]probably is that your local macOS (or your Xcode) is outdated
17:22davidrysk[m](latest Xcode works with macOS 10.15.x fwiw)
17:24davidrysk[m]https://www.hex-rays.com/wp-content/static/tutorials/xnu_debugger_primer/xnu_debugger_primer.html
17:29jixdavidrysk[m]: LC_UNIXTHREAD is older than LC_MAIN and was also used for userspace stuff before
17:35jixI 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
17:42davidrysk[m]well, will iBoot boot a simpler Mach-O that doesn't have all this crap?
17:51HeN has joined #asahi-re
18:02aratuk has joined #asahi-re
18:06aratuk has quit [Ping timeout: 256 seconds]
18:15tiagom has joined #asahi-re
18:29Shizthe kernelcache extracted from the preboot partition at $vuid/boot/$policy/System/Caches/com.apple.kernelcache/kernelcache
18:33Shizcom.apple.kernel *is* the big blob, and the .kexts are 'inside' but also individually referencable
18:33Shizotool does complain that the stuff I extract is truncated, so there might be something there
18:36Shizso yeah, the 'kexts' are first, then the big kernel file, each with at least proper mach-O headers
18:38roxfanIIRC in some iOS version they reshuffled segments so that all __TEXT are separate from all __DATA; not sure if that's the case with macOS
18:39tiagom has quit [Quit: tiagom]
18:41tiagom has joined #asahi-re
18:48roxfani think com.apple.kernel is mostly standalone but kexts are prelinked to refer to addresses inside it
21:12mogeryy has quit [Quit: Leaving]
21:20ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:21wolf511[m] has joined #asahi-re
21:22DarthCloud has quit [Ping timeout: 240 seconds]
21:28DarthCloud has joined #asahi-re
22:03aratuk has joined #asahi-re
22:07aratuk has quit [Ping timeout: 240 seconds]
22:20parallax has joined #asahi-re
22:41tiagom has quit [Quit: tiagom]
23:26ransom has joined #asahi-re
23:39ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]