Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Ack!!!  Modules!!!
@ 1998-11-03  0:46 Keith Baker
  1998-11-03  0:55 ` Larry Snyder
  1998-11-03  2:06 ` Bob McElrath
  0 siblings, 2 replies; 4+ messages in thread
From: Keith Baker @ 1998-11-03  0:46 UTC (permalink / raw)
  To: axp-list

can anyone tell me if this works?

#define MODULE
#include <linux/module.h>

int init_module(void) {printk("<1>Hello World\n"); return 0;}
void cleanup_module(void) {printk("<1>Goodbye\n");}

Its from Oriellys book...  I am attempting to write a kernel module and
this was their first example..  it just gives me unresolved symbols for
printk...  Shouldn't this exist?  What am I doing :-(


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ack!!!  Modules!!!
  1998-11-03  0:46 Ack!!! Modules!!! Keith Baker
@ 1998-11-03  0:55 ` Larry Snyder
  1998-11-03  2:06 ` Bob McElrath
  1 sibling, 0 replies; 4+ messages in thread
From: Larry Snyder @ 1998-11-03  0:55 UTC (permalink / raw)
  To: axp-list

I'm no c programmer, but I'd guess you're missing a few more header
files (like the one that defines printk...).  A few more #includes
might be in order.
-ls-

Keith Baker <toaster@cybercom.net> wrote:
> can anyone tell me if this works?
> 
> #define MODULE
> #include <linux/module.h>
> 
> int init_module(void) {printk("<1>Hello World\n"); return 0;}
> void cleanup_module(void) {printk("<1>Goodbye\n");}
> 
> Its from Oriellys book...  I am attempting to write a kernel module and
> this was their first example..  it just gives me unresolved symbols for
> printk...  Shouldn't this exist?  What am I doing :-(
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ack!!!  Modules!!!
  1998-11-03  0:46 Ack!!! Modules!!! Keith Baker
  1998-11-03  0:55 ` Larry Snyder
@ 1998-11-03  2:06 ` Bob McElrath
  1998-11-03  2:10   ` Keith Baker
  1 sibling, 1 reply; 4+ messages in thread
From: Bob McElrath @ 1998-11-03  2:06 UTC (permalink / raw)
  To: axp-list

On Mon, 2 Nov 1998, Keith Baker wrote:

> can anyone tell me if this works?
> 
> #define MODULE
> #include <linux/module.h>
> 
> int init_module(void) {printk("<1>Hello World\n"); return 0;}
> void cleanup_module(void) {printk("<1>Goodbye\n");}
> 
> Its from Oriellys book...  I am attempting to write a kernel module and
> this was their first example..  it just gives me unresolved symbols for
> printk...  Shouldn't this exist?  What am I doing :-(

printk is the kernel logging facility.  Calls to printk usually end up
routed to syslogd (klogd).  #include <linux/kernel.h> to fix the
compile-time warnings.

-- Bob

  ./'^`\._./'~`\._./'~`\._./'~`\._./'#`\._./'~`\._./'~`\._./'~`\._./'^`\.
 / Rube Goldberg? Bah! Amateur! I give you..Windows 98! Linux everywhere \ 
| Linux, because everyone's work is mission critical.   ANYTHING inside.  |
|_Bob McElrath (mcelrath@wisconsin.cern.ch) Univ. of Wisconsin at Madison_|
  \.___________________________________________________________________./


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ack!!!  Modules!!!
  1998-11-03  2:06 ` Bob McElrath
@ 1998-11-03  2:10   ` Keith Baker
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Baker @ 1998-11-03  2:10 UTC (permalink / raw)
  To: axp-list

These are not compile errors...  The erros only happen when I load the
module...  I think its a mismatch with name mangling for kernel
versions...  Many thanks to all who helped... now how do I compile it with
the version symbols

On Mon, 2 Nov 1998, Bob McElrath wrote:

> On Mon, 2 Nov 1998, Keith Baker wrote:
> 
> > can anyone tell me if this works?
> > 
> > #define MODULE
> > #include <linux/module.h>
> > 
> > int init_module(void) {printk("<1>Hello World\n"); return 0;}
> > void cleanup_module(void) {printk("<1>Goodbye\n");}
> > 
> > Its from Oriellys book...  I am attempting to write a kernel module and
> > this was their first example..  it just gives me unresolved symbols for
> > printk...  Shouldn't this exist?  What am I doing :-(
> 
> printk is the kernel logging facility.  Calls to printk usually end up
> routed to syslogd (klogd).  #include <linux/kernel.h> to fix the
> compile-time warnings.
> 
> -- Bob
> 
>   ./'^`\._./'~`\._./'~`\._./'~`\._./'#`\._./'~`\._./'~`\._./'~`\._./'^`\.
>  / Rube Goldberg? Bah! Amateur! I give you..Windows 98! Linux everywhere \ 
> | Linux, because everyone's work is mission critical.   ANYTHING inside.  |
> |_Bob McElrath (mcelrath@wisconsin.cern.ch) Univ. of Wisconsin at Madison_|
>   \.___________________________________________________________________./
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-11-03  2:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-11-03  0:46 Ack!!! Modules!!! Keith Baker
1998-11-03  0:55 ` Larry Snyder
1998-11-03  2:06 ` Bob McElrath
1998-11-03  2:10   ` Keith Baker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox