You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at errorString, it's only used for panics.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
This is kind of odd, although I wouldn't call it a bug either. Certainly we don't support modifying the runtime like this.
I think the trigger is because Demo is being inlined. That means we get a runtime symbol defined in both the runtime .o and the main package .o.
I don't understand why that is a problem, though. Itab symbols like this should me marked DUPOK and deduplicated. Maybe something about the buildmode loses that DUPOK mark somewhere?
In any case, marking Demo with //go:noinline fixes it.
Go version
go1.23.2
Output of
go env
in your module/workspace:Doesn't matter.
What did you do?
I'm trying to customize some of the features in the runtime. However I ran into a problem.
To simplify, here is an example.
Add this function to runtime.
main.go
Build using
go build main.go
.What did you see happen?
go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/usr/bin/ld.gold: error: /tmp/go-link-2461440430/go.o: multiple definition of 'go:itab.runtime.errorString,error'
/usr/bin/ld.gold: /tmp/go-link-2461440430/go.o: previous definition here
collect2: error: ld returned 1 exit status
What did you expect to see?
Build success
The text was updated successfully, but these errors were encountered: