From c80bd631a53762a44d0e0f5bf6fd558a691a2167 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Tue, 5 Dec 2023 12:36:13 -0500 Subject: [PATCH] doc/go1.22: document linker flag changes Updates #41004. For #61422. Change-Id: I5ab60d8e9d30986233d7adec400ef059bbe4c1a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/547515 Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI --- doc/go1.22.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/go1.22.html b/doc/go1.22.html index 64afa898af..d7e8bbd7fb 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -155,12 +155,22 @@ packages that do not have their own test files. Prior to Go 1.22 a

Linker

-

- TODO: https://go.dev/issue/62577: cmd/link, cmd/go: emit split DWARF on darwin -

- -

- TODO: complete this section, or delete if not needed +

+ The linker's -s and -w flags are now behave more + consistently across all platforms. + The -w flag suppresses DWARF debug information generation. + The -s flag suppresses symbol table generation. + The -s flag also implies the -w flag, which can be + negated with -w=0. + That is, -s -w=0 will generate a binary with DWARF + debug information generation but without the symbol table. +

+ +

+ On ELF platforms, the -B linker flag now accepts a special form: + with -B gobuildid, the linker will generate a GNU + build ID (the ELF NT_GNU_BUILD_ID note) derived from the Go + build ID.

Bootstrap

-- 2.48.1