From: Borislav Petkov <petkovbb@googlemail.com>
To: Tanya Gornak <errizo@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel module, undefined symbol show_regs
Date: Wed, 25 Nov 2009 18:45:02 +0100 [thread overview]
Message-ID: <9ea470500911250945x72052c22hb0ccebf2fe96798a@mail.gmail.com> (raw)
In-Reply-To: <5dcc4c8a0911250427g73f7a3a0y26eff2379fb86edf@mail.gmail.com>
On Wed, Nov 25, 2009 at 1:27 PM, Tanya Gornak <errizo@gmail.com> wrote:
> Hello. I can't solve problem that happens while I'm making my kernel module.
>
> part of my module:
> // ...
> #include <linux/sched.h>
> //....
> static u32 task_syscall_entry(enum utrace_resume_action action,
> struct utrace_engine *engine,
> struct task_struct *task,
> struct pt_regs *regs){
> // ...
> show_regs(regs);
>
> }
> But, while making I get:
>
> WARNING: "show_regs" [/home/tehhi/module/trace.ko] undefined!
>
> extern void show_regs(struct pt_regs *); define in header
> linux/sched.h, place of source code is
> linux/arch/x86/kernel/process_32.c
> It use extern void __show_regs(struct pt_regs *); and extern
> asmlinkage void __backtrace(void);
> I think that extern means that I can use it (and there are no static
> symbols in this function).
>
> When trying to insert module, it predictably complains of an unknown
> symbol show_regs.
>
> What am I missing here?
You're using a function in a module which is not exported to modules.
See http://lwn.net/images/pdf/LDD3/ch02.pdf for more details.
--
Regards/Gruss,
Boris
prev parent reply other threads:[~2009-11-25 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5dcc4c8a0911241202s1d56354el9628763b05451fb9@mail.gmail.com>
2009-11-25 12:27 ` Tanya Gornak
2009-11-25 17:45 ` Borislav Petkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ea470500911250945x72052c22hb0ccebf2fe96798a@mail.gmail.com \
--to=petkovbb@googlemail.com \
--cc=errizo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®