cmd/link: executables built with go1.26 lack DIE for runtime.firstmoduledata
$ go version
go version go1.26-devel_0d0d5c9a82 Fri Dec 5 17:31:30 2025 -0800 linux/amd64
All operating systems and architectures affected, but mostly this is about Windows in particular.
Commit 9f5cd43fe612834e78b838c1e704bf7a98011749, reviewed on https://go.dev/cl/720660 moved the module data to its own sections, as a side effect the DIE for runtime.firstmoduledata disappeared. This DIE is used by Delve (and also, I think, by viewcore) to resolve the type of interface variables.
Using the .go.module section is, of course, fine (even preferrable). However PE executables do not seem to have this section.
Should we fake the runtime.firstmoduledata DIE? Should we add the '.go.module' section to PE executables? Should Delve (and viewcore) use the symboltable on windows specifically?
cc @ianlancetaylor
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
The DWARF DIE for runtime.firstmoduledata should still be present. I don't know why it disappeared. I am looking into it.
Found the problem, will send CL. Thanks for reporting it.
Change https://go.dev/cl/727760 mentions this issue: cmd/link: generate DWARF for moduledata