The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to work with two files with awk calsum Shell Programming and Scripting 14 04-24-2008 12:29 PM
why awk does not work here? fedora Shell Programming and Scripting 2 09-05-2007 07:51 PM
Script doesn't work, but commands inside work cheongww UNIX for Dummies Questions & Answers 2 11-14-2006 06:52 PM
Can I back up all the files I work with each day using tar? jo calamine Filesystems, Disks and Memory 2 10-01-2006 02:35 PM
Files in work directory reverting to root ownership canman UNIX for Dummies Questions & Answers 1 06-16-2005 08:24 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2008
Registered User
 

Join Date: Jan 2008
Location: India
Posts: 32
How . exe files work

Hi

I work on a production server. We have some .exe files in our system, the source of these files are C++ programs that are stored in the development server. How these .exe work. Could somebody please tell that in detail.


Thanks a lot!!
Kanu
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-15-2008
Sivaswami's Avatar
Registered User
 

Join Date: Mar 2007
Location: India
Posts: 55
Great Question.

the exe files have segments like .text, .bss , heap and stack se
text segment will store the code and functions
data will store the global vars
heap will store dynamic allocated mem.
stack will store local variables.

when you compile these programs the code is transfered to machine instructions in the .text segment and data is stored in data segment. stack and heap grow dynamically
according to their usage.

if you need more help ask specific Questions.

Thx,
Siva
Reply With Quote
  #3 (permalink)  
Old 07-15-2008
Registered User
 

Join Date: Jan 2008
Location: India
Posts: 32
Thanks Swami!
Well this means that the .exe are the already compiled files which we can run without having C++ source codes.
Am I right .... ?
Reply With Quote
  #4 (permalink)  
Old 07-15-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,491
Unlike windows, unix file extensions ( the part after the dot) do not necessarily mean anything.

To find out what a file is/does use the file command:
Code:
file /usr/bin/ls
file /usr
file /path/to/your/exefiles/somefile.exe
Reply With Quote
  #5 (permalink)  
Old 07-15-2008
Registered User
 

Join Date: Jan 2008
Location: India
Posts: 32
how do we pass the parameters in the .exe programs???
Reply With Quote
  #6 (permalink)  
Old 07-15-2008
Registered User
 

Join Date: Apr 2008
Posts: 55
exe file would have c/c++ programme containing main programme. while coding parameter like argv[1],argv[2].....soon might have been considered with appropriate logic...

You can pass parameters as,

exename param1 param2 param3.....

Hope this answers your question !!

Shafi
Reply With Quote
  #7 (permalink)  
Old 07-15-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 500
Is this a windows box or a Unix machine
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0