x86 disassembly comment and .entry
When #95 (closed) is fixed, I think the output of the disassembler could almost be fed as is to gcc with a just a few minor modifications:
- Add ".intel_syntax noprefix" to the beginning. Perhaps not necessary
- Make the ".entry foo" be a comment
- gas appears to use
#as the comment character
- print numbers using 0x instead of #x
- break instruction doesn't exist. It's really int3.
Perhaps it's worthwhile to use
# as the comment character, which
might be easy to do.
Items 1 and 2 are probably less important since a simple script can
fix that up. Likewise a script can convert #x to 0x, and replace
break n with
int3; .byte n.
Actually all of these can be done with a pretty simple sed script, but item 3 might be worth doing. But may need to see what happens on darwin.
But note that clang doesn't like the current output. It doesn't like