executable code versus non-executable code

executable code versus non-executable code

Post by Spin » Thu, 11 Sep 2008 09:57:52


Gurus,

Today, I overheard four guys in a meeting bandying about executable code
versus non-executable code. I couldn't quite follow but what I thought I
heard was executable code was things like exe's and non-executable code was
like dll's (they can't be executed directly, they must be called by
something else. Is my understanding close to correct?
 
 
 

executable code versus non-executable code

Post by Alun Jone » Thu, 11 Sep 2008 10:36:00


It's a bit of an artificial distinction, because the code in a DLL is the
same kind as the code in an EXE, and EXEs are run by causing them to load -
in other words, they don't just run by themselves.

Code doesn't just run by itself, it has to be loaded by other code, in a
chain of execution that goes all the way back to the boot-loader, which is
loaded by the hardware.

Alun.
~~~~
--
Texas Imperial Software | Web: http://www.yqcomputer.com/
23921 57th Ave SE | Blog: http://www.yqcomputer.com/
Woodinville WA 98072-8661 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(425)807-1787 | Try our NEW client software, WFTPD Explorer.

 
 
 

executable code versus non-executable code

Post by FromTheRaf » Thu, 11 Sep 2008 11:38:55


I suppose you would have to ask them what they meant.

To me, non-executable code would be code that still
required additional translation before it could execute.
Source code for instance would be non-executable
in most cases.

When the code reaches a form that the user can cause
the translation and execution of without any further
action needed, I would consider it executable. This
means that scripts are executable code because once
invoked - no further action is required by the user.
PE files contain executable code because once invoked
the translation into an executable image and loading
and execution of that image takes place without further
action by the user. DLLs and PEs differ in the way they
are invoked and can differ in as little as one bit in the
header IIRC.
 
 
 

executable code versus non-executable code

Post by Spin » Sat, 13 Sep 2008 08:30:39

That brings up another question I've always had. In Task Manager, if you
click the Processes tab, the first column is titiled "Image Name". Why are
running .exe''s sometimes referred to as "images" anyway? I ask b/c you
made the same reference.