Compiling Modules

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

 



I have two modules A & B. B depends on A.

Module B, which uses kernel API like wake_up_interruptible and exported function calls from Module A. When module B is linked, its prints a line for every function call and symbol it access from module A but not from kernel (makefile is attached)

*** Warning: "XYZ" [module-b.ko] undefined!

I think for kernel symbols it is able to find compiled object but for module-a it cannot. Can anybody tell how can I specify where to objs for module-a are. So that it will not complain at link time.

Thanks
--------------------------------------------------------------------------------------------------------
#
# Makefile for module-b
#
INCLUDES := -I /usr/src/linux/include -I ../module-a

kernel_source := /usr/src//linux
EXTRA_CFLAGS += ${INCLUDES}

default: all
obj-m := module-b.o
module-b-objs = module-b.o

module-b.o: $(module-b-objs)
    $(LD) -r $^ -o $@

all:
    $(MAKE) -C $(kernel_source) SUBDIRS=`pwd` modules;

[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