what does this do ?
horseriver
horserivers at gmail.com
Mon Jan 14 00:56:21 EST 2013
On Mon, Jan 14, 2013 at 07:20:46AM -0800, Ramesh.P wrote:
> Hi,
>
>
> On Sun, Jan 13, 2013 at 8:50 PM, horseriver <horserivers at gmail.com> wrote:
>
> > On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
> > > Hi,
> > >
> > > On Sun, Jan 13, 2013 at 11:29 AM, horseriver <horserivers at gmail.com>
> > wrote:
> > > >
> > > > hi:
> > > >
> > > > In kernel code . some function is defined by
> > > __attribute__((__section__(".initcall" level ".init")))
> > > >
> > > > what does this do ?
> > >
> > > It puts the address of the function in a linker section named
> > > .initcallX.init where X is replaced by the level.
> > >
> > > These functions are called in order to initialize various subsystems and
> > > drivers during kernel bootup.
> >
> > Thanks!
> >
> > Another question:
> >
> > __attribute__((regparm(3))) ; what does this do ?
> >
Thank You!
what the use of doing like this ? why tell gcc to pass param like this ?
> >
> 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.
>
> Thanks,
> Ramesh
>
>
> >
> >
> >
> > > --
> > > Dave Hylands
> > > Shuswap, BC, Canada
> > > http://www.davehylands.com
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
More information about the Kernelnewbies
mailing list