{"record":{"id":"d0bdd5d3ae39bbb0","repo":"golang/go","slug":"unexpected-flags-06x-for-pe-section-s","errorCode":null,"errorMessage":"unexpected flags %#06x for PE section %s","messagePattern":"unexpected flags %#06x for PE section (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/link/internal/loadpe/ldpe.go","lineNumber":301,"sourceCode":"\t\tcase pe.IMAGE_SCN_CNT_INITIALIZED_DATA | pe.IMAGE_SCN_MEM_READ: //.rdata\n\t\t\tif issehsect(arch, sect) {\n\t\t\t\tbld.SetType(sym.SSEHSECT)\n\t\t\t\tbld.SetAlign(4)\n\t\t\t} else {\n\t\t\t\tbld.SetType(sym.SRODATA)\n\t\t\t}\n\n\t\tcase pe.IMAGE_SCN_CNT_UNINITIALIZED_DATA | pe.IMAGE_SCN_MEM_READ | pe.IMAGE_SCN_MEM_WRITE: //.bss\n\t\t\tbld.SetType(sym.SNOPTRBSS)\n\n\t\tcase pe.IMAGE_SCN_CNT_INITIALIZED_DATA | pe.IMAGE_SCN_MEM_READ | pe.IMAGE_SCN_MEM_WRITE: //.data\n\t\t\tbld.SetType(sym.SNOPTRDATA)\n\n\t\tcase pe.IMAGE_SCN_CNT_CODE | pe.IMAGE_SCN_MEM_EXECUTE | pe.IMAGE_SCN_MEM_READ: //.text\n\t\t\tbld.SetType(sym.STEXT)\n\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unexpected flags %#06x for PE section %s\", sect.Characteristics, sect.Name)\n\t\t}\n\n\t\tif bld.Type() != sym.SNOPTRBSS {\n\t\t\tdata, err := sect.Data()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tstate.sectdata[sect] = data\n\t\t\tbld.SetData(data)\n\t\t}\n\t\tbld.SetSize(int64(sect.Size))\n\t\tstate.sectsyms[sect] = s\n\t\tif sect.Name == \".rsrc\" || strings.HasPrefix(sect.Name, \".rsrc$\") {\n\t\t\tls.Resources = append(ls.Resources, s)\n\t\t} else if bld.Type() == sym.SSEHSECT {\n\t\t\tif sect.Name == \".pdata\" {\n\t\t\t\tpdata = s\n\t\t\t} else if sect.Name == \".xdata\" {","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/link/internal/loadpe/ldpe.go#L283-L319","documentation":"Error \"unexpected flags %#06x for PE section %s\" thrown in golang/go.","triggerScenarios":"Thrown at src/cmd/link/internal/loadpe/ldpe.go:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}