<div dir="ltr">Hi,<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 13, 2013 at 8:50 PM, horseriver <span dir="ltr"><<a href="mailto:horserivers@gmail.com" target="_blank">horserivers@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:<br>
</div><div class="im">> Hi,<br>
><br>
> On Sun, Jan 13, 2013 at 11:29 AM, horseriver <<a href="mailto:horserivers@gmail.com">horserivers@gmail.com</a>> wrote:<br>
> ><br>
> > hi:<br>
> ><br>
> > In kernel code . some function is defined by<br>
> __attribute__((__section__(".initcall" level ".init")))<br>
> ><br>
> > what does this do ?<br>
><br>
> It puts the address of the function in a linker section named<br>
> .initcallX.init where X is replaced by the level.<br>
><br>
> These functions are called in order to initialize various subsystems and<br>
> drivers during kernel bootup.<br>
<br>
</div> Thanks!<br>
<br>
Another question:<br>
<br>
__attribute__((regparm(3))) ; what does this do ?<br>
<div class="im HOEnZb"><br></div></blockquote><div style><br></div><div style>It causes the compiler to pass the argument (3 in this case) to be passed in registers (like EAX, ECX and EDX) instead of stack. </div><div style>
<br></div><div style>Thanks,</div><div style>Ramesh</div><div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im HOEnZb">
<br>
<br>
<br>
> --<br>
> Dave Hylands<br>
> Shuswap, BC, Canada<br>
> <a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div></div>