64-bit experiment
Cesar Strauss <[email protected]> Sun, 2 Apr 2017 16:47:18 -0300
| Newsgroups | gmane.comp.gnu.mingw.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, Following a recent thread on building a MinGW.org cross-compiler from scratch, I became curious about seeing how far I could get by targeting "x86_64-pc-mingw32" instead. After severely hacking at the MinGW.org runtime and w32api, I finally got a 64-bit "hello world" executable which runs on Wine and Windows 10. I neither looked nor used any code from the mingw-w64 project. I did not try building a 64-bit DLL yet. 64-bit support in binutils and gcc was already there, thanks to Kai's work upstream. For w32api, I used our gendef tool on the Windows 10 kernel32.dll and msvcrt.dll. For the runtime, I removed from the build all files with 32-bit assembly code. Also, exported symbols now have a different number of underscores. A few routines in the startup code had to be removed to avoid crashes at runtime. Going forward, we could begin to develop a proper 64-bit port of our runtime and w32api. The first roadblock, I think, is the startup code. Now, this brings the question: does our reservation against using the w32api of the mingw-w64 project extends to their startup code? If not, it would be much easier to simply merge back their runtime code. Otherwise, we can proceed by trial and error. In that case, we can take the opportunity to properly document the process for which we arrived at the final result. If this does not work, we can later reconsider looking at their startup code. Regards, Cesar ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot