This is the mail archive of the
mailing list for the Cygwin project.
Re: [HEADSUP] Please try to build your packages for 64 bit
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 19 Apr 2013 20:51:11 +0200
- Subject: Re: [HEADSUP] Please try to build your packages for 64 bit
- References: <20130419104532 dot GQ7395 at calimero dot vinschen dot de> <87ppxqbdu3 dot fsf at Rainer dot invalid>
- Reply-to: cygwin-apps at cygwin dot com
On Apr 19 20:00, Achim Gratz wrote:
> Corinna Vinschen writes:
> > the 64 bit Cygwin seems to be quite stable now. We're still suffering
> > from a gcc problem which seems to affect C++ inline methods using
> > templates, so some C++ packages might not be buildable yet(*), but other
> > than that it looks pretty good.
> I'll update my 64bit installation over the weekend and build my
> packages. While upx builds and works fine with 64bit, it doesn't handle
> the PE+ executable format, so it is unfortunately useless for 64bit
> executables. Is there any documentation how this format differs from
> the PE format so that I might look into adding support for 64bit when
> time permits?
Strange that nobody did it so far. It should be rather trivial,
actually. The only noticable difference between PE and PE+ are a few
different values in some of the header fields and the slightly different
layout of the IMAGE_OPTIONAL_HEADER structure.
For the different values in IMAGE_FILE_HEADER(*), note the fields
- Machine (IMAGE_FILE_MACHINE_AMD64 instead of IMAGE_FILE_MACHINE_I386)
- Characteristics (No IMAGE_FILE_32BIT_MACHINE flag)
in IMAGE_OPTIONAL_HEADER(**), see
- Magic (IMAGE_NT_OPTIONAL_HDR64_MAGIC vs. IMAGE_NT_OPTIONAL_HDR32_MAGIC)
- SizeOfHeaders (don't know the right values off the top of my head here)
As for the different IMAGE_OPTIONAL_HEADER structure layout:
- BaseOfData has been removed
- ImageBase, SizeOfStackReserve, SizeOfStackCommit, SizeOfHeapReserve,
and SizeOfHeapCommit are 8 byte values now.
I don't know how upx works under the hood, but I assume you also need
the unpacker code in 64 bit. If it's not written in assembler, the
32 bit code should more or less do the right thing already.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com