public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* EXPORT_NO_SYMBOLS vs. (null) ?
@ 2000-11-18  5:15 Jeff Garzik
  2000-11-18  7:40 ` Keith Owens
  2000-11-18 17:12 ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Jeff Garzik @ 2000-11-18  5:15 UTC (permalink / raw)
  To: Linux Kernel Mailing List

What is the difference between a module that exports no symbols and
includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
EXPORT_NO_SYMBOLS?

Alan once upbraided me for assuming they were the same :)

-- 
Jeff Garzik             |
Building 1024           | The chief enemy of creativity is "good" sense
MandrakeSoft            |          -- Picasso
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18  5:15 EXPORT_NO_SYMBOLS vs. (null) ? Jeff Garzik
@ 2000-11-18  7:40 ` Keith Owens
  2000-11-18 17:12 ` Alan Cox
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Owens @ 2000-11-18  7:40 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel Mailing List

On Sat, 18 Nov 2000 00:15:35 -0500, 
Jeff Garzik <jgarzik@mandrakesoft.com> wrote:
>What is the difference between a module that exports no symbols and
>includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
>EXPORT_NO_SYMBOLS?

When modules were first introduced, all symbols were automatically
exported.  For kernel 2.0 compatibility, a module without
EXPORT_NO_SYMBOLS actually exports everything.  There are flags on
insmod to override this default.  modutils 2.5 will remove this
backwards compatibility, no module will export symbols unless they are
explicitly exported.  If you are feeling brave, add
  insmod_opt=-x
to your modules.conf and see what breaks in 2.4.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18  5:15 EXPORT_NO_SYMBOLS vs. (null) ? Jeff Garzik
  2000-11-18  7:40 ` Keith Owens
@ 2000-11-18 17:12 ` Alan Cox
  2000-11-18 17:40   ` Rogier Wolff
  1 sibling, 1 reply; 8+ messages in thread
From: Alan Cox @ 2000-11-18 17:12 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Kernel Mailing List

> What is the difference between a module that exports no symbols and
> includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
> EXPORT_NO_SYMBOLS?
> 
> Alan once upbraided me for assuming they were the same :)

EXPORT_NO_SYMBOLS		-	nothing exported
MODULE_foo			-	export specific symbol

none of the above, export all globals but without modvers

The behaviour may have changed with newer modutils, its originally there for
compatibility in the earlier days of the module stuff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18 17:12 ` Alan Cox
@ 2000-11-18 17:40   ` Rogier Wolff
  2000-11-18 17:45     ` Jeff Garzik
  0 siblings, 1 reply; 8+ messages in thread
From: Rogier Wolff @ 2000-11-18 17:40 UTC (permalink / raw)
  To: Alan Cox; +Cc: Jeff Garzik, Linux Kernel Mailing List

Alan Cox wrote:
> > What is the difference between a module that exports no symbols and
> > includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
> > EXPORT_NO_SYMBOLS?
> > 
> > Alan once upbraided me for assuming they were the same :)
> 
> EXPORT_NO_SYMBOLS		-	nothing exported
> MODULE_foo			-	export specific symbol
> 
> none of the above, export all globals but without modvers
                                ^^^^^^^ and statics!!!!

I consider that a bug, but... 

				Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18 17:40   ` Rogier Wolff
@ 2000-11-18 17:45     ` Jeff Garzik
  2000-11-18 17:50       ` Rogier Wolff
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2000-11-18 17:45 UTC (permalink / raw)
  To: Rogier Wolff; +Cc: Alan Cox, Linux Kernel Mailing List

Rogier Wolff wrote:
> 
> Alan Cox wrote:
> > > What is the difference between a module that exports no symbols and
> > > includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
> > > EXPORT_NO_SYMBOLS?
> > >
> > > Alan once upbraided me for assuming they were the same :)
> >
> > EXPORT_NO_SYMBOLS             -       nothing exported
> > MODULE_foo                    -       export specific symbol
> >
> > none of the above, export all globals but without modvers
>                                 ^^^^^^^ and statics!!!!
> 
> I consider that a bug, but...

eh?  Can you give an example of this?  This should definitely -not- be
the case.

	Jeff


-- 
Jeff Garzik             |
Building 1024           | The chief enemy of creativity is "good" sense
MandrakeSoft            |          -- Picasso
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18 17:45     ` Jeff Garzik
@ 2000-11-18 17:50       ` Rogier Wolff
  2000-11-18 18:44         ` Jeff Garzik
  2000-11-19  8:12         ` Keith Owens
  0 siblings, 2 replies; 8+ messages in thread
From: Rogier Wolff @ 2000-11-18 17:50 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Rogier Wolff, Alan Cox, Linux Kernel Mailing List

Jeff Garzik wrote:
> Rogier Wolff wrote:
> > 
> > Alan Cox wrote:
> > > > What is the difference between a module that exports no symbols and
> > > > includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
> > > > EXPORT_NO_SYMBOLS?
> > > >
> > > > Alan once upbraided me for assuming they were the same :)
> > >
> > > EXPORT_NO_SYMBOLS             -       nothing exported
> > > MODULE_foo                    -       export specific symbol
> > >
> > > none of the above, export all globals but without modvers
> >                                 ^^^^^^^ and statics!!!!
> > 
> > I consider that a bug, but...
> 
> eh?  Can you give an example of this?  This should definitely -not- be
> the case.

Compile a kernel, marking "sx" and "riscom8" as modules. 

Install, modprobe sx, and voila, you'll pull in the riscom because
its "block_til_ready" static was found to satisfy the block_til_ready
from generic_serial. 

We're working on renaming the one in generic_serial to
"gs_block_til_ready", but haven't checked yet if the patch got
applied. So you may have to use a "month-old" kernel for this test.

				Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18 17:50       ` Rogier Wolff
@ 2000-11-18 18:44         ` Jeff Garzik
  2000-11-19  8:12         ` Keith Owens
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff Garzik @ 2000-11-18 18:44 UTC (permalink / raw)
  To: Rogier Wolff; +Cc: Alan Cox, Linux Kernel Mailing List

Rogier Wolff wrote:
> 
> Jeff Garzik wrote:
> > Rogier Wolff wrote:
> > >
> > > Alan Cox wrote:
> > > > > What is the difference between a module that exports no symbols and
> > > > > includes EXPORT_NO_SYMBOLS reference, and such a module that lacks
> > > > > EXPORT_NO_SYMBOLS?
> > > > >
> > > > > Alan once upbraided me for assuming they were the same :)
> > > >
> > > > EXPORT_NO_SYMBOLS             -       nothing exported
> > > > MODULE_foo                    -       export specific symbol
> > > >
> > > > none of the above, export all globals but without modvers
> > >                                 ^^^^^^^ and statics!!!!
> > >
> > > I consider that a bug, but...
> >
> > eh?  Can you give an example of this?  This should definitely -not- be
> > the case.
> 
> Compile a kernel, marking "sx" and "riscom8" as modules.
> 
> Install, modprobe sx, and voila, you'll pull in the riscom because
> its "block_til_ready" static was found to satisfy the block_til_ready
> from generic_serial.

That doesn't imply that statics are being exported as symbols. 
generic_serial had no EXPORT_xxx markers, and block_til_ready was
public, so it was expected behavior for g_s to export b_t_r as a symbol.

It is strange that a static which exists in riscom8 causes another
module which exports the same symbol to be pulled in.

> We're working on renaming the one in generic_serial to
> "gs_block_til_ready", but haven't checked yet if the patch got
> applied. So you may have to use a "month-old" kernel for this test.

Can this function be made static?  It looks like many drivers define it
themselves..

In any case, you have a patch coming to you [offline] cleaning up the sx
and riscom8 namespaces...

	Jeff


-- 
Jeff Garzik             |
Building 1024           | The chief enemy of creativity is "good" sense
MandrakeSoft            |          -- Picasso
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: EXPORT_NO_SYMBOLS vs. (null) ?
  2000-11-18 17:50       ` Rogier Wolff
  2000-11-18 18:44         ` Jeff Garzik
@ 2000-11-19  8:12         ` Keith Owens
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Owens @ 2000-11-19  8:12 UTC (permalink / raw)
  To: Rogier Wolff; +Cc: Linux Kernel Mailing List

On Sat, 18 Nov 2000 18:50:00 +0100 (MET), 
R.E.Wolff@BitWizard.nl (Rogier Wolff) wrote:
>Compile a kernel, marking "sx" and "riscom8" as modules. 
>
>Install, modprobe sx, and voila, you'll pull in the riscom because
>its "block_til_ready" static was found to satisfy the block_til_ready
>from generic_serial. 

If that is true then it is a bug in either depmod or modprobe.  However
I cannot reproduce it using kernel 2.4.0-test11-pre7 and modutils
2.3.20.  In particular depmod correctly recognises that sx depends on
block_til_ready in generic_serial, not in riscom.  Which kernel, which
modutils, which .config?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-11-19  8:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-18  5:15 EXPORT_NO_SYMBOLS vs. (null) ? Jeff Garzik
2000-11-18  7:40 ` Keith Owens
2000-11-18 17:12 ` Alan Cox
2000-11-18 17:40   ` Rogier Wolff
2000-11-18 17:45     ` Jeff Garzik
2000-11-18 17:50       ` Rogier Wolff
2000-11-18 18:44         ` Jeff Garzik
2000-11-19  8:12         ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox