{"record":{"id":"cea756bf75ce20fd","repo":"go-delve/delve","slug":"could-not-create-symbol-table-from-s","errorCode":null,"errorMessage":"could not create symbol table from  %s ","messagePattern":"could not create symbol table from  (.+?) ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/pclntab.go","lineNumber":34,"sourceCode":"\tsection := exe.Section(sectionLabel)\n\tif section == nil {\n\t\t// binary may be built with -pie\n\t\tsectionLabel = \".data.rel.ro.gopclntab\"\n\t\tsection = exe.Section(sectionLabel)\n\t\tif section == nil {\n\t\t\treturn nil, 0, errors.New(\"could not read section .gopclntab\")\n\t\t}\n\t}\n\ttableData, err := section.Data()\n\tif err != nil {\n\t\treturn nil, 0, errors.New(\"found section but could not read .gopclntab\")\n\t}\n\n\taddr := exe.Section(\".text\").Addr\n\tlineTable := gosym.NewLineTable(tableData, addr)\n\tsymTable, err := gosym.NewTable([]byte{}, lineTable)\n\tif err != nil {\n\t\treturn nil, 0, fmt.Errorf(\"could not create symbol table from  %s \", path)\n\t}\n\treturn symTable, section.Addr, nil\n}\n\nfunc readPcLnTableMacho(exe *macho.File, path string) (*gosym.Table, uint64, error) {\n\t// Default section label is __gopclntab\n\tsectionLabel := \"__gopclntab\"\n\n\tsection := exe.Section(sectionLabel)\n\tif section == nil {\n\t\treturn nil, 0, errors.New(\"could not read section __gopclntab\")\n\t}\n\ttableData, err := section.Data()\n\tif err != nil {\n\t\treturn nil, 0, errors.New(\"found section but could not read __gopclntab\")\n\t}\n\n\taddr := exe.Section(\"__text\").Addr","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/pclntab.go#L16-L52","documentation":"Delve parses the Go pclntab (`.gopclntab` section) of an ELF binary to build a gosym symbol table for Go runtime-based line/function lookup. gosym.NewTable returned an error, meaning the section data is not a valid pclntab for the expected Go version format.","triggerScenarios":"Calling loadBinaryInfoGoRuntimeElf on an ELF binary whose .gopclntab is missing, truncated, or built with a Go version whose pclntab magic/format gosym cannot parse (e.g. stripped or corrupted binary).","commonSituations":"Debugging a binary from a Go version newer than the Go version Delve was compiled with; a binary that has been aggressively stripped or modified; a non-Go binary that happens to have a .gopclntab-like section; corrupted download/copy of the executable.","solutions":["Rebuild the target binary with a recent Go toolchain (go build without stripping flags)","Do not strip the binary: remove -ldflags \"-s -w\" or any section-stripping step","Update Delve to the latest version so gosym supports the target's pclntab format","Verify the binary isn't corrupted (re-download, check checksum)"],"exampleFix":"// before\ngo build -ldflags=\"-s -w\" -o app .\n// after\ngo build -o app .","handlingStrategy":"validation","validationCode":"data := elfSection(exe, \".gopclntab\"); if data == nil || len(data) < 8 { return errors.New(\"missing or empty .gopclntab\") }; magic := binary.LittleEndian.Uint32(data); if !validPclntabMagic(magic) { return errors.New(\"unsupported pclntab format\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never ship stripped (-s -w) binaries you intend to debug","Keep Delve updated alongside your Go toolchain","Verify the target is a real Go binary before Go-runtime symbol loading","Checksum binaries before use to rule out corruption"],"tags":["go","elf","pclntab","symbol-table"],"backgroundTag":"pclntab-parse-failed","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}