Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting source from object file

Tags:

Is there any way to get the source code by using object file in C?

For example I have a source code simple.c

cc simple.c

Now I have a.out (object file). By this a.out whether can I get the source?

code of simple.c

like image 389
Pavunkumar Avatar asked Feb 27 '10 09:02

Pavunkumar


People also ask

Can you execute an object file?

An object file is a partial machine language program. It is designed to be linked to other object files to produce an executable file. You cannot run an object file by writing its name as a command.

How can I see the code of an object in Linux?

Check out the binutils package. In it you'll find objdump - display information from object files. Then try running objdump -d xyz.o .

What is source file and object file?

Source code is generally understood to mean programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file. Object code generally refers to the output, a compiled file, which is produced when the Source Code is compiled with a C compiler.


1 Answers

No. Turning a cow into hamburger is fairly easy. Turning hamburger into a living cow, somewhat more difficult.

like image 135
Jerry Coffin Avatar answered Nov 12 '22 17:11

Jerry Coffin