This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Missing data alignment on MIPS
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Paul Koning <Paul_Koning at dell dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 07 Apr 2009 23:58:31 +0200
- Subject: Re: Missing data alignment on MIPS
- References: <18907.36215.355331.202819@gargle.gargle.HOWL>
Paul Koning <Paul_Koning@dell.com> writes:
> It looks like the compiler is generating appropriate code but gas
> isn't doing the right thing with it, at least not consistently.
>
> With this test program, compiled with GCC 4.1.2 mipsel-netbsdelf:
>
> int i = 3;
> char foo[17] __attribute__ ((aligned(32)));
>
> I get .bss aligned 2**4.
That's not a bug. The symbol is defined in the COMMON section, not the
.bss section. You can use -fno-common to tell the compiler to put the
symbol into the .bss section. But either way the final linked
executable should have the symbol properly aligned.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."