[linux-help] Re: interchanging executables
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I'm not 100% sure on this, but while you might be able to use compiled
object files (at least in certain situations) on other operating
systems, I don't think an executable would work. An executable
contains code that is used to get the program loaded into memory and
execute. That is pretty OS dependent. This would be especially true if
the program uses any shared libraries.
On Fri, Jun 16, 2000 at 12:32:32PM -0500, John Reinke wrote:
> I had someone tell me recently that if a program is compiled correctly, it
> can be run on that hardware, regardless of the operating system. Is this
> true? I can understand this would be true for operating systems
> themselves, but I would think that executables are being managed by an
> operating system as processes, and somehow need to be able to know how
> they will be controlled.
>
> For example, assume I wrote a C program that looks for a text string
> within all the files of a directory (including subdirectories), and
> creates a file with the output. Let's say I compiled it on a 300 MHz
> Pentium system running Debian Linux. So, assumming I compiled it in the
> correct manner, I could also use that executable in OS/2, BeOS,
> Windoze95/98/2000/NT, other UNIX/Linux distributions or ANY other
> operating system that can run on the same hardware? If so, could it also
> work on all x86 and compatible processors?
>
> I would think that working with the different file systems would add to
> the problem, unless there is a universal way executables communicate to
> operating systems that they need to change into a directory or create a
> file, etc.
>
> John
>
>
> -- This is the linux-help@xxxxxxxxx list. To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|