golang/go · error

symbol %s listed multiple times

Error message

symbol %s listed multiple times

What it means

Error "symbol %s listed multiple times" thrown in golang/go.

Source

Thrown at src/cmd/link/internal/loadpe/ldpe.go:594

				return nil, fmt.Errorf("internal error: preexisting COMDAT definition for %q", name)
			}
			comdatDefinitions[l.SymName(s)] = sz
		}
	}

	// Sort outer lists by address, adding to textp.
	// This keeps textp in increasing address order.
	for _, sect := range f.Sections {
		s := state.sectsyms[sect]
		if s == 0 {
			continue
		}
		l.SortSub(s)
		importSymsState.secSyms = append(importSymsState.secSyms, s)
		if l.SymType(s).IsText() {
			for ; s != 0; s = l.SubSym(s) {
				if l.AttrOnList(s) {
					return nil, fmt.Errorf("symbol %s listed multiple times", l.SymName(s))
				}
				l.SetAttrOnList(s, true)
				ls.Textp = append(ls.Textp, s)
			}
		}
	}

	if pdata != 0 {
		subs, err := processSEH(l, arch, pdata)
		if err != nil {
			return nil, err
		}
		ls.PData = subs
	}

	return &ls, nil
}

View on GitHub (pinned to b6b368adc5)

When it happens

Trigger: Thrown at src/cmd/link/internal/loadpe/ldpe.go:594 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of golang/go@b6b368adc5 (2026-08-12). Data as JSON: /api/errors/2a9ecf18a81964e3. Report an issue: GitHub.