This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: extra alignment/padding when using pe-i386
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Galen Seitz <galens at seitzassoc dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 6 Aug 2009 13:56:37 +0930
- Subject: Re: extra alignment/padding when using pe-i386
- References: <4A79F56F.8070701@seitzassoc.com>
On Wed, Aug 05, 2009 at 02:11:11PM -0700, Galen Seitz wrote:
> When assembling the following code with an assembler that generates
> pe-i386 format, the data section gets extra bytes added *after* the
> constant value. When the same code is assembled using an assembler that
> generates elf32-i386, the extra bytes are not present. Is there a way to
> make the output of the pe-i386 and elf32-i386 assemblers match? The
> pe-i386 assembler is being run under cygwin, and the elf32-i386 assembler
> is being run under linux. (Please pardon the line wrapping.)
You are getting the unwanted alignment at bfd/coffcode.h:3368, so
you would need to undef ALIGN_SECTIONS_IN_FILE. I don't know enough
about COFF/PE to advise you on possible repercussions.
--
Alan Modra
Australia Development Lab, IBM