]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.22: document linker flag changes
authorCherry Mui <cherryyz@google.com>
Tue, 5 Dec 2023 17:36:13 +0000 (12:36 -0500)
committerCherry Mui <cherryyz@google.com>
Wed, 6 Dec 2023 17:29:11 +0000 (17:29 +0000)
Updates #41004.
For #61422.

Change-Id: I5ab60d8e9d30986233d7adec400ef059bbe4c1a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/547515
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 64afa898af9ee9af4ea57b010c93e1f3544cd928..d7e8bbd7fb529166c84e52ae70bcd84ab128cccd 100644 (file)
@@ -155,12 +155,22 @@ packages that do not have their own test files. Prior to Go 1.22 a
 
 <h2 id="linker">Linker</h2>
 
-<p><!-- https://go.dev/issue/62577 -->
-  TODO: <a href="https://go.dev/issue/62577">https://go.dev/issue/62577</a>: cmd/link, cmd/go: emit split DWARF on darwin
-</p>
-
-<p>
-  TODO: complete this section, or delete if not needed
+<p><!-- CL 493136 -->
+  The linker's <code>-s</code> and <code>-w</code> flags are now behave more
+  consistently across all platforms.
+  The <code>-w</code> flag suppresses DWARF debug information generation.
+  The <code>-s</code> flag suppresses symbol table generation.
+  The <code>-s</code> flag also implies the <code>-w</code> flag, which can be
+  negated with <code>-w=0</code>.
+  That is, <code>-s</code> <code>-w=0</code> will generate a binary with DWARF
+  debug information generation but without the symbol table.
+</p>
+
+<p><!-- CL 511475 -->
+  On ELF platforms, the <code>-B</code> linker flag now accepts a special form:
+  with <code>-B</code> <code>gobuildid</code>, the linker will generate a GNU
+  build ID (the ELF <code>NT_GNU_BUILD_ID</code> note) derived from the Go
+  build ID.
 </p>
 
 <h2 id="bootstrap">Bootstrap</h2>