On Mon, Oct 16, 2017 at 12:46:20PM -0500, Brijesh Singh wrote: > sev_enabled lives in .data section and looking at the objdump it seems > to initialized to zero. So, I think its safe to remove the initialization.
So I'd assume that static means it gets cleared to 0 automatically, even if it is not in the .bss section. And Tom put it in the .data section to protect it from the .bss clearing later. To quote the C99 standard: "If an object that has static storage duration is not initialized explicitly, then: ... — if it has arithmetic type, it is initialized to (positive or unsigned) zero;" -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.