Why can't Windows run Linux binary executables?

This is a discussion on Why can't Windows run Linux binary executables? within the Tech Board forums, part of the Community Boards category; If microsoft did make windows run linux apps it would be done with another subsystem, you have probably run an ...

  1. #16
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    If microsoft did make windows run linux apps it would be done with another subsystem, you have probably run an app on a subsystem other than the native win32 and surely didn't notice a speed difference. It's only a small layer in between so it's menial compared to the time it takes to do large drawing loops, sorting, etc.
    Here are the subsystems in nt:
    WIN32 Subsystem
    POSIX Subsystem
    OS/2 Subsystem
    DOS Virtual Machine

    Also, WINE is plenty fast for your general windows app, it's not an emulator.

    I may have just misinterpreted what you said but it sounded like you think the windows PE format has different binary than that of ELF, binary only changes across cpu hardware architecture. Making windows execute ELF and linux execute PE would be quite easy, it's the function/system calls that are problematic.
    Finally, making all linux apps run on windows won't refine or improve the actual microkernel or executive.

    Also: reactos

  2. #17
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    valis, you cleared things up! So I guess reactos is as close as to what I was thinking. My ideas are a little confusing even to myself, because I don't know exactly how all of this ELF, PE, binary execution, and CPU involvement totally works, so I'm glad I was guided somewhere!

    I also forgot that WINE means WINE Is Not an Emulator lol.

    I'll look into Wine, these subsystems and reactos! Thanks again! My head almost exploded today!

  3. #18
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    use Crossover Office Professional it's Wine's grown up sibling.
    will run most non 3d apps in linux.
    ( 3D Studio max, Rhinoceros nurbs Modeller being 3d apps not running in crossover office )

    my question, why pay to get an application written for windows when you can get a free open source application that runs in linux?
    why waste the money?
    there is no ms only software that it needed.

    would still nuke ms offices even if they stopped trying to kill linux, to get rid of the worst software company on the planet..they do not write good software at all.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  4. #19
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    I see wine was already mentioned, but you can use cygwin to reverse that.

    Windows on Linux
    http://www.winehq.com/
    Linux on windows
    http://www.cygwin.com/

    Dual boot is the best.
    Last edited by xddxogm3; 11-17-2005 at 07:23 PM.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  5. #20
    Code Ripper
    Join Date
    Jun 2004
    Posts
    30
    hi,

    in the last issue of 29A e-zine (a virus writers e-zine ) there´s some code to run ELF binaries in win32...

    basically, what it does is load the ELF binary to a buffer allocated at its base address (0x048080000 i think), and parse the the imported libc calls, substituting them with stubs that call the win32 API

    a "Hello, World" sample supplied run without problems

    jmgk

  6. #21
    Cat Lover
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109
    Quote Originally Posted by Jaqui
    my question, why pay to get an application written for windows when you can get a free open source application that runs in linux?
    why waste the money?
    there is no ms only software that it needed.
    But most of the open source linux applications are free open source on windows as well. Open Office, Firefox, GIMP, etc.

    How many free open source programs are there on linux that cost money on windows?

  7. #22
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    How many free open source programs are there on linux that cost money on windows?
    Qt, the underlying library of KDE programs.

    As for an earlier question about Linux userspace programs not available in Windows: AmaroK. Might just be the best music player there is.


    And Linux CAN load and run PE executables. The Misc EXE kernel module makes it possible in principle, and a small part of WINE makes it reality. Using the same mechanism, Linux can load and run executable JARs like native apps.

    Also, you seem to have some misunderstandings in how Linux in general works, so let's recap a bit.

    Windows uses a modified microkernel architecture. The difference to pure microkernels is that other things beside the kernel run in kernel mode. In fact, a lot of stuff runs in kernel mode in order to reduce context switches and improve performance. One of these things is the GDI, even though Windows has often been criticized for this.

    Linux uses a modular monolithic kernel architecture, but in general, the kernel is kept as small as possible and much work is delegated to userspace apps. In particular, the entire graphics subsystem of Linux (which, as such, doesn't really exist in the first place) is implemented in userspace. The key to graphics in Linux lies usually in an X server. The X server, an entirely userspace application, takes control of the graphics card (not sure what mechanisms allow it to) and provides graphics services.
    The means of communicating with an X server are through Xlib, which is the client interface of X. The library will communicate with the server in some way (shared memory, local sockets, or even web sockets, which is why most apps can run transparently on a different computer, and even a different OS) using the well-defined X protocols.

    Graphics toolkits, such as GDK (and indirectly GTK), Qt, or WINE's WinAPI are then implemented in terms of Xlib. All in userspace.

    This is the key, and the reason why WINE apps aren't by definition slower than native Linux apps: they all probably have one layer of indirection over Xlib. (wxWidget apps probably have two, as the Linux version of wxWidgets is implemented on top of GTK+.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #23
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    Quote Originally Posted by CornedBee
    Qt, the underlying library of KDE programs.
    Qt is free as long as you release your program under the GPL. If you want closed-sorce, you gotta pay in either OS.

    Quote Originally Posted by CornedBee
    And Linux CAN load and run PE executables. The Misc EXE kernel module makes it possible in principle, and a small part of WINE makes it reality. Using the same mechanism, Linux can load and run executable JARs like native apps.
    I'm not sure what you mean about WINE here. Could you explain? It seems you're refering to MONO, which are the .NET, erm..., libraries? framework? stuff? written for UNIX (or maybe just Linux, not sure), led by Miguel (the 'u' is silent, goddamnit!) de Icaza IIRC.
    And yes, using userspace, the JARs are run by running the JVM (Java Virtual Machine), which is the same way mono runs.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  9. #24
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by -=SoKrA=-
    Qt is free as long as you release your program under the GPL. If you want closed-sorce, you gotta pay in either OS.
    No, only the very latest version of Qt was released under the GPL for Windows. Qt ... 4? Or 5? Not sure if it's even out yet.


    I'm not sure what you mean about WINE here. Could you explain? It seems you're refering to MONO, which are the .NET, erm..., libraries? framework? stuff? written for UNIX (or maybe just Linux, not sure), led by Miguel (the 'u' is silent, goddamnit!) de Icaza IIRC.
    And yes, using userspace, the JARs are run by running the JVM (Java Virtual Machine), which is the same way mono runs.
    Not Mono, WINE. What I'm talking about is the kernel's misc. binary feature, which calls upon userland utilities to learn what to do with files marked executable but not interpreted by the shell, i.e. passed to exec(). a.out and ELF are handled directly; other executables can be handled by userland loaders if you configure it correctly. This way, you can configure the system that it passes JARs to a newly spawned JVM. And you can configure it to pass PE executables to the PE loader, which is part of WINE. And you can configure it to pass whatever Mono uses to the Mono runtimes.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #25
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    Quote Originally Posted by CornedBee
    No, only the very latest version of Qt was released under the GPL for Windows. Qt ... 4? Or 5? Not sure if it's even out yet.
    Qt4 is the latest one. I've seen KDE already ported to Windows, so I thought earlier versions had it as well, but now you mention it, I do remember something along the lines that it was only possible now.
    Quote Originally Posted by CornedBee
    Not Mono, WINE. What I'm talking about is the kernel's misc. binary feature, which calls upon userland utilities to learn what to do with files marked executable but not interpreted by the shell, i.e. passed to exec(). a.out and ELF are handled directly; other executables can be handled by userland loaders if you configure it correctly. This way, you can configure the system that it passes JARs to a newly spawned JVM. And you can configure it to pass PE executables to the PE loader, which is part of WINE. And you can configure it to pass whatever Mono uses to the Mono runtimes.
    Ah, I was not aware of WINE doing this. I only knew about mono and java, though all it takes is telling the kernel what to run as a wrapper, so it could be used for anything, really. IIRC this is basically what the kernel does with scripts that begin with the dash-bang (#!) automagically, though it's probably a POSIX requirement.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  11. #26
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    Quote Originally Posted by Dweia
    But most of the open source linux applications are free open source on windows as well. Open Office, Firefox, GIMP, etc.

    How many free open source programs are there on linux that cost money on windows?
    you missed the direction of my post.

    why buy microsoft office when there is open office, koffice....
    why waste that thousand dollars on a windows app when there are several viable options for free?

    I have no need for any software written explicitly for windows.
    linux has all the software I need available for it.

    and, other than QT, all the widget sets allow for commercial sale of anything you develop with them.
    ( lgpl instead of gpl )
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  12. #27
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by Jaqui
    my question, why pay to get an application written for windows when you can get a free open source application that runs in linux?
    why waste the money?
    there is no ms only software that it needed.
    Why do basically all graphics professionals use Photoshop even though it costs money instead of the GIMP which is free? One reason could be that Photoshop might just be better than the GIMP. Of course free software is reliable and very stable (the list of free things on this box is very extensive,) but you can't deny that sometimes professional software is sometimes just better, not to imply windows is better than linux, but you can't deny it: there is a point at which price is insignificant compared to functionality and quality.

    A lot of commercial programs DESERVE to be bought as well. If I had the money, I'd honestly BUY Photoshop, IDA Pro, and probably Flash 8. They're absolute masterpieces of software, and the creators of such things should be respected.

    would still nuke ms offices even if they stopped trying to kill linux, to get rid of the worst software company on the planet..they do not write good software at all.
    Which is exactly why you won't find many people who've seen microsoft code and say it was anything but excellent? Yeah I think so too. Microsoft may be dirty bastards some or a lot of the time, but they're not stupid over there, and definately not to be taken lightly as programmers.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  13. #28
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by Mad_guy
    Why do basically all graphics professionals use Photoshop even though it costs money instead of the GIMP which is free? One reason could be that Photoshop might just be better than the GIMP.
    another could be that most people have never heard of the GIMP before, and almost every school in the world pushes photoshop without even mentioning the GIMP. Why? because everybody uses it. Why? because it was there first.

    I prefer GIMP to photoshop any day, but the fact that nobody I talk to in the "real world" has a clue what the GIMP is, I end up calling it a "photoshop-like" program.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  14. #29
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by major_small
    Why? because everybody uses it. Why? because it was there first.
    ... Or it could have to do with the fact it's a GOOD program. Regardless of whether it got out first or not, if it wasn't good, do you really think it'd be going on it's 9th incarnation in CS2? No, no it wouldn't. If it wasn't good, Adobe would have completely abandoned it long ago. The thing is Photoshop has set the standards in something like the graphics design industry so high, not many other programs can compete with it, the GIMP is just the most compared program. If the GIMP was absolutely better, do you really think that every design professional would use Photoshop? No, they'd use GIMP. But that isn't the case, is it?


    FORTRAN came out before C, but there're probably a lot more C programmers than there are FORTRAN programmers, wouldn't you say? Date of release really has nothing to do with it -- if the GIMP was really so much better, people would use it, and Photoshop would be a thing of the past.
    Last edited by Mad_guy; 12-04-2005 at 07:37 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  15. #30
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    alright, comparing FORTRAN to C is completely off topic and has nothing to do with this at all, and the fact is that they're both great programs. What I'm saying is that if the GIMP came out as what it is now before photoshop, I'll bet you it would be bigger than photoshop.

    Think about it. You've been using the GIMP for years now, and it keeps getting better and better. Now comes some proprietary software that's just a little bit better, but costs $600 more. What are you going to go with?

    whereas FORTRAN and C are completely different. FORTRAN was great, but C was much better. and FORTRAN could never become as good (at whatever) as C.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Build linux on windows
    By baash05 in forum Linux Programming
    Replies: 6
    Last Post: 02-19-2008, 09:12 PM
  2. How to run windows based application in linux
    By Bargi in forum Linux Programming
    Replies: 5
    Last Post: 02-06-2008, 11:46 PM
  3. programming in linux or windows?
    By rtunez33 in forum C Programming
    Replies: 11
    Last Post: 09-19-2004, 07:22 PM
  4. linux and windows lookup host processes
    By Lynux-Penguin in forum Tech Board
    Replies: 0
    Last Post: 08-31-2003, 11:54 PM
  5. linux vs. windows
    By muttski in forum Linux Programming
    Replies: 18
    Last Post: 04-07-2002, 09:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21