mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Anders Peter Fugmann <afu@fugmann.dhs.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Exporting symbols from a module.
Date: Tue, 15 May 2001 15:57:09 -0600 (MDT)	[thread overview]
Message-ID: <200105152157.f4FLvAw9021664@webber.adilger.int> (raw)
In-Reply-To: <3B0172E6.2010808@fugmann.dhs.org> "from Anders Peter Fugmann at May 15, 2001 08:18:14 pm"

Anders Fugmann writes:
> I've got a simple question - how export symbols from one module, and use 
> them in another.
> 
> I have two modules - 'kvaser' and 'can_master'.
> 'kvaser' exports some functions, and 'can_master' needs to use call 
> these functions.
> 
> I used EXPORT_SYMBOL, and declared the function extern,
> but i still get unresolved symbols.
> 
>  > insmod kvaser.o
>  > insmod can_master.o
> can_master.o: unresolved symbol can_hw_no_messages
> can_master.o: unresolved symbol can_hw_register
> can_master.o: unresolved symbol can_hw_get_message
> can_master.o: unresolved symbol can_hw_unregister
> can_master.o: unresolved symbol can_hw_listen
> can_master.o: unresolved symbol can_hw_block
> can_master.o: unresolved symbol can_hw_send_message
> 
> 
> Looking in /proc/ksyms, i can find the exported symbols from the kvaser 
> driver, but it they are in a different format than all the others.
> 
> d3d27070 can_hw_register_R__ver_can_hw_register [kvaser]
> d3d27090 can_hw_unregister_R__ver_can_hw_unregister     [kvaser]
> d3d270b0 can_hw_listen_R__ver_can_hw_listen     [kvaser]
> d3d270c4 can_hw_block_R__ver_can_hw_block       [kvaser]
> d3d270e8 can_hw_send_message_R__ver_can_hw_send_message [kvaser]
> d3d270f8 can_hw_get_message_R__ver_can_hw_get_message   [kvaser]
> d3d27108 can_hw_no_messages_R__ver_can_hw_no_messages   [kvaser]
> d3d27000 
> __insmod_kvaser_O/home/afu/cvs/dtu/49422/canbus/src/kvaser.o_M3B01709C_V132100 
I just recently had this problem, and your Makefile is missing:

export-objs := <file name>.o

where <file name>.o is the compiled object file from <file name>.c, and
not the module name (if it is different).

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

  reply	other threads:[~2001-05-15 21:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-15 18:18 Anders Peter Fugmann
2001-05-15 21:57 ` Andreas Dilger [this message]
2001-05-15 22:23   ` Anders Peter Fugmann
2001-05-15 22:45     ` Andreas Dilger
2001-05-17 11:28       ` Anders Peter Fugmann
2001-05-17 16:51         ` Anders Peter Fugmann
2001-05-17 18:46 Khachaturov, Vassilii

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=200105152157.f4FLvAw9021664@webber.adilger.int \
    --to=adilger@turbolinux.com \
    --cc=afu@fugmann.dhs.org \
    --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®