1
0
mirror of https://github.com/golang/go synced 2024-11-16 18:04:39 -07:00
The Go programming language
Go to file
Paul E. Murphy 29d5272da8 all: generate NOTOC shared code on power10/PPC64/linux
An explicit TOC pointer is not needed when building with GOPPC64=power10
on linux/PPC64 as all addressing is PC relative.

Apply changes to the compiler, assembler, and linker to remove R2/TOC
maintenance in these build configurations.

This results in noticeably smaller PIC binaries. For example the size
(in bytes) of the k8s binaries before and with this patch:

	GOFLAGS="-buildmode=pie" \
	FORCE_HOST_GO=y \
	GOPPC64=power10 \
	CGO_CFLAGS="-mcpu=power10 -O2 -g" \
	make all

         apiextensions-apiserver   66060288   64487424   -1572864  -2.38%
                   e2e_node.test  163520856  159850760   -3670096  -2.24%
                        e2e.test  178167304  174890432   -3276872  -1.83%
                          ginkgo   11010048   10747904    -262144  -2.38%
                       go-runner    2162688    2162688          0      0%
                       k8s-tests  170182216  166970880   -3211336  -1.88%
                         kubeadm   52625408   51314688   -1310720  -2.49%
                 kube-aggregator   62849024   61341696   -1507328  -2.39%
                  kube-apiserver  147783680  144375808   -3407872  -2.30%
         kube-controller-manager  131137536  127991808   -3145728  -2.39%
                         kubectl   53608448   52363264   -1245184  -2.32%
                 kubectl-convert   52625408   51314688   -1310720  -2.49%
                         kubelet  120913920  118095872   -2818048  -2.33%
                 kube-log-runner    1900544    1835008     -65536  -3.44%
                        kubemark  119078912  116326400   -2752512  -2.31%
                      kube-proxy   58392576   56885248   -1507328  -2.58%
                  kube-scheduler   60751872   59244544   -1507328  -2.48%
                         mounter    1835008    1769472     -65536  -3.57%
               watch-termination   38076416   37158912    -917504  -2.40%

And text size changes:

         apiextensions-apiserver   30243288   28654116   -1589172  -5.25%
                   e2e_node.test   71132064   67520288   -3611776  -5.07%
                        e2e.test   61843984   58635088   -3208896  -5.18%
                          ginkgo    4975916    4769304    -206612  -4.15%
                       go-runner     896532     858400     -38132  -4.25%
                       k8s-tests   60925792   57752032   -3173760  -5.20%
                         kubeadm   24643240   23404100   -1239140  -5.02%
                 kube-aggregator   28688060   27160976   -1527084  -5.32%
                  kube-apiserver   65627332   62259460   -3367872  -5.13%
         kube-controller-manager   56773844   53706532   -3067312  -5.40%
                         kubectl   24344276   23080640   -1263636  -5.19%
                 kubectl-convert   23733764   22521768   -1211996  -5.10%
                         kubelet   52494580   49720340   -2774240  -5.28%
                 kube-log-runner     787128     753232     -33896  -4.30%
                        kubemark   51576580   48837380   -2739200  -5.31%
                      kube-proxy   26541092   25124080   -1417012  -5.33%
                  kube-scheduler   27448512   25976172   -1472340  -5.36%
                         mounter     744100     712628     -31472  -4.22%
               watch-termination   18047276   17139912    -907364  -5.02%

Change-Id: Ib4872823b06f93861e46a00679b5d4e5e30b538a
Reviewed-on: https://go-review.googlesource.com/c/go/+/495416
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-05-19 21:12:48 +00:00
.github doc: normalize proposal-process links 2023-03-29 22:00:27 +00:00
api cmp: new package 2023-05-19 17:41:52 +00:00
doc slices: add in-place Reverse function 2023-05-19 00:43:02 +00:00
lib/time lib/time: update to 2023c/2023c 2023-05-03 20:14:11 +00:00
misc misc: remove misc/arm/a script 2023-05-15 15:42:24 +00:00
src all: generate NOTOC shared code on power10/PPC64/linux 2023-05-19 21:12:48 +00:00
test cmd/compile: constant-fold loads from constant dictionaries and types 2023-05-19 18:10:11 +00:00
.gitattributes all: treat all files as binary, but check in .bat with CRLF 2020-06-08 15:31:43 +00:00
.gitignore cmd/dist: refactor generated cgo-support logic 2023-04-20 17:26:46 +00:00
codereview.cfg codereview.cfg: add codereview.cfg for master branch 2021-02-19 18:44:53 +00:00
CONTRIBUTING.md doc: normalize proposal-process links 2023-03-29 22:00:27 +00:00
go.env cmd/go: introduce GOROOT/go.env and move proxy/sumdb config there 2023-01-17 23:10:39 +00:00
LICENSE
PATENTS
README.md README: update from CC-BY-3.0 to CC-BY-4.0 2022-11-02 20:14:56 +00:00
SECURITY.md SECURITY.md: replace golang.org with go.dev 2022-04-26 19:59:47 +00:00

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 4.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.

Download and Install

Binary Distributions

Official binary distributions are available at https://go.dev/dl/.

After downloading a binary release, visit https://go.dev/doc/install for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.