Fixes #77436
Change-Id: I37d852a89678c929156c4765e774c819eb515e6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/742220
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
--- /dev/null
+[!cgo] skip
+
+# Test that -g3 works with cgo.
+env CGO_CFLAGS=-g3
+go build
+
+-- go.mod --
+module cgog3
+
+go 1.25
+-- m.go --
+package main
+
+import "os/user"
+
+func main() {
+ user.Current()
+}
// Symbols generated by the relax feature of gcc and binutils on loong64.
continue
}
+
+ if strings.HasPrefix(elfsym.name, "wm4.") || strings.HasPrefix(elfsym.name, "wm8.") {
+ // Symbols generated by GCC as
+ // group symbols to eliminate
+ // duplicate debug info for
+ // preprocessor symbols.
+ continue
+ }
}
if strings.HasPrefix(elfsym.name, ".Linfo_string") {