News for hackers. Stuff that matters.
Re:Static Executables with SBCL v2 by jart on Thursday February 25, 2021 @02:07PM (#26266786)
Musl is tired and Cosmopolitan wired, since it takes the fully static binary concept to a whole new level. SBCL should consider using it, since it lets your binaries run on Windows, Mac, FreeBSD, OpenBSD, and NetBSD too. https://github.com/jart/cosmopolitan See https://justine.lol/ape.html which talks about how the executable format is also a valid zip file, which was used to create a JavaScript interpreter that loads sources from itself in a single file. Another option for SBCL is to just use Cosmopolitan's research to implement the same thing from scratch. See files like https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s... and https://github.com/jart/cosmopolitan/blob/master/libc/sysv/c...
Re:Static Executables with SBCL v2 by rcgorton on Thursday February 25, 2021 @07:00PM (#26269982)
"tired and Cosmopolitan wired" This poster needs to be banned. Only relevant if you want an interpreter which runs an secondary interpreter, encapsulated in a .zip file.
Re:Static Executables with SBCL v2 by _roqj on Thursday February 25, 2021 @09:41PM (#26270892)
Cosmopolitan binaries aren't interpreted. They're just flat x86 binaries. It needs a 12kb runtime that's written in C. All the runtime does is (a) polyfills magic numbers for the SYSCALL instruction and (b) boot-load from BIOS to long mode on metal w/ linux kernel style negative memory page tables. So basically, it's just glue that takes care of the ugly low-level system details so you can bolt on whatever high level language interpreter you want. For example, the Wasm3 engine recently adopted it.