{"record":{"id":"d605888a7710ebd1","repo":"golang/go","slug":"no-s-symbol-found-d60588","errorCode":null,"errorMessage":"no %s symbol found","messagePattern":"no (.+?) symbol found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/internal/objfile/xcoff.go","lineNumber":123,"sourceCode":"\ttextStart = sect.VirtualAddress\n\ttext, err = sect.Data()\n\treturn\n}\n\nfunc findXCOFFSymbol(f *xcoff.File, name string) (*xcoff.Symbol, error) {\n\tfor _, s := range f.Symbols {\n\t\tif s.Name != name {\n\t\t\tcontinue\n\t\t}\n\t\tif s.SectionNumber <= 0 {\n\t\t\treturn nil, fmt.Errorf(\"symbol %s: invalid section number %d\", name, s.SectionNumber)\n\t\t}\n\t\tif len(f.Sections) < s.SectionNumber {\n\t\t\treturn nil, fmt.Errorf(\"symbol %s: section number %d is larger than max %d\", name, s.SectionNumber, len(f.Sections))\n\t\t}\n\t\treturn s, nil\n\t}\n\treturn nil, fmt.Errorf(\"no %s symbol found\", name)\n}\n\nfunc loadXCOFFTable(f *xcoff.File, sname, ename string) ([]byte, error) {\n\tssym, err := findXCOFFSymbol(f, sname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tesym, err := findXCOFFSymbol(f, ename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif ssym.SectionNumber != esym.SectionNumber {\n\t\treturn nil, fmt.Errorf(\"%s and %s symbols must be in the same section\", sname, ename)\n\t}\n\tsect := f.Sections[ssym.SectionNumber-1]\n\tdata, err := sect.Data()\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/internal/objfile/xcoff.go#L105-L141","documentation":"findXCOFFSymbol iterates the XCOFF symbol table for an exact Name match. If no symbol matches, the requested name is absent — typically used to locate runtime.pclntab/runtime.epclntab needed for function metadata.","triggerScenarios":"Calling findXCOFFSymbol with a name that does not appear in f.Symbols.","commonSituations":"An XCOFF Go binary stripped of its pclntab symbols, a non-Go XCOFF binary, or the wrong symbol name for the binary's Go version.","solutions":["Rebuild the AIX binary without stripping pclntab symbols.","Confirm the binary is a Go-produced XCOFF executable.","Use the symbol names appropriate to the binary's Go version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// s, err := findXCOFFSymbol(f, name)\n// if err != nil {\n//     // 'no <name> symbol found' -> stripped or wrong binary\n//     return nil, err\n// }","preventionTips":["Keep pclntab/epclntab symbols intact on AIX binaries.","Confirm the binary is a Go-produced XCOFF executable.","Use symbol names matching the binary's Go version."],"tags":["xcoff","aix","symbol","objfile","pclntab"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}