On Wed, Apr 15, 2009 at 03:27:01PM +0100, Dave Korn wrote: > > It does look like a Cygwin specific issue. > > Can you tell me whether Linux treats COMMON as a separate section with its > own alignment, or otherwise takes steps to ensure it has a base alignment that > the compiler can assume? Otherwise I expect I need to look at the cygwin > definitions of the ASM_OUTPUT_COMMON* macros.
In ELF each STT_COMMON symbol has both size (st_size) and alignment (st_value) and the linker is of course required to lay out all the common symbols in a way that their alignment requirements are satisfied. Jakub