Re: insmod: Invalid module format (2.6.4-52-default, gcc-3.3.3)

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

 



Hemant Mohapatra wrote:

CFLAGS = -g -D__KERNEL__ -DMODULE -I$(KERNEL_SOURCE)/include -O -Wall

was creating problems. Now, so that we understand it better, any ideas
why? Does the kbuild process already know (through the obj-m flag)
that we need to build this binary as a module thereby rendering the
-D__KERNEL__ and -DMODULE flags redundant? Nevertheless, why would
that be a problem anyway?

Thanks a lot,
./h
Exactly .. the "obj-m" tells the kbuild system that you are building a module so it has to declare __KERNEL__ and MODULE by it self
check "obj-y" to see the difference
HTH
MHD


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