Re: 64-bit experiment

Cesar Strauss <[email protected]> Fri, 7 Apr 2017 18:57:57 -0300
Newsgroups gmane.comp.gnu.mingw.devel
Message-ID <[email protected]>
On 07-04-2017 14:37, Keith Marshall wrote:
> On 07/04/17 14:52, Earnie wrote:
>> On 4/2/2017 3:47 PM, Cesar Strauss wrote:
>>> 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" ...
> 
> What does this oxymoron mean?  32-bit code, for use on a 64-bit CPU?  
> Why would I want that?  Or is it just an innately stupid choice of
> name?  If the latter, *we* should avoid it; surely for preference it 
> should be "x86_64-pc-mingw64", (and "mingw64" should be adequate 
> shorthand).
> 

OK.

>>> A few routines in the startup code had to be removed to avoid
>>> crashes at runtime.
> 
> Can you enumerate them, please?

Sure. They are:

void _mingw32_init_fmode (void);
void _pei386_runtime_relocator (void);
void __main();

Also, there is a weird crash when the startup calls "main", which can be
avoided by calling "rmain" instead.

It would be nice to be able to use the 64-bit GDB from the mingw-w64
project to step into code, but I'll try to avoid it for now.

>> Please go forward with your work.  Put it in the repository
>> somewhere.
> 
> Maybe create a "branch" for 64-bit development?

OK. I'll put my experiment code there to gain visibility. We can clean
up the patches later in a new branch, suitable for merging, if we decide
to do so.

>>> 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.
> 
>> This may be the better choice.
> 
> I agree; better to avoid the poisoned chalice.

OK.

Regards,
Cesar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot