This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug target/37216] [cygming] Invalid alignment for SSE store to .comm data generated with -O3



------- Comment #6 from brian at dessent dot net  2008-08-24 20:59 -------
Subject: Re:  [cygming] Invalid alignment for SSE store to 
 .comm data generated with -O3

It seems to me the issue is that prior to 2007-11-05[1], the PE
assembler could not set section alignment flags correctly so .bss was
simply hardcoded to 2**4 alignment which meant that things happened to
work out.  But now with the current assembler .bss gets the default 2**2
because there's no way to communicate the required alignment of common
symbols in the PECOFF object format that I can tell.  So one workaround
would be that when emitting .comm to also emit an explicit alignment of
.bss so that the assembler sees it and sets the section flags, e.g.

        .comm   _iarr, 256       # 256
        .bss
        .align 16

I tried the above and it seems to do the right thing with iarr ending up
16-aligned.  But it seems like a dirty way of solving the problem,
though having spurious alignment faults is not exactly pretty either. 
Another route would be to set the .bss minimum back to 2**4 again.

[1] http://sourceware.org/ml/binutils/2007-11/msg00027.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216


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