__attribute__((aligned())) and code size increase

Martynas Kunigelis martynas@nm3.ktu.lt
Mon Jan 12 03:11:00 GMT 1998


Hello *,

  This could be not egcs/gcc related, but... Here's some code:

test-aligned.c:

char buffer[16384] __attribute__((aligned(4096)));

test-regular.c:

char buffer[16384];

now compile both files with gcc -c test-{aligned,regular}.c and
check the sizes of the object files. The aligned one is substantially
bigger (around 3KB). Why? I thought adding the 'aligned' attribute
just sets some flag in the object file header or such.

Ah, I forgot, the platform is Linux 2.1 on Intel Pentium, I'm using
gcc-2.7.2.3 (_not_ egcs). Does egcs have this problem?

Martynas



More information about the Gcc mailing list