On Apr 6, 2005 3:18 AM, James E Wilson <[EMAIL PROTECTED]> wrote:
> I would guess a limitation of cygwin binutils support, or perhaps of
> Windows itself.
Binutils, perhaps. Windows certainly not as msvc2k3 & icc8.1 don't
have such issue with the same code.

> This seems to work fine on linux.  If I compile a simple example using
> __alignof__, I see that the compiler is assuming 16-byte alignment.  If
> I compile with -S, I see that the compiler is giving them 32-byte
> alignment (probably for better cache alignment).  If I run objdump -x on
> the a.out file, I see that .bss section has 2**5 (32-byte) alignment.
> All is as it should be.
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0003e754  00401000  00401000  00000400  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
  1 .data         00004634  00440000  00440000  0003ec00  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  2 .rdata        00004884  00445000  00445000  00043400  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .bss          00008fc0  0044a000  0044a000  00000000  2**4
                  ALLOC
  4 .idata        00001984  00453000  00453000  00047e00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .stab         00169908  00455000  00455000  00049800  2**2
                  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE
  6 .stabstr      001c39e1  005bf000  005bf000  001b3200  2**0
                  CONTENTS, READONLY, DEBUGGING, NEVER_LOAD, EXCLUDE

Gcc & the toolchain used to have lots of issues wrt alignement, but i
thought they were a thing of the past.
As far as i can see, everything is fine regarding section alignements.

> A real bug report, as per
>      http://gcc.gnu.org/bugs.html
> would be useful here, so we can check.  In particular, a testcase to
> reproduce the problem, and exactly what you believe is wrong with the
> output.
Yep, but i was testing the water.
I mean i have lots of other 16 bytes aligned data (static, extern,
const or not and whatnot) in there and the only problematic one is
this semi large static.
So, because that's the largest, i thought i've crossed some magic size
threshold.

I'll try to pinpoint the problem a bit better.

Reply via email to