aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2025-09-15 22:50:51 -0400
committerCherry Mui <cherryyz@google.com>2025-09-23 07:58:08 -0700
commit22ac328856ae4c0dcd3d770f50aac5a2df498989 (patch)
treedc1f66e53788181610585dfc24fefe4945f05845 /src/cmd/link/internal
parent9b2d39b75bcc8ced3eaab1c841d7d62e27867931 (diff)
downloadgo-22ac328856ae4c0dcd3d770f50aac5a2df498989.tar.xz
cmd/link: make -w behavior consistent on Windows
On UNIX-like platforms, the -w flag disables DWARF, and the -s flag implies -w (so it disables both the symbol table and DWARF). The implied -w can be negated with -w=0, i.e. -s -w=0 disables the symbol table but keeps the DWARF. Currently, this negation doesn't work on Windows. This CL makes it so, so it is consistent on all platforms (that support DWARF). Change-Id: I19764a15768433afe333b37061cea16f06cb901b Reviewed-on: https://go-review.googlesource.com/c/go/+/703998 Reviewed-by: Than McIntosh <thanm@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/link/internal')
-rw-r--r--src/cmd/link/internal/ld/pe.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/cmd/link/internal/ld/pe.go b/src/cmd/link/internal/ld/pe.go
index c290410b0e..5219a98dd4 100644
--- a/src/cmd/link/internal/ld/pe.go
+++ b/src/cmd/link/internal/ld/pe.go
@@ -487,9 +487,6 @@ func (f *peFile) addDWARFSection(name string, size int) *peSection {
// addDWARF adds DWARF information to the COFF file f.
func (f *peFile) addDWARF() {
- if *FlagS { // disable symbol table
- return
- }
if *FlagW { // disable dwarf
return
}