Re: tracking program counter / assembling objdump output
<SigmFSK <at> aol.com>
2006-10-12 10:50:44 GMT
In a message dated 10/12/2006 2:45:34 A.M. Eastern Standard Time,
david <at> l8s.co.uk writes:
Because it isn't possible.
The disassembler cannot know whether constants should be absolute numbers,
diffences between addresses, or addresses themselves. So when you
reassemmble the output you'll end up with incorrect code.
David
---
Thanks David. I followed agrier's suggestion last night to ask the binutils
mailing list and got a similar response. I still think it would be neat to
make a converter from objdump output to gcc-assemblable source and have it
ask for human help when needed, but the more I think about - not neat enough to
actually go through the work of doing it.
/arthur
> It appears that the objdump output is quite similar to, but deliberately
> different from, the assembly created from compiling a c program with "gcc
-S".
>
> Is there a mechanism to convert the objdump disassembly output to an
> assemblable form?
Apart from doing this by hand, no.
> Or is that a deliberate objdump decision to have the output
> different, as my desire is inherently unworkable,
It was a deliberate decision but the motive was to make disassembler's
(Continue reading)