Re: Zero Initialized in BSS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



no,
kernel-hacking guides say you should not initialize it *explicitly*,
because gcc have done that you for *implicitly* already.

So initializing it explicitly does take it out of bss, even though it's initialized to zero and that GCC flag is on? So, for example:

static struct file_system_type my_file_system_type =
{
	/* ... */
	. owner = THIS_MODULE
} ;

If this is not compiled as a module, the .owner member is initialized to zero, and so is not in the bss? So I should do this:

	/* ... */
#ifdef MODULE
	, . owner = THIS_MODULE
#endif
} ;

Right?

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux