Re: what's the value of "MODULE_STACKSIZE"?

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

 



On 4/26/08, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> On Fri, 25 Apr 2008, Rene Herman wrote:
>
> > On 25-04-08 21:02, Robert P. J. Day wrote:
> >
> > > oh man, i'm going to sound dumb by asking this, but what precisely is
> > > it that embeds that macro value in the module?
> >
> > MODULE_STACKSIZE gets added to VERMAGIC_STRING (linux/vermagic.h) as
> > part of MODULE_ARCH_VERMAGIC (asm/module.h). VERMAGIC_STRING is then
> > referenced directly by kerel/module.c adding the string to the
> > kernel image itself and by scripts/mod/modpost.c, adding the string
> > to the modules (function add_header).
>

i was trying this with the "hello world" module

-----8<---------------
/*
* hello-1.c - The simplest kernel module.
*/
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
int init_module(void)
{
printk(KERN_INFO "Hello world 1.\n");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 1;
}
void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.\n");
}
---8<----------------------

But when i try to get modinfo, its fail to find the module:-

localhost:/home/adil/module/sample # insmod hello-1.ko
localhost:/home/adil/module/sample # modinfo hello-1
modinfo: could not find module hello-1
localhost:/home/adil/module/sample # lsmod | grep hello
hello_1                 1280  0
localhost:/home/adil/module/sample # rmmod hello_1
localhost:/home/adil/module/sample # lsmod | grep hello
localhost:/home/adil/module/sample #

Am i missing anything?


> duh.  let's pretend we never had this conversation.
>
> rday
> --
>
> ========================================================================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry:
>    Have classroom, will lecture.
>
> http://crashcourse.ca                          Waterloo, Ontario, CANADA
>

--
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