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: use symbolic names for globals #20650
Comments
I can take a look at this. @randall77 So far from my understanding of objdump the changes for this feature would need to occur in each of the assembly packages used by
I think the changes would be to the |
Those are the right packages. I think the code might need to be added to plan9x.go:plan9Arg (at least on x86). |
So this is pretty easy to do. In fact, I have a patch that I believe does the job. And I've tested it and it works just fine as far as I can tell: package main
var g = "foo"
func main() {
println(g)
}
But what I just can't figure out is how the x/arch tests are supposed to be run. A lot of them are skipped because my environment isn't what's expected (e.g. "/Users/rsc/bin/objdump2" doesn't exist), and a lot of them fail with errors such as this:
Of course, this is with a clean working directory. No source changes or anything. Does anyone (@rsc?) know if there's an easy way I can actually get all of these running and passing? |
Change https://golang.org/cl/80843 mentions this issue: |
Updates #20650 (CL 45099 introduced the feature to x86). Change-Id: If40cc9d87417a05281d8633f05cd91f6f434b136 Reviewed-on: https://go-review.googlesource.com/80843 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This looks like it has been fixed. |
Note the
MOVQ 0x69a6f(IP), AX
instruction. It would be nice if this instead readMOVQ main.g(IP), AX
or something.We do the address->symbol mapping for CALLs, so I suspect we just need to enable that for IP-relative addressing also.
The text was updated successfully, but these errors were encountered: