feat(asm): add GOOBJ emission for RISC-V

This commit is contained in:
2026-08-05 09:27:00 +02:00
parent f58a4fe51d
commit 8ddac0135e
2 changed files with 357 additions and 1 deletions
+5 -1
View File
@@ -505,7 +505,11 @@ requires -p, the package path, and the installed Go toolchain).
obj, err = img.MachOObject()
kind = "Mach-O object"
case "goobj":
obj, err = img.GOObject(*pkg, path)
if targetArch == arch.RISCV {
obj, err = img.GOObjectRISCV(*pkg, path)
} else {
obj, err = img.GOObject(*pkg, path)
}
kind = "Go object"
default:
fmt.Fprintf(os.Stderr, "gasm asm: unknown format %q (want raw, elf, macho or goobj)\n", *format)