All of lore.kernel.org
 help / color / mirror / Atom feed
From: navych@126.com (Navy)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Do you know the bug of EXPORT_SYMBOL()
Date: Fri, 24 Jul 2015 13:49:42 +0800	[thread overview]
Message-ID: <20150724054941.GA17034@debian> (raw)

Hi
To my understanding, EXPORT_SYMBOL() is used to export a symbol in 
kernel/modules. The the address of the all sysbols is in /proc/kallsyms. 
Only symbols exported by EXPORT_SYMBOL() is listed its CRC information 
in Module.symvers. So I think the CRC is the key to export a symbol.
I do an experiment:
	
       ---mdir
           |
           |---Mod1
           |    |---mod1.c
           |    |---Makefile
           |
           |---Mod2
                |---mod2.c
                |---Makefile
		
mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL() 
and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and
compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is 
complained. mod2.ko CAN'T BE INSMOD.
I solve this problem by the method in Documentation/kbuild/modules.txt and
heard this is a bug from kernel 2.6.

Why this bug is not be fixed?

             reply	other threads:[~2015-07-24  5:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24  5:49 Navy [this message]
2015-07-24  8:18 ` Do you know the bug of EXPORT_SYMBOL() Pranay Srivastava
2015-07-24 12:40   ` Navy
2015-07-24 14:20     ` Tal Shorer
2015-07-24 17:10 ` Greg KH
2015-07-24 17:41 ` Abhishek bist

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=20150724054941.GA17034@debian \
    --to=navych@126.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.