aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/base/debug.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-05-05 17:22:17 -0400
committerCherry Mui <cherryyz@google.com>2022-05-11 21:01:09 +0000
commitb89a1948893d2c6c04497030eb78addd6fd7daf3 (patch)
treef13fed1520bbc65a47aeb8265c43e3f6c76540b5 /src/cmd/compile/internal/base/debug.go
parentc1105cfd435c84f3454822fdccfe0c8ab7d8f621 (diff)
downloadgo-b89a1948893d2c6c04497030eb78addd6fd7daf3.tar.xz
cmd/internal/obj: add a flag to not write referenced symbol names in object file
The Go object file references (some of) symbols from other packages by indices, not by names. The linker doesn't need the symbol names to do the linking. The names are included in the object file so it is self-contained and tools (objdump, nm) can read the referenced symbol names. Including the names increases object file size. Add a flag to disable it on demand (off by default). Change-Id: I143a0eb656997497c750b8eb1541341b2aee8f30 Reviewed-on: https://go-review.googlesource.com/c/go/+/404297 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/base/debug.go')
-rw-r--r--src/cmd/compile/internal/base/debug.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/base/debug.go b/src/cmd/compile/internal/base/debug.go
index 80b2ff5bd6..f1d020f342 100644
--- a/src/cmd/compile/internal/base/debug.go
+++ b/src/cmd/compile/internal/base/debug.go
@@ -31,6 +31,7 @@ type DebugFlags struct {
LocationLists int `help:"print information about DWARF location list creation"`
Nil int `help:"print information about nil checks"`
NoOpenDefer int `help:"disable open-coded defers"`
+ NoRefName int `help:"do not include referenced symbol names in object file"`
PCTab string `help:"print named pc-value table\nOne of: pctospadj, pctofile, pctoline, pctoinline, pctopcdata"`
Panic int `help:"show all compiler panics"`
Slice int `help:"print information about slice compilation"`