]> Cypherpunks repositories - gostls13.git/commit
cmd/link: when changing to Segrelrodata, reset datsize
authorIan Lance Taylor <iant@golang.org>
Tue, 26 Nov 2019 06:17:29 +0000 (22:17 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 5 Dec 2019 02:00:50 +0000 (02:00 +0000)
commit9a8b497240b7e77a81b1914adfbccb15a76d2c33
tree1aaecaf6b30a53e89d87e500469e2f902902fc89
parent8174f7fb2b64c221f7f80c9f7fd4d7eb317ac8bb
cmd/link: when changing to Segrelrodata, reset datsize

Otherwise we leave a gap at the start of Segrelrodata equal to the
size of the read-only non-relro data, which causes -buildmode=pie
executables to be noticeably larger than -buildmode=exe executables.

Change-Id: I98956ef29d5b7a57ad8e633c823ac09d9ca36a45
Reviewed-on: https://go-review.googlesource.com/c/go/+/208897
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/elf_test.go
src/cmd/link/internal/ld/data.go