Skip to content

Commit 3d2645f

Browse files
committed
doc/go1.22: document enabling PIE by default on darwin/amd64
Updates #61229. For #61422. Change-Id: I6cf8169c1e310e0de734250dbe04fb36e14728d9 Reviewed-on: https://go-review.googlesource.com/c/go/+/547455 Reviewed-by: Than McIntosh <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 3822e16 commit 3d2645f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

doc/go1.22.html

+10-5
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ <h2 id="linker">Linker</h2>
140140
TODO: <a href="https://go.dev/issue/62577">https://go.dev/issue/62577</a>: cmd/link, cmd/go: emit split DWARF on darwin
141141
</p>
142142

143-
<!-- CL 461697 -->
144-
<p>
145-
<!-- cmd/go: default to PIE linking on darwin/amd64 -->
146-
</p>
147-
148143
<p>
149144
TODO: complete this section, or delete if not needed
150145
</p>
@@ -651,6 +646,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
651646

652647
<h2 id="ports">Ports</h2>
653648

649+
<h3 id="darwin">Darwin</h3>
650+
<p><!-- CL 461697 -->
651+
On macOS on 64-bit x86 architecture (the <code>darwin/amd64</code> port),
652+
the Go toolchain now generates position-independent executables (PIE) by default.
653+
Non-PIE binaries can be generated by specifying the <code>-buildmode=exe</code>
654+
build flag.
655+
On 64-bit ARM-based macOS (the <code>darwin/arm64</code> port),
656+
the Go toolchain already generates PIE by default.
657+
</p>
658+
654659
<h3 id="arm">Arm</h3>
655660
<p><!-- CL 514907 -->
656661
The <code>GOARM</code> environment variable now allows you to select whether to use software or hardware floating point.

0 commit comments

Comments
 (0)