linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy Reynolds <reynolds@redhat.com>
To: "Amit Kulkarni" <amitncsu@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Insmod gives unsresolved symbol
Date: Tue, 6 Nov 2001 08:59:35 -0600	[thread overview]
Message-ID: <20011106085935.1888af63.reynolds@redhat.com> (raw)
In-Reply-To: <20011106081744.40294.qmail@web12208.mail.yahoo.com>
In-Reply-To: <20011106081744.40294.qmail@web12208.mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

It was a dark and stormy night.  Suddenly "Amit Kulkarni" <amitncsu@yahoo.com> wrote:

> Hi 
> 
> I am trying to write a device driver which calls
> certain functions/variables from the kernel 
> (e.g. ipv4_explicit_null from
> /usr/src/linux/net/mpls/mpls_init.c )
> 
> But when I try to insert the module using insmod it
> gives me an error saying unresolved symbol
> ipv4_explicit_null
> 
> thinking the kernel did not export the said symbol  I
> added EXPORT_SYMBOL(ipv4_explicit_null) in the file
> mpls_init.c 
> Now I can see the symbol in System.map
> but my problem still persists. 
> 
> Am I exporting symbols properly or is there anything
> else that needs to be done .

I assume that you're trying to build a module outside the regular kernel build
system.  You can do this if you are carefull.

Look carefully at the symbol in the System.map file.  Is it EXACTLY the
"ipv4_explicit_null" symbol? Are the extra characters after the "...null" part
of the name?  Any extra characters mean that you've got module versioning turned
on in your kernel, so exported symbols have their name mangled somewhat as C++
would do (this is to implement some protection since modules from one kernel
version probably won't work with another kernel version).  The easiest solution
to this is to recompile your kernel with module versioning turned off.

---------------------------------------------+-----------------------------
Tommy Reynolds                               | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2001-11-06 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-06  8:17 Insmod gives unsresolved symbol Amit Kulkarni
2001-11-06 14:59 ` Tommy Reynolds [this message]
2001-11-06 19:00   ` Amit Kulkarni
     [not found] <sbe7b36f.021@MAIL-SMTP.uvsc.edu>
2001-11-06 19:04 ` Amit Kulkarni

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=20011106085935.1888af63.reynolds@redhat.com \
    --to=reynolds@redhat.com \
    --cc=amitncsu@yahoo.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;
as well as URLs for NNTP newsgroup(s).