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/objdump: fails to disassemble unexported Go code when using external linker #8803

Closed
ianlancetaylor opened this issue Sep 24, 2014 · 3 comments
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

> go build hello.go
> go tool objdump hello | wc -l
128211
> go build -ldflags=-linkmode=external hello.go
> go tool objdump hello | wc -l
266

It seems that using the external linker somehow causes objdump to only dump instructions
associated with exported symbols.
@rsc
Copy link
Contributor

rsc commented Oct 29, 2014

Comment 1:

Can reproduce on Linux, not on Mac.
In GNU nm, looks like symbols in the failing binary are 't' not 'T'.
go tool objdump is clearly ignoring those.
go tool nm lists them fine.
I suspect once I finish hooking up objdump to the new internal/objfile package, it will
just work.

@gopherbot
Copy link

Comment 2:

CL https://golang.org/cl/169720043 mentions this issue.

@ianlancetaylor
Copy link
Contributor Author

Comment 3:

This issue was closed by revision 324b293.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
This issue was closed.
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