-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Go version
n/a
Output of go env
in your module/workspace:
n/a
What did you do?
Read the documentation for go tool link
, specifically with regards to the -s
and -w
flags.
What did you see happen?
There documentation only states:
-s
Omit the symbol table and debug information.
[...]
-w
Omit the DWARF symbol table.
Only the Go 1.22 release notes seem to explain their interaction.
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.
What did you expect to see?
The documentation for -s
should explicitly say that it implies -w
by default, and that you can override this by explicitly passing -w=0
. (In short, developers should not have to track down the 1.22 release notes to understand how these two flags interact.)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status