-
-
Notifications
You must be signed in to change notification settings - Fork 680
If the program has its own directory, check for the files README.md
(original author's) and README.cosmo
(Cosmo-specific changelog). If it's in third_party/
, look for its help files online.
If that fails, check the source code for comments and documentation strings. If that's still not good enough, try reading the code -- understandable code is a priority for the developers.
All Cosmo binaries include two special flags: --strace
which echoes system calls, and --ftrace
which echoes function calls. This provides visibility into your program on a level that normally requires a debugger.
An example: the program runs fine when run straight from the command line, but usage from find -exec
fails with the error ENOACCESS
.
- Running the program under a shell invocation, such as
sh -c 'binary.com args...'
may succeed. - Every Cosmopolitan binary can strip its own headers, to fit your native binary format with
binary.com --assimilate
. This is non-reversible and means that the program will no longer work on systems with different executable formats (the groups being Windows, Linux/BSD, and Mac). However, it may dodge this issue. Be sure to back up your programs before running.
Some Cosmo executables can be used as ZIP archives, such as Redbean, Lua.com, QuickJS. You should be able to easily view their contents with any ZIP program. However, inserting files into the ZIP archive is much more tricky and should only be done using the included third_party/zip/zip.com
. This is a port of the original PKZIP source. Although the Cosmo ZIP implementation follows the PKZIP specification, every ZIP program tested so far does not adhere strictly enough to the spec to avoid damaging the executable.