{"record":{"id":"f6cb388aa13c0d88","repo":"golang/go","slug":"unsupported-architecture-q","errorCode":null,"errorMessage":"unsupported architecture %q","messagePattern":"unsupported architecture %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/internal/disasm/disasm.go","lineNumber":74,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpcln, err := e.PCLineTable()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttextStart, textBytes, err := e.Text()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tgoarch := e.GOARCH()\n\tdisasm := disasms[goarch]\n\tbyteOrder := byteOrders[goarch]\n\tif disasm == nil || byteOrder == nil {\n\t\treturn nil, fmt.Errorf(\"unsupported architecture %q\", goarch)\n\t}\n\n\t// Filter out section symbols, overwriting syms in place.\n\tkeep := syms[:0]\n\tfor _, sym := range syms {\n\t\tswitch sym.Name {\n\t\tcase \"runtime.text\", \"text\", \"_text\", \"runtime.etext\", \"etext\", \"_etext\":\n\t\t\t// drop\n\t\tdefault:\n\t\t\tkeep = append(keep, sym)\n\t\t}\n\t}\n\tsyms = keep\n\td := &Disasm{\n\t\tsyms:      syms,\n\t\tpcln:      pcln,\n\t\ttext:      textBytes,\n\t\ttextStart: textStart,","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/internal/disasm/disasm.go#L56-L92","documentation":"Returned when both disasms[goarch] and byteOrders[goarch] are nil for the executable's GOARCH. The disassembler supports only 386, amd64, arm, arm64, loong64, ppc64, ppc64le, riscv64, s390x (see the disasms/byteOrders maps at disasm.go:442). Architectures like mips/mipsle/mips64/wasm have no disassembler entry and trip this guard.","triggerScenarios":"Calling `go tool objdump` (or disasm.New on a binary) whose GOARCH is not in the supported set — e.g. a wasm binary, a MIPS binary, or any future/less-common arch. e.GOARCH() returns the arch string and the map lookup yields nil.","commonSituations":"Running objdump on GOOS=js GOARCH=wasm modules, on GOARCH=mips64le embedded targets, or cross-disassembling a binary built for an arch the toolchain doesn't disassemble. Also after a toolchain downgrade that drops a recently added arch.","solutions":["Confirm the binary's architecture with `go version <bin>` or `file <bin>` and that it is one of the supported set.","If you need wasm/MIPS disassembly, use an external disassembler (wasm2wat, objdump from binutils for mips).","Upgrade the Go toolchain — newly supported arches are added over time.","Rebuild the binary for a supported GOARCH if disassembly is essential."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"386\":true,\"amd64\":true,\"arm\":true,\"arm64\":true,\"loong64\":true,\"ppc64\":true,\"ppc64le\":true,\"riscv64\":true,\"s390x\":true}\nif !supported[goarch] {\n    return fmt.Errorf(\"objdump unsupported for GOARCH=%s\", goarch)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `go version <bin>` before invoking objdump.","Keep an external disassembler (binutils objdump, wasm2wat) for unsupported arches.","Upgrade the toolchain — support is added over releases."],"tags":["disasm","objdump","architecture","toolchain"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:31:55.035Z"}