Operating System - HP-UX
1834137 Members
2379 Online
110064 Solutions
New Discussion

Re: reading a object file

 
Yogendra
Occasional Contributor

reading a object file

Hi,
I have a myname.o object file but i dont have the source code for the same.
Is there any way by which I can convert the myname.o to get the .c/.cc file.
I mean can a object file be converted to source file?
5 REPLIES 5
Michael Schulte zur Sur
Honored Contributor

Re: reading a object file

Hi,

I dont think so. The most would be an assembler listing.

greetings,

Michael
A. Clay Stephenson
Acclaimed Contributor

Re: reading a object file

In a word, no. The best you can do is disassemble the object to get to assembly source but I doubt that will do you much good.
If it ain't broke, I can fix that.
Yogendra
Occasional Contributor

Re: reading a object file

Hi,
How will i do the assembler listing?
could you please tell me the command
Alzhy
Honored Contributor

Re: reading a object file

What you are asking is to "reverse-engineer" an object file... Doable but difficult.. one would have to deal with assembler code here...
Hakuna Matata.
James Lynch
Valued Contributor

Re: reading a object file

Many many moons ago there was a program called uncc that would take assembly code and convert it back into C code. The problem was that the resulting C code was unreadable and did not look anything like the original sorce code. This made the tool virtually unusable, unless it was used by the most savy individual.

That issue coupled with the social ramification of being able steal one's source code by having only the binaries, sealed this tool's fate.

JL
Wild turkey surprise? I love wild turkey surprise!