Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How to disassemble with objdump and recompile the program ?

Reply
Thread Tools

How to disassemble with objdump and recompile the program ?

 
 
pete
Guest
Posts: n/a
 
      12-09-2007
Kenneth Brody wrote:

> Consider a simple disassembly of:
>
> push 0x1234
>
> Is "0x1234" a constant, or the address of a variable?


The concepts of "address" and "constant",
aren't mutually exclusive.

N869
6.6 Constant expressions

[#9] An address constant is a null pointer, a pointer to an
lvalue designating an object of static storage duration, or
to a function designator;

--
pete
 
Reply With Quote
 
 
 
 
Kenneth Brody
Guest
Posts: n/a
 
      12-10-2007
pete wrote:
>
> Kenneth Brody wrote:
>
> > Consider a simple disassembly of:
> >
> > push 0x1234
> >
> > Is "0x1234" a constant, or the address of a variable?

>
> The concepts of "address" and "constant",
> aren't mutually exclusive.
>
> N869
> 6.6 Constant expressions
>
> [#9] An address constant is a null pointer, a pointer to an
> lvalue designating an object of static storage duration, or
> to a function designator;


However, in the OPs case of wanting to disassemble, modify,
reassemble, it makes a big difference. Consider:

foo(&x);
bar(0x1234);

If &x==0x1234, it is quite possible to see this as a disassembly:

push 0x1234
call foo
push 0x1234
call bar

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <(E-Mail Removed)>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Need some information in output of objdump sunny C Programming 8 11-10-2006 06:25 PM
[ANN] YARV Compile and Disassemble CGI SASADA Koichi Ruby 1 10-04-2005 07:07 AM
Re: How to disassemble Canon S30 protective lens CH Digital Photography 0 09-08-2003 03:19 AM
disassemble an assembly into source code, how to thwart BH ASP .Net 0 07-10-2003 03:24 AM



Advertisments