Hum. We're on win32, that's why I'm talking about PE executables. I didn't think I would have to explicitly state that, but now it's done.

Also, to paint this with a big and silly brush, I have been talking about the "technical" loadtime since the original point, not the "happy fluffy user load time". I thought this was a forum for (experienced) programmers, not users. If you thought I was arguing that any executable no matter the amount of runtimes (etc etc etc) would bring up it's GUI in the same amount of time, you are sillier than I thought.

Your above post is rather rubbish. The OS doesn't have the executable "loaded" once it has checked the MZ signature. I believe it makes sence that the executable is "loaded" once it's ready to run. It's ready to run once all DLLs have loaded (and had their entrypoints called), after which eip is at program entrypoint.

Perhaps I should clarify that I've been talking about "your image" - and with exe compression, "your image" isn't loaded until the decompressor stub is done and has processed the entire executable file (or rather, the compressed data part of it; I guess I have to be this explicit now so I don't have to later, when you make another stupid remark).

When all this said, I do agree that the "user" view of the load time usually makes more sense than the "technical" load time.
Posted on 2002-08-20 09:24:46 by f0dder
Well you see, it tends to work like this, with a DOS COM file, it is ONLY a memory image so when the memory image is fully in place, it is called "loaded".

MZ exe files do much the same thing once the MZ header is read and the program is in place in memory. The exception is the use of overlays which sit on disk until they are placed in memory by the main program.

These distinctions were with us with 16 bit windows programs and the notion of "loading" was no different to the DOS days.

32 bit PE files were introduced into windows with winNT 3.5 and later with win95 so I wonder why they are so different in what is called LOADing than anything else.

The PE info is commonly available and it is not contentious but the assertion that a program is LOADED when it reaches its entry point certainly is, especially when its introduced with a theory about the virtues of file sizes, file compression etc ...

I will put it to you that your original assertion was crap, is crap and will stay crap as it says something that uses thwe term in a way that differs from how it is normally used.

Regards,

hutch@movsd.com
Posted on 2002-08-21 04:42:18 by hutch--
Do you also wonder if NT is radically different from DOS, and preemptive multitasking different from cooperative? Hardware acceleration different than software, SCSI from IDE, P4 from 8086?

Things change, old man. And PEs are quite different from COMs and EXEs, whether you like it or not, whether you're ever going to realize it or not.

An executable is loaded when it's ready to run, and (I hope) this will be my final comment.
Posted on 2002-08-21 10:05:15 by f0dder
======================
Do you also wonder if NT is radically different from DOS, and preemptive multitasking different from cooperative? Hardware acceleration different than software, SCSI from IDE, P4 from 8086?
======================

No. I have been around to see all of the changes so it does not surprise me at all.

Here is where I have the problem with what you say, all the old stuff and all the future stuff can be called "loaded" when its up and ready to use but a 32 bit Windows PE file is "loaded" when it reaches its entry point.

This leaves the amazing logic where something is loaded when its not loaded or inversely, its not loaded when its loaded. This logic shares such miraculous definitions like round squares, coloured numbers, greedy philanthropists and honest poltitians.

I will put it to you that you are using a different criterion to describe the loading of a PE file and that what you have attempted to derive from it is misleading to people who are not familiar with the internal workings of file formats.

This is why I have called what you say CRAP.

Regards,

hutch@movsd.com
Posted on 2002-08-21 21:26:41 by hutch--
good morning guys,
f0dder, i must say that it is a bit misleading indeed.
i remember my zx spectrum days where the loading was done once you pressed the stop button on the casette player! i guess it isn't very much different from dos, or is it?
Now, PE's , demand-loaded, its another story. since at entry point its loaded whatever is necessary at that particular time, in fact the loading isn't done . Its not done because at some point it will have to load something that is not loaded.
So, IMHO , PE's are just demand-loaded as stated, and we should end the story there.
Hope i make sence.
Posted on 2002-08-22 01:24:09 by Ray
Ray: more sense than hutch.

Still, in my opinion, the image is loaded when it's ready to run... sure, stuff will be paged in an out as necessary, on demand. So if you want to be really nazi, a PE image is theoretically never loaded, or at least you can't depend on it remaining loaded... that's why it (again, in my opinion) makes most sense to say it's "loaded" once it's ready to run. After all, that's how it was with other executable formats.
Posted on 2002-08-22 09:06:25 by f0dder