
Dear "V, Aneesh",
In message FF55437E1F14DA4BAEB721A458B6701706C58880FB@dbde02.ent.ti.com you wrote:
Initially I had a "done" bit to only set up page tables at the beginning. However, since the aligmnent requirement was for the whole object file, this extra integer tool 16kB in BSS, so I chose to remove it.
This is rather strange. I thought the linker would have done better. However, I could overcome this problem by making 'done' a non-zero initialized variable. Can't you try that?
"non-zero initialized variable" means you moved the storage location from the bss into the data segment.
The same can be done by using something like
int done __attribute__ ((section (".data"))) = 0;
This is a better approach because 1) a non-zero value will be easily misinterpreted as "already done", and 2) this clearly documents what is going on and why.
Best regards,
Wolfgang Denk