<br><br><div class="gmail_quote">On Mon, Jul 16, 2012 at 4:52 PM, Aft nix <span dir="ltr"><<a href="mailto:aftnix@gmail.com" target="_blank">aftnix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
The macro expansion of __read_mostly :<br>
<br>
#define __read_mostly __attribute__((__section__(".data..read_mostly"))<br>
<br>
This one is from cache.h<br>
<br>
__init:<br>
#define __init __section(.init.text) __cold notrace<br>
<br>
from init.h<br>
<br>
__exit:<br>
<br>
#define __exit __section(.exit.text) __exitused __cold notrace<br>
<br>
After searching through net i have not found any good explanation of<br>
what is happening there.<br>
<br>
Additonal question : I have heard about various "linker magic"<br>
employed in kernel development. Any information<br>
regarding this will be wonderful.<br>
<br>
cheers<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
-aft<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</font></span></blockquote></div><br><br>Using __init means the function code will be removed - saving RAM space i.e., one cannot call the function declared with __init once the initialization is done. I just know the meaning but I am not sure of how it works. This may provide some info on your question even though it did not answer your question.<br>
<br>Hope this Helps,<br>Sannu K<br><br>