RE: why a static function is in kernel symbol table

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

 



Thank you very much for replying.

I actually notice that there are many static functions in that file. However, some of them show up in symbol table, the rest do not. So  what you are saying is that there is no connection between being a static function and showing up in kernel symbol table. Then what causes the difference appearing in symbol table or not? In other word, if i add a new static function and like it in kallsyms, what should I do?

Thanks,
Ji

From: Valdis.Kletnieks@xxxxxx
Sent: ‎6/‎12/‎2014 8:47 PM
To: Ji Li
Cc: Kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: Re: why a static function is in kernel symbol table

On Thu, 12 Jun 2014 16:23:58 -0700, Ji Li said:

> I happened to find that a static function show up in kernel symbol table:

> Could anyone kindly cast some light?

Hint: 'static' prevents code in other compilation units (basically, other .c
files) from referencing it directly (though they can still access it via a
function pointer variable or other similar tricks).  That does *not* mean that
other code in the *same* compilation unit can't reference the static function
in a way that requires a symbol table entry...

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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