LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-02-2004, 12:55 PM   #1
indian
Member
 
Registered: Aug 2004
Posts: 137

Rep: Reputation: 15
how to convert C executable into Assembly Code


Hi, I want to convert C executable into Assembly code.Can some one please tell me how to do this.using "cc -S file.c" will only convert c program into assembly code but I want the executable file to convert into assembly code.Thanks in anticipation...
 
Old 09-02-2004, 01:21 PM   #2
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
Do "objdump -d a.out" where a.out is the executable. If you want more interactive dissassembly (i.e. jump and call referencing) get ldasm which is a gui frontend for objdump.
 
Old 09-02-2004, 01:22 PM   #3
KneeLess
Member
 
Registered: May 2003
Distribution: Debian GNU/Linux 3.0 Sid, OpenBSD 3.5
Posts: 190

Rep: Reputation: 30
Run this command: 'objdump -d file' where file is the executable.
http://www.gnu.org/software/binutils...inutils_4.html

Last edited by KneeLess; 09-02-2004 at 01:23 PM.
 
Old 09-02-2004, 01:42 PM   #4
indian
Member
 
Registered: Aug 2004
Posts: 137

Original Poster
Rep: Reputation: 15
Thanks and what is the syntax for "ldasm"?
 
Old 10-04-2004, 04:56 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 66
Quote:
Thanks and what is the syntax for "ldasm"?
bobwall mentioned that ldasm is just a gui frontend. Start it up and off you go...

For reference however, all good command line apps will give you some usage details by running "appname --help"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert Assembly langugae to Executable in c language ssg14j Programming 15 11-04-2008 07:49 AM
How to convert Assembly code to "C" source code ssg14j Programming 2 08-01-2005 12:48 PM
Reading Assembly code max_rsr Programming 4 07-22-2005 08:06 AM
optcode, assembly Code, or binary? mrpc_cambodia Programming 5 01-05-2005 05:59 AM
Command for getting assembly code aizkorri Programming 1 06-18-2002 05:04 AM


All times are GMT -5. The time now is 12:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration