This is the mail archive of the gcc@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]

Re: Missing data alignment on MIPS


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."


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