running an assembly on a non È86 machine

G

Guest

Just curious, I'm reading Richter's book an it says that:



"When the compiler/linker creates an executable assembly, the following
6-byte x86 stub

function is emitted into the PE file's .text section:

JMP _CorExeMain /*_CorDllMain for a DLL*/"

and then below :



"Note that the 6-byte stub function is specifically for x86 machines. This
stub doesn't work properly if the CLR

is ported to run on other CPU architectures."



Does it mean that an assembly, compiled under win2000 for example, is not
able to run on another type of processor without recompiling it?
 
M

Mattias Sjögren

Does it mean that an assembly, compiled under win2000 for example, is not
able to run on another type of processor without recompiling it?

No. The assembly loader on that other platform would simply ignore the
stub and look directly for the managed entry point. The stub is only
there to support loading the CLR on older versions of Windows without
having to modify the loader on those versions.




Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top