Executable files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Executable files
# 1  
Old 10-29-2007
Executable files

This question always confuses me :-

Suppose I write a program and compile it on a machine with operating system A and processor B

will the exe file run on a machine

with operating system A2 but processor B
operating system A but processor B2
operating system A2 and processor B2........

In a nutshell, Does the compatibility of a exe file depend on

only operating system ?

only machine architecture ?

or BOTH ?
# 2  
Old 10-29-2007
Quote:
Originally Posted by nervous
BOTH
There are CPUs: i386, Sparc, PowerPC, MIPS, PA-RISC, MC68020 etc

There are object file formats: ELF, XCOFF, COFF, PE, SOM, AOUT etc

Then there are CPU modes, 64 bit, 32 bit

And also operating system versions, so typically a binary compiled for one version of an OS cannot be used on an earlier one.
# 3  
Old 10-29-2007
Hi.
Quote:
Originally Posted by porter
There are CPUs ...
There are object file formats...
Then there are CPU modes...
And there is Executable - Wikipedia, the free encyclopedia ... cheers, drl
# 4  
Old 10-30-2007
Porter

Some body told me like this:

"I think it totally depends upon the OS, provided it abstracts hardware efficiently. For example, Windows is meant for x86 architechture. Someday Microsoft comes up with Windows for SPARC that uses same system calls, i.e. H/W is abstracted. Any Win32 program would run on that too.

Virtual Machines (such as JVM) do exactly that. They provide a consistent set of instructions to the programs accross platforms. Underneath these instructions are executed differently on different systems."


What you say now?
# 5  
Old 10-30-2007
some body told you correctly
# 6  
Old 10-30-2007
Quote:
For example, Windows is meant for x86
And also previously ran on MIPS, DEC-Alpha and PowerPC.

Quote:
Someday Microsoft comes up with Windows for SPARC that uses same system calls, i.e. H/W is abstracted. Any Win32 program would run on that too.
Except that any code compiled for i386 will have to be run through an emulator.

Quote:
Virtual Machines (such as JVM) do exactly that. They provide a consistent set of instructions to the programs accross platforms. Underneath these instructions are executed differently on different systems.
Absolutely, (a) at the cost of translation to the native format (b) JVM and .NET both still sit on top of an operating system, they do not replace it.

Even a JVM running in a embedded system will still run on an embedded OS, however minimalist that is.
# 7  
Old 10-30-2007
What is meant by native format????

I'll add one more question, A file compiled on x86-32 architecture under Windows XP, will it work on x86-64 architecture under Windows XP or Windows 2003?

Can I get a link where some guide is provided how OS and hardware architecture interact with each other. I'm really confused, not exactly understanding what is happening (inside the hardware, OS and system calls).

Thanks for all your support.

Last edited by nervous; 10-30-2007 at 04:48 AM.. Reason: Added one more question
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

ACLs - How can i create new executable files

Hello experts, I would like to know if is possible to create a default acl rule to a directory. in this directory all files created should have executable permissions by the group IT. i tried setfacl -m d:g:it:rwx /files tried to change the mask setfacl -m m::rwx /files but i still... (3 Replies)
Discussion started by: berveglieri
3 Replies

2. UNIX for Dummies Questions & Answers

Help with sorting executable files in shell

Hi!I'm new in this forum,also in shell scripting! :P I'd like to help me with an issue!the project wants to make a variable with a directory(any) and then print all executable files of this directory,sorted by size!Thank you! (8 Replies)
Discussion started by: strawhatluffy
8 Replies

3. Homework & Coursework Questions

File Looping - Looking for executable files - Need help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! Hello all, I have posted here before and really was blown away by the amount of assistance I received. I was able to finish my homework without a problem! But, yet again, our... (6 Replies)
Discussion started by: Bob07
6 Replies

4. AIX

Executable doesn't complete on large files

Good morning, I have an executable called DataExport (not that the name means much), but anyhow, it is a job that runs to call oracle stored procs which then export data out to a text file. Depending on which export is calling the DataExport, different stored procs are run. Exports 1, 2 and 3... (2 Replies)
Discussion started by: philplasma
2 Replies

5. UNIX for Dummies Questions & Answers

executable files

hello. My question, basically is: what is the definition of unix/linux exec files, or what makes a file executable? More specifically, must a unix source file that was compiled using gcc have exec permissions in order to be considered executable? Is it right to say that a unix/linux exec file... (1 Reply)
Discussion started by: nadavkri
1 Replies

6. UNIX for Dummies Questions & Answers

listing executable files in unix.

How to list out the files which are not accessed for the last n days? and How to list out all the executable files in a directory? can anyone help me on the above? Thanks in advance. (3 Replies)
Discussion started by: venkatesht
3 Replies

7. UNIX for Dummies Questions & Answers

Finding executable files in all directories

This is probably very easy but I would like to know a way to list all my files in all my directories that are readable and executable to everyone. I was told to use find or ls and I tried some stuff but couldnt get it to work. I understand that its dangerous to have files with these permissions for... (4 Replies)
Discussion started by: CSGUY
4 Replies

8. OS X (Apple)

Converting Unix executable files

I loaded OS X Panther on my Mac G4 and found that many files previously saved as Word or Word Perfect files were inadventently converted to Unix executable files. When I try to read these in Word, it cannot recognize or translate the file properly. Does anyone know how to translate these files? Is... (4 Replies)
Discussion started by: Steven Greenber
4 Replies

9. OS X (Apple)

Cannot translate Unix executable files

Help!! I loaded OS X Panther on my Mac G4 and found that many files previously saved as txt files were inadventently converted to Unix executable files. When I try to read these in Word, the Word filters cannot recognize or translate the file properly. Does anyone know how to translate these files?... (1 Reply)
Discussion started by: Steven Greenber
1 Replies
Login or Register to Ask a Question