commit | 7f9e0220cdc3516308d24bba4ef8180b6a923a27 | [log] [tgz] |
---|---|---|
author | Josh Bleecher Snyder <josharian@gmail.com> | Thu Apr 11 18:05:19 2019 -0700 |
committer | Josh Bleecher Snyder <josharian@gmail.com> | Fri Apr 12 03:48:13 2019 +0000 |
tree | 36454159342bc098863ceec534a99fdbf11476c4 | |
parent | 4e2b4d7fb2343ea5a05fcb9da821b6912ca86893 [diff] |
cmd/link: fix off-by-one in ftabaddstring ftabaddstring adds a string to the pclntab. The pclntab uses C strings, so the code added 1 to the length. However, it also added an extraneous 1 in the Grow call. Remove that. While we're here, simplify, document, remove an unnecessary parameter, and remove some unnecessary conversions. Shaves off a few bytes here and there, and thus updates #6853. file before after Δ % go 14671316 14659028 -12288 -0.084% addr2line 4280552 4276456 -4096 -0.096% api 6058936 6050744 -8192 -0.135% buildid 2861040 2856944 -4096 -0.143% cgo 4867912 4863816 -4096 -0.084% compile 25770104 25753720 -16384 -0.064% cover 5286888 5282792 -4096 -0.077% dist 3634048 3629952 -4096 -0.113% doc 4691000 4686904 -4096 -0.087% fix 3393736 3389640 -4096 -0.121% link 6109280 6105184 -4096 -0.067% nm 4225960 4221864 -4096 -0.097% objdump 4636520 4632424 -4096 -0.088% pack 2285200 2281104 -4096 -0.179% pprof 14657508 14645220 -12288 -0.084% test2json 2818568 2814472 -4096 -0.145% trace 11618524 11610332 -8192 -0.071% vet 8403544 8395352 -8192 -0.097% Change-Id: I20b1f541de5d3ed326dd937aad6a43801862df51 Reviewed-on: https://go-review.googlesource.com/c/go/+/171820 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.