> It'd be helpful to be able to access the binaries
> built into the #/ of the kernel
If you mean the files in #/boot, the representation is a simple
byte array and length so it's easy to extract from the kernel binary.
You could write a driver to present these as a file system, but for
a one-off, brute force does the job:
cpu% nm /sys/src/9/pc/9pcf|grep _bin_
f0352948 D _386_bin_auth_factotumcode
f0213470 D _386_bin_auth_factotumlen
f02e0098 D _386_bin_disk_partfscode
f0213064 D _386_bin_disk_partfslen
f0392f78 D _386_bin_fossil_fossilcode
f0213038 D _386_bin_fossil_fossillen
f02c4de4 D _386_bin_ip_ipconfigcode
f0213244 D _386_bin_ip_ipconfiglen
f02facf4 D _386_bin_usb_usbdcode
f02132b8 D _386_bin_usb_usbdlen
f02154b4 D _386_bin_venti_venticode
f0213010 D _386_bin_venti_ventilen
cpu% db /sys/src/9/pc/9pcf
386 binary
$m
? map `/sys/src/9/pc/9pcf'
text 0xf0100020 0xf0212f15 0x20
data 0xf0213000 0xf0400b90 0x112f15
_386_bin_auth_factotumlen?D
_386_bin_auth_factotumlen? 235557
_386_bin_auth_factotumcode-0xf0213000+0x112f15=D
2435165
cpu% dd -if /sys/src/9/pc/9pcf -bs 1 -iseek 2435165 -count 235557 >factotumcode
235557+0 records in
235557+0 records out
cpu% file factotumcode
factotumcode: 386 plan 9 executable
cpu% chmod +x factotumcode
cpu% ./factotumcode -h
usage: ./factotumcode [-DSdknpu] [-a authaddr] [-m mtpt] [-s service]
or ./factotumcode -g 'params'
The binaries in #/boot are stripped so a limited source of information.
------------------------------------------
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Tf05fe669bbc9ad57-M08556dcc7c567856103d9406
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription