-
Notifications
You must be signed in to change notification settings - Fork 18k
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/link: flag -a does not disassemble output #7517
Labels
Milestone
Comments
Issue #7641 has been merged into this issue. |
8l never disassembled the output. It listed the assembly language for the output, but because the assembly language was 8l's input, it was just printing its input, basically. Now the conversion from assembly language to machine code happens in 8a/8g/8c as part of liblink. The -S flag on all of those gives the exact instructions that will be in the binary, not a pseudo-stream that will be munged by the linker. (That's why the -S flag is so much noisier now.) We might be able to make 8l -a produce the old output if we link the libmach disassembler in and then munge it to do different symbol name resolution. But that will require changes to libmach, and we are so very close to deleting it instead. For Go 1.4 it might be easier since we will have a linker written in Go and a disassembler written in Go. But it's still not clear whether it's worthwhile. I admit it: I love the -a flag too, and I miss it. But I don't see an easy way to bring it back. For Go 1.3 I expect we will ship a useful 'go tool objdump', so perhaps instead of 8l -a you can run 8l to generate an 8.out and then use 'go tool objdump 8.out'. |
Thank you for your explanation Russ. 'go tool objdump' sounds like a plan, lets make it work. 'go tool objdump' does not do anything useful at this moment (maybe I'm not using it properly): C:\>go tool objdump %GOROOT%\bin\go.exe 0 0xffffffff objdump: syminit: No error And 'go tool nm' is broken (see issue #6936). And gdb is broken (see issue #7642). So things are pretty bad right now. Alex |
go tool objdump being broken is issue #7452. Mainly I need a disassembler, which I have almost working but am doing at lower priority than all the runtime and compiler bugs. :-) If you'd like to work on issue #6936, it will help the eventual go tool objdump too. I am not sure how much is involved but it seems like it shouldn't be too bad. I agree that things are pretty bad. They'll get better. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: