commit 85d2a637cf60fafa063216858e6129efb74d7087
parent 4c700b68454e1122cf38722505389124ca167189
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Tue, 2 Jun 2026 11:18:51 -0700
doc: document the new xxd/cmp/hash/disas/mc tools
Add the five byte-utility tools to the DRIVER.md tool table and the CLAUDE.md
code map (cmd/ list, include/ note for cfree/hash.h, test/tools/), and bump
the tool count in the DRIVER.md intro.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/DRIVER.md b/doc/DRIVER.md
@@ -1,8 +1,8 @@
# DRIVER
The `cfree` multitool is the toolchain's only executable: a single binary that
-dispatches to ~20 named tools (compiler, assembler, linker, archive/object
-utilities, JIT runner, debugger, emulator, packager). It is also the first and
+dispatches to ~24 named tools (compiler, assembler, linker, archive/object
+utilities, byte utilities, JIT runner, debugger, emulator, packager). It is also the first and
canonical *consumer* of libcfree — it depends only on the public API under
`include/cfree/`, never on `src/`. Everything that the OS provides (heap, file
I/O, executable memory, threads, signals, time, entropy) enters libcfree through
@@ -91,6 +91,11 @@ tool reaches into compiler internals.
| `strip` / `objcopy` | Drop debug/symbols; rename/remove sections, reformat. |
| `objdump` / `nm` / `size` | Inspect sections, symbols, disassembly, relocations, sizes. |
| `addr2line` / `strings` | Address→`file:line` via DWARF; printable runs. |
+| `xxd` | Hex dump *any* file (format-agnostic, unlike `objdump -s`); reverse a dump to binary (`-r`), plain (`-p`), C array (`-i`). |
+| `cmp` | Compare two files byte by byte; GNU/BSD-compatible messages and 0/1/2 exit codes. |
+| `hash` | SHA-256, BLAKE2b-256, or CRC-32 (`-a`) of files or stdin; coreutils-style output. Backed by the public `<cfree/hash.h>`. |
+| `disas` | Disassemble a raw, headerless byte buffer (file/stdin/inline `-x` hex) for a `-target` arch. |
+| `mc` | Assemble one instruction and show its encoding (llvm-mc style); lists any relocations. |
| `run` | JIT-compile inputs and call the entry symbol in-process. |
| `dbg` | Interactive JIT debugger (REPL over a `CfreeJitSession`). |
| `emu` | Run a guest user-mode ELF (aarch64/riscv64) via per-block JIT translation. |