Re: EXPORT_SYMBOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jul 19, 2007 at 12:05:43AM -0700, kanishk rastogi wrote:

Please use proper quoting so it becomes clear who said what.
Get Outlook-QuoteFix to fix the quoting:

  http://home.in.tum.de/~jain/software/outlook-quotefix/

> From: Andi <a.platschek@xxxxxxxxxx>
>> kanishk rastogi schrieb:
>> > hi all,
>> > When we export a symbol using EXPORT_SYMBOL, We can use it to be called
>> > by other modules when we insert this module .......
>> > I wanted to know when does this symbol gets added to the kernel symbol
>> > table ...
>> 
>> It's added when the module is loaded with insmod and removed when the
>> module is removed.
>> But you don't have to use EXPORT_SYMBOL. if you don't care about it,
>> every symbol, that is not static will be exportet.

That's no longer true, you explicitly need to use EXPORT_SYMBOL to
export a symbol. IIRC this was done to avoid namespace polution and to
force people to think about what symbols to export (i.e.: think about
the exported interface).

> Does this means EXPORT_SYMBOL()  and declaring a function as
> non-static is same ....

No, see above.

>> > Or what happens when we insert the module so that this symbol is
>> > accessible ....
>> 
>> If you want to check which symbols of your module are exported, check
>> /proc/kallsyms.
> 
> But i wanted to see what special treament does these symbols get once
> we have "EXPORT_SYMBOL()ed " them
> Vs.... 
> ones which are not exported and non static ..... 

The ones not having an EXPORT_SYMBOL() are not exported, don't show up
in /proc/kallsyms, and can't be used by other modules.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGnxnM/PlVHJtIto0RAqh6AJ9akitCt5/Q6Jh1mKuJj3jT+bM4aACfRNy8
dpj5CkMBV7p8+ErU9GXfa2I=
=Qd8T
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux