From: lijimlee@gmail.com (Ji)
To: kernelnewbies@lists.kernelnewbies.org
Subject: why a static function is in kernel symbol table
Date: Fri, 13 Jun 2014 00:10:14 -0700 [thread overview]
Message-ID: <539aa3d0.e9ed440a.5efe.5865@mx.google.com> (raw)
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
-----Original Message-----
From: "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu>
Sent: ?6/?12/?2014 8:47 PM
To: "Ji Li" <lijimlee@gmail.com>
Cc: "Kernelnewbies at kernelnewbies.org" <Kernelnewbies@kernelnewbies.org>
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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140613/9732cc25/attachment.html
next reply other threads:[~2014-06-13 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 7:10 Ji [this message]
2014-06-14 2:54 ` why a static function is in kernel symbol table Ji Li
-- strict thread matches above, loose matches on Subject: below --
2014-06-12 23:23 Ji Li
2014-06-13 3:47 ` Valdis.Kletnieks at vt.edu
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=539aa3d0.e9ed440a.5efe.5865@mx.google.com \
--to=lijimlee@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).