Why 64-bit programs can't load 32-bit plugins
Posted: Thu Apr 19, 2012 2:50 pm
I have used a lot of tools in my time by Adobe, Autodesk, Microsoft, Oracle, and one thing that annoys me is the ability for something to fail because I have a mixture of 32-bit and 64-bit software installed.
For example, many 32-bit tools that try to interface with Oracle refuse to run if I have a 64-bit copy of Oracle installed. I also sometimes find myself using a 64-bit program, and really need to use a legacy 32-bit extension, but it won't work with anything but the 32-bit version of program.
I was thinking, especially with so many companies (Microsoft, Adobe) focused on supporting legacy solutions, why they don't invest in a solution for running 32-bit extensions under 64-bit software.
My solution is for 64-bit programs to have a 32-bit stub that can load 32-bit extensions in. The 32-bit stub uses IPC to enable the 64-bit program and the 32-bit extension to communicate with each other. It may add a significant performance overhead, but I think this is acceptable over simply not being able to use the extension at all.
Also from an OS perspective:
How about letting applications contain both 64-bit and 32-bit code? Such as a system call upon entering the function of a dynamically linked library switches to 32-bit, and 64-bit upon exiting. The program could consist of threads executing both 64-bit and 32-bit blocks of code simultaneously. Of course, in 32-bit mode you'll be limited to 4GB of virtual memory. This wouldn't solve every problem, but at least give software engineers something to work with when designing their plugin architecture or using legacy libraries.
For example, many 32-bit tools that try to interface with Oracle refuse to run if I have a 64-bit copy of Oracle installed. I also sometimes find myself using a 64-bit program, and really need to use a legacy 32-bit extension, but it won't work with anything but the 32-bit version of program.
I was thinking, especially with so many companies (Microsoft, Adobe) focused on supporting legacy solutions, why they don't invest in a solution for running 32-bit extensions under 64-bit software.
My solution is for 64-bit programs to have a 32-bit stub that can load 32-bit extensions in. The 32-bit stub uses IPC to enable the 64-bit program and the 32-bit extension to communicate with each other. It may add a significant performance overhead, but I think this is acceptable over simply not being able to use the extension at all.
Also from an OS perspective:
How about letting applications contain both 64-bit and 32-bit code? Such as a system call upon entering the function of a dynamically linked library switches to 32-bit, and 64-bit upon exiting. The program could consist of threads executing both 64-bit and 32-bit blocks of code simultaneously. Of course, in 32-bit mode you'll be limited to 4GB of virtual memory. This wouldn't solve every problem, but at least give software engineers something to work with when designing their plugin architecture or using legacy libraries.