-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
What version of Go are you using (go version)?
$ go version go version go1.19.5 darwin/arm64
Does this issue reproduce with the latest release?
Yes. There is no change since change 06e5529
The lates code is here
https://github.com/golang/go/blob/master/src/debug/macho/file.go#L503
What operating system and processor architecture are you using (go env)?
go env Output
$ go envGO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/lichengdong/Library/Caches/go-build"
GOENV="/Users/lichengdong/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/lichengdong/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/lichengdong/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.19.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.19.5/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.5"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/g4/4_y2t8q179s1n1h40218_3rm0000gn/T/go-build3619303289=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Compare a C++ source code generated binary, and use system nm/objdump to view the symbols in that binary file.
Meanwhile use debug/macho to dump symbols.
For example, a C++ symbol __GLOBAL__sub_I_main.mm in nm/objdump will be dropped the first leading underscore _ in debug/macho.
What did you expect to see?
same result as tool nm/objdump
What did you see instead?
nm/objdump output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status