Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: If strip the windows binary with binutils it won't run. #59193

Closed
jclab-joseph opened this issue Mar 23, 2023 · 2 comments
Closed

cmd/go: If strip the windows binary with binutils it won't run. #59193

jclab-joseph opened this issue Mar 23, 2023 · 2 comments

Comments

@jclab-joseph
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.20.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOOS="windows"
GOVERSION="go1.20.2"
GCCGO="gccgo"

What did you do?

See https://github.com/jclab-joseph/issue-go-windows-strip-not-working

The file built with the go build were stripped through binutils.
The stripped file runs on linux, but not on windows.
I'd like to keep the debug files separate to reduce the size.

What did you expect to see?

It should work on Windows PC.

What did you see instead?

image

@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2023

This doesn't seem like a cmd/go bug at all. If you're using binutils to modify a binary that runs, and it produces a binary that doesn't run, you should open an issue against binutils.

If you build a binary using the Go toolchain, and then you break that binary using a third-party tool, that's not the fault of the Go toolchain. 🙃

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2023
@bcmills bcmills added the GoCommand cmd/go label Mar 23, 2023
@bcmills bcmills added this to the Unplanned milestone Mar 23, 2023
@jclab-joseph
Copy link
Author

jclab-joseph commented Mar 24, 2023

I don't think so... It always works fine except for go-lang.

Isn't go-lang producing non-generic binaries?

image

@golang golang locked and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants