<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/link/internal/ld/lib.go, branch dev.boringcrypto.go1.15</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>[dev.boringcrypto.go1.15] all: merge go1.15.14 into dev.boringcrypto.go1.15</title>
<updated>2021-07-14T09:35:26+00:00</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2021-07-14T09:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=ddf078e08dc61f38e26f9969dd2a2151a8c73904'/>
<id>ddf078e08dc61f38e26f9969dd2a2151a8c73904</id>
<content type='text'>
Change-Id: Ia5ae002730c2c0e6bea5e9a10bf335af3ef23e23
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ia5ae002730c2c0e6bea5e9a10bf335af3ef23e23
</pre>
</div>
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/link: pass arch-specific flags to external linker when testing supported flag</title>
<updated>2021-06-10T20:01:45+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-12-15T23:31:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=b4a2af26baa7e0eb28dd0fd88147f2c87604696e'/>
<id>b4a2af26baa7e0eb28dd0fd88147f2c87604696e</id>
<content type='text'>
When testing if a flag (e.g. "-no-pie") is supported by the
external linker, pass arch-specific flags (like "-marm").

In particular, on the ARM builder, if CGO_LDFLAGS=-march=armv6
is set, the C toolchain fails to build if -marm is not passed.

	# cc -march=armv6 1.c
	1.c: In function 'main':
	1.c:3:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
	 int main() {
	 ^~~

This makes the Go linker think "-no-pie" is not supported when it
actually is.

Passing -marm makes it work.

Fixes #46684.

Change-Id: I4e8b71f08818993cbbcb2494b310c68d812d6b50
Reviewed-on: https://go-review.googlesource.com/c/go/+/278592
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
(cherry picked from commit a318d56c1e6e89996a3852a780f45c792d860d64)
Reviewed-on: https://go-review.googlesource.com/c/go/+/326711
Run-TryBot: Carlos Amedee &lt;carlos@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When testing if a flag (e.g. "-no-pie") is supported by the
external linker, pass arch-specific flags (like "-marm").

In particular, on the ARM builder, if CGO_LDFLAGS=-march=armv6
is set, the C toolchain fails to build if -marm is not passed.

	# cc -march=armv6 1.c
	1.c: In function 'main':
	1.c:3:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
	 int main() {
	 ^~~

This makes the Go linker think "-no-pie" is not supported when it
actually is.

Passing -marm makes it work.

Fixes #46684.

Change-Id: I4e8b71f08818993cbbcb2494b310c68d812d6b50
Reviewed-on: https://go-review.googlesource.com/c/go/+/278592
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
(cherry picked from commit a318d56c1e6e89996a3852a780f45c792d860d64)
Reviewed-on: https://go-review.googlesource.com/c/go/+/326711
Run-TryBot: Carlos Amedee &lt;carlos@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[dev.boringcrypto.go1.15] all: merge go1.15.11 into dev.boringcrypto.go1.15</title>
<updated>2021-04-21T15:08:59+00:00</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2021-04-21T15:08:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=be25192f119eb66e29a59d8c66622080852cbb58'/>
<id>be25192f119eb66e29a59d8c66622080852cbb58</id>
<content type='text'>
Change-Id: I964039a36b7c2c6ef217717755ad78595a3b71fb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I964039a36b7c2c6ef217717755ad78595a3b71fb
</pre>
</div>
</content>
</entry>
<entry>
<title>[release-branch.go1.15] cmd/link: avoid exporting all symbols on windows buildmode=pie</title>
<updated>2021-03-31T21:39:47+00:00</updated>
<author>
<name>Quim Muntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2020-10-22T20:32:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=82f9c6cac1bcc6bc80f17d1415ac3f62c0afa6c5'/>
<id>82f9c6cac1bcc6bc80f17d1415ac3f62c0afa6c5</id>
<content type='text'>
Marking one functions with __declspec(dllexport) forces mingw to
create .reloc section without having to export all symbols.

See https://insights.sei.cmu.edu/cert/2018/08/when-aslr-is-not-really-aslr---the-case-of-incorrect-assumptions-and-bad-defaults.html for more info.

This change cuts 73kb of a "hello world" pie binary.

Updates #6853.
Updates #40795.
Fixes #43592.

Change-Id: I3cc57c3b64f61187550bc8751dfa085f106c8475
Reviewed-on: https://go-review.googlesource.com/c/go/+/264459
Trust: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/300692
Trust: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Marking one functions with __declspec(dllexport) forces mingw to
create .reloc section without having to export all symbols.

See https://insights.sei.cmu.edu/cert/2018/08/when-aslr-is-not-really-aslr---the-case-of-incorrect-assumptions-and-bad-defaults.html for more info.

This change cuts 73kb of a "hello world" pie binary.

Updates #6853.
Updates #40795.
Fixes #43592.

Change-Id: I3cc57c3b64f61187550bc8751dfa085f106c8475
Reviewed-on: https://go-review.googlesource.com/c/go/+/264459
Trust: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/300692
Trust: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[dev.boringcrypto.go1.15] all: merge go1.15.7 into dev.boringcrypto.go1.15</title>
<updated>2021-01-20T17:56:46+00:00</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2021-01-20T17:56:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=79ea7a16d7e3bc36e98a4b7afd997bb315e80a1c'/>
<id>79ea7a16d7e3bc36e98a4b7afd997bb315e80a1c</id>
<content type='text'>
Change-Id: I2d5a481ef3862f558467c6d71f46e483cc50e1fe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I2d5a481ef3862f558467c6d71f46e483cc50e1fe
</pre>
</div>
</content>
</entry>
<entry>
<title>[release-branch.go1.15-security] all: introduce and use internal/execabs</title>
<updated>2021-01-16T00:29:16+00:00</updated>
<author>
<name>Roland Shoemaker</name>
<email>roland@golang.org</email>
</author>
<published>2021-01-15T20:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=07e3195293ec510171d7d43ec8ac2bcb9cf00df4'/>
<id>07e3195293ec510171d7d43ec8ac2bcb9cf00df4</id>
<content type='text'>
Introduces a wrapper around os/exec, internal/execabs, for use in
all commands. This wrapper prevents exec.LookPath and exec.Command from
running executables in the current directory.

All imports of os/exec in non-test files in cmd/ are replaced with
imports of internal/execabs.

This issue was reported by RyotaK.

Fixes CVE-2021-3115

Change-Id: I0423451a6e27ec1e1d6f3fe929ab1ef69145c08f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955304
Reviewed-by: Russ Cox &lt;rsc@google.com&gt;
Reviewed-by: Katie Hockman &lt;katiehockman@google.com&gt;
(cherry picked from commit 44f09a6990ccf4db601cbf8208c89ac4e888f884)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955308
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduces a wrapper around os/exec, internal/execabs, for use in
all commands. This wrapper prevents exec.LookPath and exec.Command from
running executables in the current directory.

All imports of os/exec in non-test files in cmd/ are replaced with
imports of internal/execabs.

This issue was reported by RyotaK.

Fixes CVE-2021-3115

Change-Id: I0423451a6e27ec1e1d6f3fe929ab1ef69145c08f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955304
Reviewed-by: Russ Cox &lt;rsc@google.com&gt;
Reviewed-by: Katie Hockman &lt;katiehockman@google.com&gt;
(cherry picked from commit 44f09a6990ccf4db601cbf8208c89ac4e888f884)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955308
</pre>
</div>
</content>
</entry>
<entry>
<title>[dev.boringcrypto.go1.15] all: merge go1.15 into dev.boringcrypto.go1.15</title>
<updated>2020-08-17T22:12:19+00:00</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2020-08-17T22:12:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a15df605fc4aa6347494fd55a5c4c6544b0eb981'/>
<id>a15df605fc4aa6347494fd55a5c4c6544b0eb981</id>
<content type='text'>
Change-Id: I6eecfb4730f88ea8546ec88afdffe33f45dedac9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6eecfb4730f88ea8546ec88afdffe33f45dedac9
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/link: don't mark shared library symbols reachable unconditionally</title>
<updated>2020-07-27T16:04:55+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-07-27T15:36:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=19a932ceb8dc0059754e1f986c86daba3a4fb14e'/>
<id>19a932ceb8dc0059754e1f986c86daba3a4fb14e</id>
<content type='text'>
During the transitioning period, we mark symbols from Go shared
libraries reachable unconditionally. That might be useful when
there was still a large portion of the linker using sym.Symbols,
and only reachable symbols were converted to sym.Symbols. Marking
them reachable brings them to the dynamic symbol table, even if
they are not needed, increased the binary size unexpectedly.

That time has passed. Now we largely operate on loader symbols,
and it is not needed to mark them reachable anymore.

Fixes #40416.

Change-Id: I1e2bdb93a960ba7dc96575fabe15af93d8e95329
Reviewed-on: https://go-review.googlesource.com/c/go/+/244839
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the transitioning period, we mark symbols from Go shared
libraries reachable unconditionally. That might be useful when
there was still a large portion of the linker using sym.Symbols,
and only reachable symbols were converted to sym.Symbols. Marking
them reachable brings them to the dynamic symbol table, even if
they are not needed, increased the binary size unexpectedly.

That time has passed. Now we largely operate on loader symbols,
and it is not needed to mark them reachable anymore.

Fixes #40416.

Change-Id: I1e2bdb93a960ba7dc96575fabe15af93d8e95329
Reviewed-on: https://go-review.googlesource.com/c/go/+/244839
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[dev.boringcrypto] all: merge master into dev.boringcrypto</title>
<updated>2020-07-09T21:52:30+00:00</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2020-07-09T03:29:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a91ad4250c118d97d2f7fad648313fcb09b38d5f'/>
<id>a91ad4250c118d97d2f7fad648313fcb09b38d5f</id>
<content type='text'>
Change-Id: I948e086e11e1da571e2be23bb08a7bbd6618dc2f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I948e086e11e1da571e2be23bb08a7bbd6618dc2f
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/link: fix GC data reading from shared library (attempt 2)</title>
<updated>2020-07-01T14:41:56+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-06-29T21:07:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=7799756a50f0a4070d66c67e9615375f852f2c04'/>
<id>7799756a50f0a4070d66c67e9615375f852f2c04</id>
<content type='text'>
When linking against a Go shared library, when a global variable
in the main module has a type defined in the shared library, the
linker needs to pull the GC data from the shared library to build
the GC program for the global variable. Currently, this fails
silently, as the shared library file is closed too early and the
read failed (with no error check), causing a zero GC map emitted
for the variable, which in turn causes the runtime to treat the
variable as pointerless.

For now, fix this by keeping the file open. In the future we may
want to use mmap to read from the shared library instead.

Also add error checking. And fix a (mostly harmless) mistake in
size caluculation.

Also remove an erroneous condition for ARM64. ARM64 used to have
a special case to get the addend from the relocation on the
gcdata field. That was removed, but the new code accidentally
returned 0 unconditionally. It's no longer necessary to have any
special case, since the addend is now applied directly to the
gcdata field on ARM64, like on all the other platforms.

Fixes #39927.

This is the second attempt of CL 240462. And this reverts
CL 240616.

Change-Id: I01c82422b9f67e872d833336885935bc509bc91b
Reviewed-on: https://go-review.googlesource.com/c/go/+/240621
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When linking against a Go shared library, when a global variable
in the main module has a type defined in the shared library, the
linker needs to pull the GC data from the shared library to build
the GC program for the global variable. Currently, this fails
silently, as the shared library file is closed too early and the
read failed (with no error check), causing a zero GC map emitted
for the variable, which in turn causes the runtime to treat the
variable as pointerless.

For now, fix this by keeping the file open. In the future we may
want to use mmap to read from the shared library instead.

Also add error checking. And fix a (mostly harmless) mistake in
size caluculation.

Also remove an erroneous condition for ARM64. ARM64 used to have
a special case to get the addend from the relocation on the
gcdata field. That was removed, but the new code accidentally
returned 0 unconditionally. It's no longer necessary to have any
special case, since the addend is now applied directly to the
gcdata field on ARM64, like on all the other platforms.

Fixes #39927.

This is the second attempt of CL 240462. And this reverts
CL 240616.

Change-Id: I01c82422b9f67e872d833336885935bc509bc91b
Reviewed-on: https://go-review.googlesource.com/c/go/+/240621
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
