All of lore.kernel.org
 help / color / mirror / Atom feed
* good explanation of __read_mostly, __init, __exit macros,
@ 2012-07-16 11:22 Aft nix
  2012-07-16 12:01 ` Sannu K
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Aft nix @ 2012-07-16 11:22 UTC (permalink / raw)
  To: kernelnewbies

Hi,

The macro expansion of __read_mostly :

#define __read_mostly __attribute__((__section__(".data..read_mostly"))

This one is from cache.h

__init:
#define __init		__section(.init.text) __cold notrace

from init.h

__exit:

#define __exit          __section(.exit.text) __exitused __cold notrace

After searching through net i have not found any good explanation of
what is happening there.

Additonal question : I have heard about various "linker magic"
employed in kernel development. Any information
regarding this will be wonderful.

cheers

-- 
-aft

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-07-17 14:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16 11:22 good explanation of __read_mostly, __init, __exit macros, Aft nix
2012-07-16 12:01 ` Sannu K
2012-07-16 12:29 ` Filipe Rinaldi
2012-07-16 12:40   ` Robert P. J. Day
2012-07-16 14:26     ` Gaurav Jain
2012-07-16 14:27       ` Gaurav Jain
2012-07-16 18:39 ` Mulyadi Santosa
2012-07-16 18:49   ` Aft nix
2012-07-16 19:03     ` Mulyadi Santosa
2012-07-17 11:07       ` Arif Hossain
2012-07-17 14:19         ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.