Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/nm: cannot handle cgo archive #21706

Closed
hirochachacha opened this issue Aug 31, 2017 · 3 comments
Closed

cmd/nm: cannot handle cgo archive #21706

hirochachacha opened this issue Aug 31, 2017 · 3 comments
Milestone

Comments

@hirochachacha
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

go tool nm $GOROOT/pkg/$GOOS_$GOARCH/runtime/cgo.a

What did you expect to see?

success.

What did you see instead?

open /Users/hiro/go/pkg/darwin_amd64/runtime/cgo.a: unrecognized object file

Does this issue reproduce with the latest release (go1.9)?

I think so.

System details

go version devel +4d269ad175 Wed Aug 30 21:59:21 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hiro/.go"
GORACE=""
GOROOT="/Users/hiro/go"
GOTOOLDIR="/Users/hiro/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build424578335=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version devel +4d269ad175 Wed Aug 30 21:59:21 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +4d269ad175 Wed Aug 30 21:59:21 2017 +0000
uname -v: Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G29
lldb --version: lldb-370.0.42
  Swift-3.1
gdb --version: GNU gdb (GDB) 8.0
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Sep 1, 2017
@gopherbot
Copy link

Change https://golang.org/cl/62591 mentions this issue: cmd/internal/goobj: parse native objects in the archive

gopherbot pushed a commit that referenced this issue Sep 10, 2017
Also add HasCGO() to internal/testenv for tests.

Updates #21706

Change-Id: I938188047024052bdb42b3ac1a77708f3c2a6dbb
Reviewed-on: https://go-review.googlesource.com/62591
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/64510 mentions this issue: cmd/nm: add test case for go archives

gopherbot pushed a commit that referenced this issue Sep 20, 2017
Also, rename some test cases, check (*os.File).Close

For #21706

Change-Id: Ie60c4d345b2259736c823dc6001c08affcdd86e7
Reviewed-on: https://go-review.googlesource.com/64510
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/64890 mentions this issue: cmd/nm: handle cgo archive

@golang golang locked and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants