All of lore.kernel.org
 help / color / mirror / Atom feed
* Exporting symbols between modules
@ 2005-08-24  7:28 Sergio Paracuellos
  2005-08-24 14:59 ` simon guinot
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Paracuellos @ 2005-08-24  7:28 UTC (permalink / raw)
  To: linux-newbie

Hi all,

I'm new in this list and I have some problems exporting symbols in a
module to see them in other module.

In the module I want to export the symbol I do:

tList list;
EXPORT_SYMBOL(list);

I compile it and install without any problem.

And in the module I want to use them I declare list with "extern"
prototype:

extern tList list;

When I compile the module It says me that list is undefined, and I don't
know what I am doing wrong.

Does anybody know what is happening? 

Maybe a makefile example would be appreciated... 

Thanks in advance.

Regards,

	Sergio 

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

* Exporting symbols between modules
@ 2005-08-24  7:48 Sergio Paracuellos
  2005-08-24  8:19 ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Paracuellos @ 2005-08-24  7:48 UTC (permalink / raw)
  To: LINUX-KERNEL

Hi all,

I'm new in this list and I have some problems exporting symbols in a
module to see them in other module.

In the module I want to export the symbol I do:

tList list;
EXPORT_SYMBOL(list);

I compile it and install without any problem.

And in the module I want to use them I declare list with "extern"
prototype:

extern tList list;

When I compile the module It says me that list is undefined, and I don't
know what I am doing wrong.

Does anybody know what is happening? 

Maybe a makefile example would be appreciated... 

Thanks in advance.

Regards,

        Sergio 



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

* Re: Exporting symbols between modules
  2005-08-24  7:48 Exporting symbols between modules Sergio Paracuellos
@ 2005-08-24  8:19 ` Adrian Bunk
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2005-08-24  8:19 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: LINUX-KERNEL

On Wed, Aug 24, 2005 at 09:48:38AM +0200, Sergio Paracuellos wrote:

> Hi all,

Hi Sergio,

> I'm new in this list and I have some problems exporting symbols in a
> module to see them in other module.
> 
> In the module I want to export the symbol I do:
> 
> tList list;
> EXPORT_SYMBOL(list);
> 
> I compile it and install without any problem.
> 
> And in the module I want to use them I declare list with "extern"
> prototype:
> 
> extern tList list;
> 
> When I compile the module It says me that list is undefined, and I don't
> know what I am doing wrong.
> 
> Does anybody know what is happening? 
> 
> Maybe a makefile example would be appreciated... 
> 
> Thanks in advance.

1. the kernel-mentors list [1] is a better place for such questions
2. please post an URL to the full source of your driver, without it
   debugging your problem is not possible

> Regards,
> 
>         Sergio 

cu
Adrian

[1] http://selenic.com/mailman/listinfo/kernel-mentors

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: Exporting symbols between modules
  2005-08-24  7:28 Sergio Paracuellos
@ 2005-08-24 14:59 ` simon guinot
  2005-08-24 15:15   ` Sergio Paracuellos
  0 siblings, 1 reply; 5+ messages in thread
From: simon guinot @ 2005-08-24 14:59 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: linux-newbie

hello

On Wed, 24 Aug 2005 09:28:08 +0200
Sergio Paracuellos <sparacuellos@lock-linux.com> wrote:

> Hi all,
> 
> I'm new in this list and I have some problems exporting symbols in a
> module to see them in other module.
> 
> In the module I want to export the symbol I do:
> 
> tList list;
> EXPORT_SYMBOL(list);

ok... you've better to use the EXPORT_SYMBOL_NOVERS macro to export the symbol whiteout the versioning information...
don't forget to define EXPORT_SYMTAB before include module.h...
you can add a -DEXPORT_SYMTAB in your Makefile or a #define EXPORT_SYMTAB before 
#include <linux/module.h> in your source file...

> 
> I compile it and install without any problem.
> 
> And in the module I want to use them I declare list with "extern"
> prototype:
> 
> extern tList list;
> 
> When I compile the module It says me that list is undefined, and I don't
> know what I am doing wrong.

a compilation error or a loading error ?
are you sure to have well defined the type tList in your "client" module ?
may be a shareed header between your modules is missing :) 

regards

simon
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

* Re: Exporting symbols between modules
  2005-08-24 14:59 ` simon guinot
@ 2005-08-24 15:15   ` Sergio Paracuellos
  0 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2005-08-24 15:15 UTC (permalink / raw)
  To: simon guinot; +Cc: linux-newbie

El mié, 24-08-2005 a las 16:59 +0200, simon guinot escribió:
> hello
> 
> On Wed, 24 Aug 2005 09:28:08 +0200
> Sergio Paracuellos <sparacuellos@lock-linux.com> wrote:
> 
> > Hi all,
> > 
> > I'm new in this list and I have some problems exporting symbols in a
> > module to see them in other module.
> > 
> > In the module I want to export the symbol I do:
> > 
> > tList list;
> > EXPORT_SYMBOL(list);
> 
> ok... you've better to use the EXPORT_SYMBOL_NOVERS macro to export the symbol whiteout the versioning information...
> don't forget to define EXPORT_SYMTAB before include module.h...
> you can add a -DEXPORT_SYMTAB in your Makefile or a #define EXPORT_SYMTAB before 
> #include <linux/module.h> in your source file...

Thanks, I solve it because it was a Makefile problem.

I was trying to compile two modules with different Makefiles. When I do
only one Makefile with

obj-m += module1
obj-m += module2

the problem dissapears.

Thanks to all.

Regards,

	Sergio
> 
> > 
> > I compile it and install without any problem.
> > 
> > And in the module I want to use them I declare list with "extern"
> > prototype:
> > 
> > extern tList list;
> > 
> > When I compile the module It says me that list is undefined, and I don't
> > know what I am doing wrong.
> 
> a compilation error or a loading error ?
> are you sure to have well defined the type tList in your "client" module ?
> may be a shareed header between your modules is missing :) 
> 
> regards
> 
> simon
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

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

end of thread, other threads:[~2005-08-24 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24  7:48 Exporting symbols between modules Sergio Paracuellos
2005-08-24  8:19 ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2005-08-24  7:28 Sergio Paracuellos
2005-08-24 14:59 ` simon guinot
2005-08-24 15:15   ` Sergio Paracuellos

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.