difference between .obj and .exe

Any other programming language that is not covered in the Web Scripting category.

difference between .obj and .exe

Postby chinnu on Wed Dec 07, 2005 4:07 pm

Can anybody tell me the differences between .obj file and .exe file?
i know that in .obj file addresses of each statement of the program is relative to the starting statement. Is there anything else other than this that makes it not executable as such?
bye
take care
chinnu
!@#$%^&*()~)(*&^%$#@!~

karthik. k
chinnu
Newbie
Newbie
 
Posts: 3
Joined: Tue Dec 06, 2005 7:23 am

Postby bugalinux on Thu Dec 08, 2005 11:35 am

the .obj file is the file used in the linking phase (library + binary exec generation).

A good link for more details :
See http://caml.inria.fr/pub/docs/oreilly-b ... ra065.html



.
bugalinux
Contributer
Contributer
 
Posts: 52
Joined: Sat Aug 20, 2005 1:44 pm
Location: Paris

Re: difference between .obj and .exe

Postby mm_freak on Fri Dec 16, 2005 8:02 am

chinnu wrote:i know that in .obj file addresses of each statement of the program is relative to the starting statement. Is there anything else other than this that makes it not executable as such?


In the final program, addresses are still relative, but OBJ files are incomplete. They only contain code for the part of the program compiled, without any library or system code. Also it's not in an executable format, but rather a linker format. In other words: it's intended to be linked into a final program, not to be run directly.
I'm x^10 + x^8 + x^5 + x^4 + x^3 + 1, so don't mess with me!
mm_freak
Moderator
Moderator
 
Posts: 635
Joined: Sun Sep 11, 2005 12:29 pm
Location: Baden-Wuerttemberg (Germany)

Re: difference between .obj and .exe

Postby Xaric on Sun Dec 25, 2005 1:59 am

chinnu wrote:Can anybody tell me the differences between .obj file and .exe file?
i know that in .obj file addresses of each statement of the program is relative to the starting statement. Is there anything else other than this that makes it not executable as such?
bye
take care
chinnu


Basically what mm_freak and bugalinux said, OBJ files can be linked to other files, and DLLs. Its a bit different when you use a engine in ASM. I hope thats not confusing Smile
Xaric
Newbie
Newbie
 
Posts: 2
Joined: Sun Dec 25, 2005 1:43 am

Re: difference between .obj and .exe

Postby mm_freak on Mon Dec 26, 2005 9:24 pm

Xaric wrote:Its a bit different when you use a engine in ASM. I hope thats not confusing :)


What do you mean?
I'm x^10 + x^8 + x^5 + x^4 + x^3 + 1, so don't mess with me!
mm_freak
Moderator
Moderator
 
Posts: 635
Joined: Sun Sep 11, 2005 12:29 pm
Location: Baden-Wuerttemberg (Germany)

Postby gls on Wed Aug 16, 2006 6:38 am

Cool Object files do not have all of their dependencies resolved, and there are still address gaps and unkown addresses for functions that reside in other object files or libraries. Usually object files contain the debugger instrumentation, symbol table, static data and base addresses for functions.


Cool Your executable is where everything is put together and all of the questions are answered about missing addresses, etc. Your exe also contains the bootstrap code and kernel hooks such as opening you input and output streams, loading any dynamic libraries, and setting up your call stacks and dumping your core file if something crashes in your code.

Basically your exe is the interface to the operating system from the user command shell.
gls
Contributer
Contributer
 
Posts: 28
Joined: Wed Aug 16, 2006 4:30 am
Location: Chicago, IL

Postby Samppa on Wed Aug 16, 2006 12:03 pm

Wow, gls is Jesus!

Just look at how he reincarnated this thread
(\__/)
(='.'=) This is RomMaster's Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.
Samppa
Phoenix Veteran
Phoenix Veteran
 
Posts: 744
Joined: Thu Feb 02, 2006 10:00 am
Location: Finland


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron