[ECOS] Main stack alignment

Daniel Lidsten Daniel.Lidsten@combitechsystems.com
Thu May 15 16:02:00 GMT 2003


When i allocate two structures in the main loop then they will be place
with an 8 bytes alignment in the main_stack. Why is that?

The stack is declared as:
static cyg_uint8 cyg_libc_main_stack[

...and placed in the .bss section by the linker script.

The odd thing is that if i declare my structures as static or make them
global, then they are 2-byte aligned. How come? I want my structures to
be 2 byte aligned even when i declare them inside main.

Regards, Daniel

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list