1. Re: Euphoria and Universal Executables, Possable road to the Programming Fu

D. Allman wrote:
> 
> Simple, a revised version of the Euphoria binding and shrouding utility would
> add an ELF/Linux interpreter AND a PE/Windows interpreter to bounded
> Executables.
> 
> 
> The PE/Windows interpreter would run the progie under Windows and the the 
> ELF/Linux one would run it under Linux.

Ok, let's come back to the basics.

Let's admit the bound file somehow has both interpreters inside it, each one in
the right format. In the end, what you get is a binary file on disk.

Now let's assume the file ends up on some hard disk on a foreign machine. That
machine has an OS unknown to you, and that OS will be told by its user, whom you
don't know either, to execute your file.

The OS then launches an internal process called a loader. The process checks the
file it loads for validity, does whatever fixups are needed (allocate memory, do
relocations and whatnot), and then transfers execution control to some location
in memory (the entry point).

Here is the clinch. The loader from the foreign OS doesn't know about files from
other OSes, and will look for a particular signature at a particular offset in
your binary, failing if some content/checksum isn't the one expected. As a
result, the SAME binary can't run on diffeent OSes, unless the target OSes are
interoperable, because you can't have different signatures at the same offset at
the same time. I never heard that Windows and Linux are interoperable; are they?.

CChris

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu