]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.22: document enabling PIE by default on darwin/amd64
authorCherry Mui <cherryyz@google.com>
Tue, 5 Dec 2023 17:30:19 +0000 (12:30 -0500)
committerCherry Mui <cherryyz@google.com>
Tue, 5 Dec 2023 18:48:11 +0000 (18:48 +0000)
Updates #61229.
For #61422.

Change-Id: I6cf8169c1e310e0de734250dbe04fb36e14728d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/547455
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

doc/go1.22.html

index fdc9827bb236e32eb0aa3cfe5818f4d74d01701f..1393be1dc9e4e2902c74a6e903662b54b695930e 100644 (file)
@@ -140,11 +140,6 @@ Do not send CLs removing the interior tags from such phrases.
   TODO: <a href="https://go.dev/issue/62577">https://go.dev/issue/62577</a>: cmd/link, cmd/go: emit split DWARF on darwin
 </p>
 
-<!-- CL 461697 -->
-<p>
-  <!-- cmd/go: default to PIE linking on darwin/amd64 -->
-</p>
-
 <p>
   TODO: complete this section, or delete if not needed
 </p>
@@ -651,6 +646,16 @@ Do not send CLs removing the interior tags from such phrases.
 
 <h2 id="ports">Ports</h2>
 
+<h3 id="darwin">Darwin</h3>
+<p><!-- CL 461697 -->
+  On macOS on 64-bit x86 architecture (the <code>darwin/amd64</code> port),
+  the Go toolchain now generates position-independent executables (PIE) by default.
+  Non-PIE binaries can be generated by specifying the <code>-buildmode=exe</code>
+  build flag.
+  On 64-bit ARM-based macOS (the <code>darwin/arm64</code> port),
+  the Go toolchain already generates PIE by default.
+</p>
+
 <h3 id="arm">Arm</h3>
 <p><!-- CL 514907 -->
   The <code>GOARM</code> environment variable now allows you to select whether to use software or hardware floating point.