LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-11-2011, 07:49 AM   #1
tessendor
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
Problem linking Kernel Code


Hey everyone,

as you might have read in my other post, I'm working on a Linux Security Module.

Currently I'm experiencing a strange problem with the linker.
Everything just compiles fine but when it comes to linking I'll get plenty of errors like
"undefined reference to 'method'"

my Makefile looks like this:

Code:
obj-$(CONFIG_SECURITY_MODULE_NAME) := module1.o
module-y := module2.o module3.o
I have tried several combinations I have seen in other LSM's Makefiles, but none of them worked for me.

What I am wondering about: there aren't any build instructions in this file (in those of the other LSMs neither) and the only .o file which is found in my plugins's directory is module1.o

Can anybody help me out?

Thanks in advance!

regards
 
Old 03-11-2011, 10:52 AM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by tessendor View Post
I have tried several combinations I have seen in other LSM's Makefiles, but none of them worked for me.
I think you want something like this:
Code:
obj-$(CONFIG_SECURITY_MODULE_NAME) := module.o
module-y := module1.o module2.o module3.o
This assumes that you have module1.c, module2.c, and module3.c, and that you want to build module.ko.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem due to linking of an external compiled file to my code mk86 Linux - Newbie 1 04-28-2009 05:10 PM
Linking C code against C++ library knobby67 Programming 1 12-06-2007 11:09 AM
Problem in using both load time linking and runtime linking durgaprasad_j Linux - General 0 08-01-2006 03:49 AM
Make Trouble linking some fortran code Make file problem? any ideas? TheBrick Linux - General 0 05-17-2006 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration