[Tutor] Re: Curious newbie

alan.gauld@bt.com alan.gauld@bt.com
Tue, 23 Jul 2002 14:41:41 +0100


Bah! I hate CTRL-ENTER on Outlook! It keeps sending messages
as I'm in mid edit!

> > Actually, just to be pedantic, the C compiler generates a file which
> > still needs a runtime environment and "interpreter" to run.  
> 
> Just to be doubly pedantic, some compilers can generate 
> true standalone executable files.
> 
> > why ELF (or a.out) binaries don't run on windows and PE binaries 
> 
> Only partly. The library files in both cases implement the 
> same fuctions but do so in most cases by mapping onto 
> underlying operating system calls. Thus the library 
> depends on the OS.
> 
> However Real Time development systems exist which contain 
> OS independant libraries so that you can compile a file 
> that can be blown to a EPROM and executed directly without 
> any OS per se installed

The executive functions are built into the resultant 
executable "file" (actually since there is no OS there is 
no file concept either, its just a bunch of assembler 
statements in RAM which includes the bootstrap loader 
as well as all the IO drivers etc.)

> > program.  The only difference is the C runtime (for that OS, namely
> > 'libc.so' or 'msvcrt.dll') is bundled with the OS and so people tend
> > not to see the simlarities.  

> > The exception is if you are working on an embedded system.  
> > In that case you'll need to provide all the hardware
> > too since it will be specific to your application.

Ah, I see you have sort of covered embedded systems here with 
an implication of some other mechanism at work..

But you did say you were being pedantic :-)

Alan G.