> ld: elide the Go symbol table when using -s Usually -s means just make ...
13 years, 8 months ago
(2011-06-27 14:09:17 UTC)
#3
> ld: elide the Go symbol table when using -s
Usually -s means just make the binary smaller at a cost
of debuggability. Here it means make the binary smaller
at a cost of runtime functionality (panic backtraces don't
work, etc).
While this might be the correct implementation of -s I'm still
a bit wary of it.
Russ
> Usually -s means just make the binary smaller at a cost > of debuggability. ...
13 years, 8 months ago
(2011-06-27 15:57:59 UTC)
#4
> Usually -s means just make the binary smaller at a cost
> of debuggability. Here it means make the binary smaller
> at a cost of runtime functionality (panic backtraces don't
> work, etc).
That's a good point indeed. The application author will have a much
harder time sorting out field problems.
What about adding a separate flag which is more aggressive, and
perhaps implies -s? -e for "embedded" might be nice.
--
Gustavo Niemeyer
http://niemeyer.nethttp://niemeyer.net/bloghttp://niemeyer.net/twitter
> That's a good point indeed. The application author will have a much > harder ...
13 years, 8 months ago
(2011-06-27 16:00:01 UTC)
#5
> That's a good point indeed. The application author will have a much
> harder time sorting out field problems.
>
> What about adding a separate flag which is more aggressive, and
> perhaps implies -s? -e for "embedded" might be nice.
Why? Is someone using -s?
> Why? Is someone using -s? I am interested in having significantly smaller binaries, so ...
13 years, 8 months ago
(2011-06-27 16:18:20 UTC)
#6
> Why? Is someone using -s?
I am interested in having significantly smaller binaries, so that Go
may eventually be used in an embedded environment, so both -s and the
lack of Go symbols are very attractive. That said, if you feel -s
isn't popular, then it should be fine to use the same flag to strip Go
symbols too.
What we shouldn't do is allowing "strip" to remove the Go symbols by
default, because distributions packaging Go software will certainly
strip debug info out when packaging, and this will hurt authors
unintendedly. This also means that one way or another it'll be
possible to get the "no debug, with symbols" situation.
--
Gustavo Niemeyer
http://niemeyer.nethttp://niemeyer.net/bloghttp://niemeyer.net/twitter
> What we shouldn't do is allowing "strip" to remove the Go symbols by > ...
13 years, 8 months ago
(2011-06-27 16:20:12 UTC)
#7
> What we shouldn't do is allowing "strip" to remove the Go symbols by
> default, because distributions packaging Go software will certainly
> strip debug info out when packaging, and this will hurt authors
> unintendedly. This also means that one way or another it'll be
> possible to get the "no debug, with symbols" situation.
Yes, I agree that strip cannot break Go binaries.
Russ Cox <rsc@golang.org> once said: > Usually -s means just make the binary smaller at ...
13 years, 8 months ago
(2011-06-27 18:38:10 UTC)
#8
Russ Cox <rsc@golang.org> once said:
> Usually -s means just make the binary smaller at a cost
> of debuggability. Here it means make the binary smaller
> at a cost of runtime functionality (panic backtraces don't
> work, etc).
I knew someone was going to mention this. :)
But currently if you link with -s, you don't
get correct line numbers in a stack trace
because pclntab doesn't exist.
Anthony
Issue 4661050: code review 4661050: ld: elide the Go symbol table when using -s
(Closed)
Created 13 years, 8 months ago by ality
Modified 13 years, 8 months ago
Reviewers:
Base URL:
Comments: 0