Re: computing/comparing object size

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

 



On Mon, 2006-01-16 at 12:25 -0700, Jim Cromie wrote:
> folks,
> 
> after hacking up a simple/tiny module, I was stunned at its size,
> so I cut it down to essentially nothing ..
> 
> /*    empty module - to find module size cost. */
> #include <linux/config.h>
> #include <linux/init.h>
> #include <linux/module.h>
> #include <linux/moduleparam.h>
> #include <asm/io.h>
> #include <asm/semaphore.h>
> 
> int nada_init_module(void) {
>       return 0;
> }
> void nada_cleanup_module(void) {
>   printk(KERN_NOTICE "nada_cleanup_module\n");
> }
> 
> 
> -rw-rw-r--  1 jimc jimc   582 Jan 16 11:18 nada.c
> -rw-rw-r--  1 jimc jimc 54271 Jan 16 11:19 nada.ko
> -rw-rw-r--  1 jimc jimc   632 Jan 16 11:19 nada.mod.c
> -rw-rw-r--  1 jimc jimc 29688 Jan 16 11:19 nada.mod.o
> -rw-rw-r--  1 jimc jimc 25568 Jan 16 11:18 nada.o
> 
> that seems like a lot of .o and .ko for a do-nothing module.

sounds like you have the debug info generation enabled. Don't do that
while you want to look at sizes ...



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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