Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is possible to read an object file?

I was curious about .obj files: I pretty much don't know what they are (or what they contain), so I opened them with Vim text editor and what I found inside was an Alien like language...

Is there any way to understand what they represent and what is their content Also, for what are they being used ?

Thanks.

like image 936
Leandro Avatar asked Dec 22 '11 05:12

Leandro


People also ask

Can we read object file?

Sure. But every different platform has a different object format. On Windows, you could use a tool like dumpbin (dumpbin comes with Visual Studio). On Linux, you could use "dumpobj", or disassemble the program.

How do I view an object file?

Just install the software OBJ Viewer To begin viewing 3D files, simply do the following Install the extension OBJ Viewer Click on the extension icon Choose the 3D file you wish to open Begin viewing your 3D files online today! This 3D viewer works for both STL and OBJ file formats.

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.

What is an object file in Linux?

An object file in Linux is a computer-generated file that contains the object code. Generally, object code is not directly executed and must be called using a command in order to execute.


1 Answers

Sure.

But every different platform has a different object format. On Windows, you could use a tool like dumpbin (dumpbin comes with Visual Studio). On Linux, you could use "dumpobj", or disassemble the program.

Here's a good link for Linux:

http://www.linuxjournal.com/article/1060

PS: objdump also lets you disassemble the object. Like you used to be able to do with "debug" on DOS PCs...

like image 65
paulsm4 Avatar answered Sep 29 '22 04:09

paulsm4