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

build: reconsider use of -s and -w #14436

Closed
maddyblue opened this issue Mar 29, 2017 · 6 comments
Closed

build: reconsider use of -s and -w #14436

maddyblue opened this issue Mar 29, 2017 · 6 comments

Comments

@maddyblue
Copy link
Contributor

See:

https://twitter.com/rakyll/status/846860908353634308
https://twitter.com/davecheney/status/846844080227213312
golang/go#19753

@bdarnell
Copy link
Contributor

Note that while we've only recently started using -s and -w, we had been using strip in our beta release binaries for a long time before that (see #14224), with no known issues. In the absence of more specific concerns with stripped binaries, I'm fine with continuing to do so.

@tamird
Copy link
Contributor

tamird commented Mar 29, 2017

That twitter conversation is a marvel of FUD.

@bdarnell
Copy link
Contributor

It turns out that -ldflags -s is also a workaround for golang/go#19741

@maddyblue
Copy link
Contributor Author

While it may be FUD, those are 2 pretty reliable sources. Dave's argument is that since it isn't tested it's not guaranteed to work. JBD doesn't have an argument, but is on the Go team, so worth considering. I don't think we need to change anything since we've been doing this (-s/-w or strip) for a while now without any visible problems, but we should keep track of that Go issue to see where it goes.

@bdarnell
Copy link
Contributor

As a counterpoint, there's this message from Russ Cox:

To answer the original question, I don't think we have to do anything to "support" this, any more than we "support" readelf or objdump or anything else. We don't intentionally do anything that would make stripping a binary not OK, and strip has worked for the past five years or so. What didn't work was using -s with the linker (that is very different from invoking strip), and even that has worked for the past five years or so.

I don't believe a test in all.bash is needed.

@tamird
Copy link
Contributor

tamird commented Mar 29, 2017

golang/go@94c95d3

@tamird tamird closed this as completed Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants