This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] coff: fix alignment issues when building on ARM


> On Tue, Dec 05, 2006 at 04:26:02PM +0000, Nick Clifton wrote:
> >   OK, What do we think of this revised version of Michael's patch ?
> 
> An alternative is to never use sizeof(external_interface_struct).
> coff/external.h defines AOUTHDRSZ et al for exactly this reason.
>
No, this is actually not a valid alternative. coff/external.h defines the sizes
for all the structs, but this is actually the root of all evil:

The problems I found were caused by the memset call in line 499 of
bfd/coffswap.h. Thereby not only 18 (==AUXESZ) bytes starting from the given
pointer were overwritten, but rather the 2 bytes before as well, probably to
some alignment performed in between.

Cheers,
Michael

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]