feat: drop Mach-O and macOS support, Linux-only
This commit is contained in:
@@ -28,7 +28,7 @@ gasm profile show basic-block structure of functions
|
||||
> **Status: Phase 4 — done, Phase 5 underway.** Phase 1 (the language
|
||||
> foundation, linter, formatter and language server) shipped in v0.1.0;
|
||||
> Phase 2 (the standalone assembler — the full amd64 instruction set plus
|
||||
> ELF, Mach-O and GOOBJ object emission) in v0.12.0; Phase 3 (dynamic
|
||||
> ELF and GOOBJ object emission) in v0.12.0; Phase 3 (dynamic
|
||||
> analysis — JIT execution, differential testing, ABI checks and coverage
|
||||
> profiling) in v0.25.0; Phase 4 (interactive debugger — ptrace-based,
|
||||
> breakpoints, watchpoints, stepping, vector register display, named buffer
|
||||
@@ -56,9 +56,13 @@ carries the traditional conditional-jump spellings (`JZ`, `JNZ`, `JA`, `JC`,
|
||||
command — `just gen` — and requires only a Go installation; the committed
|
||||
output has no runtime dependency on the toolchain.
|
||||
|
||||
The target *architectures* above are what the toolkit analyses. The toolkit
|
||||
itself is portable Go and builds on Linux, FreeBSD and macOS, on amd64 and
|
||||
arm64 hosts.
|
||||
## Supported Platforms
|
||||
|
||||
The toolkit runs on Linux. All four Linux architectures are supported as
|
||||
hosts — amd64, arm64, riscv64 and loong64 — and the release matrix
|
||||
cross-compiles the same four targets.
|
||||
|
||||
**FreeBSD support is planned for a future release.**
|
||||
|
||||
## Roadmap
|
||||
|
||||
@@ -133,14 +137,14 @@ Done so far:
|
||||
stack deltas, `pcfile`, `pcline`, `pcinline`). Verified end-to-end by
|
||||
swapping a gasm-emitted object into a `go build` in place of the
|
||||
toolchain's, linking and running — bit-identical behaviour.
|
||||
- **Object-file emission** — `gasm asm --format elf` / `--format macho`
|
||||
writes a relocatable object (a `.text` and a `.data` section, a symbol
|
||||
table — file-local `<>` symbols local, the rest global — and one
|
||||
`R_X86_64_PC32` / `X86_64_RELOC_SIGNED` relocation per static-symbol
|
||||
reference) that links with the system toolchain: external references
|
||||
resolve against undefined symbols, file-local ones against the data
|
||||
section. Verified end-to-end by linking a gasm-emitted object with a C
|
||||
driver and running it.
|
||||
- **Object-file emission** — `gasm asm --format elf` writes a relocatable
|
||||
object (a `.text` and a `.data` section, a symbol table — file-local `<>`
|
||||
symbols local, the rest global — and one `R_X86_64_PC32` relocation per
|
||||
static-symbol reference) that links with the system toolchain: external
|
||||
references resolve against undefined symbols, file-local ones against the
|
||||
data section. Verified end-to-end by linking a gasm-emitted object with
|
||||
a C driver and running it. RISC-V uses the equivalent `R_RISCV_PCREL_HI20`
|
||||
/ `R_RISCV_PCREL_LO12_I` pair for AUIPC+JAL/JALR sequences.
|
||||
- **`FP`/`SP` frame mapping** — the pseudo-registers are translated onto the
|
||||
hardware stack pointer (`x+N(FP)` → `(N+8)(SP)` for a zero frame, `(N+frame+
|
||||
16)(SP)` with a frame pointer; locals via `x-N(SP)`), and the Go-style
|
||||
@@ -256,8 +260,7 @@ portable Go implementation every kernel is derived from.
|
||||
label resolution, breakpoint management via `/proc/pid/mem`, named
|
||||
buffer allocation with pattern filling (`--buf`), and an interactive REPL.
|
||||
- **Remaining:** disassembly at PC (x86asm decode), memory-write support,
|
||||
watchpoints, source-line mapping, and multi-platform support
|
||||
(FreeBSD/macOS ptrace variants).
|
||||
watchpoints, and source-line mapping.
|
||||
|
||||
### Phase 5 — the other architectures · *in progress*
|
||||
|
||||
@@ -277,8 +280,9 @@ portable Go implementation every kernel is derived from.
|
||||
dependency, `golang.org/x/arch`, is used **only in tests** to validate the
|
||||
instruction encoder by round-trip decoding — it is never linked into the
|
||||
`gasm` binary.
|
||||
- **Portable.** Builds and runs on Linux, FreeBSD and macOS; amd64 and arm64
|
||||
hosts. Latest stable Go only.
|
||||
- **Linux-only.** Runs natively on amd64, arm64, riscv64 and loong64 Linux
|
||||
hosts; the release matrix cross-compiles the same four targets. Latest
|
||||
stable Go only.
|
||||
- **No vendor lock-in.** The integration surface is the Language Server
|
||||
Protocol and a command-line interface — both open standards. No cloud
|
||||
service, no proprietary API, no dependence on any one editor's internals.
|
||||
@@ -297,7 +301,7 @@ portable Go implementation every kernel is derived from.
|
||||
| `arch` | amd64, arm64, riscv64 and loong64 register files and instruction tables. |
|
||||
| `lint` | Conservative static checks. |
|
||||
| `format` | A canonical formatter — `gofmt` for assembly. |
|
||||
| `asm` | The standalone assembler: amd64 and RISC-V encoders, linker, object-file emitters (ELF, Mach-O, GOOBJ). |
|
||||
| `asm` | The standalone assembler: amd64 and RISC-V encoders, linker, object-file emitters (ELF, GOOBJ). |
|
||||
| `verify` | JIT execution substrate for dynamic analysis, combined ABI+fuzz differential testing (Phase 3). |
|
||||
| `debug` | Interactive ptrace debugger with GPR/YMM register display and named buffer allocation (Phase 4). |
|
||||
| `lsp` | Language Server Protocol server. |
|
||||
@@ -305,9 +309,8 @@ portable Go implementation every kernel is derived from.
|
||||
| `_gen` | The generator that rebuilds the instruction tables from the Go toolchain. |
|
||||
|
||||
See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for the design rationale and
|
||||
data flow, [`docs/ZED.md`](docs/ZED.md) for the editor-integration story, and
|
||||
[`docs/DEFERRED.md`](docs/DEFERRED.md) for design decisions deliberately
|
||||
postponed (with the analysis needed to pick them up again).
|
||||
data flow, and [`docs/DEFERRED.md`](docs/DEFERRED.md) for design decisions
|
||||
deliberately postponed (with the analysis needed to pick them up again).
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -353,10 +356,6 @@ binary and associate it with `.s` files. Syntax highlighting is delivered as
|
||||
infers the target architecture from the file-name suffix
|
||||
(`_amd64.s` / `_arm64.s` / `_riscv64.s` / `_loong64.s`).
|
||||
|
||||
Zed users should read [`docs/ZED.md`](docs/ZED.md): Zed's native highlighting
|
||||
engine (Tree-sitter, C/WASM) cannot be fed from pure Go, so the pure-Go path
|
||||
into Zed is the language server and its semantic tokens.
|
||||
|
||||
## Licence
|
||||
|
||||
BSD-3-Clause — the same licence as Go itself. See [`LICENSE`](LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user