]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kallsyms: fix /proc/kallmodsyms to not be misled by const variables
authorNick Alcock <nick.alcock@oracle.com>
Mon, 15 Jun 2015 16:47:42 +0000 (17:47 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:30:12 +0000 (15:30 +0100)
commit6e9d5be0c0c3e899c79623a91cfe422821a5c365
tree316f4a81422e1953dc85b306407657c2bc6da33a
parent59a263cce66d3210d21f5bea57d7f24f9913b63a
kallsyms: fix /proc/kallmodsyms to not be misled by const variables

The recent fix to bug 21172433 caused all symbols with the external DWARF
attribute which appear in only one built-in module to be considered part of that
module rather than part of the core kernel as far as /proc/kallmodsyms is
concerned.  Unfortunately, this is the wrong DWARF attribute to use: it
indicates that the content is visible outside this compilation unit, which
is of course true even of the definition of anything which *can* be
declared 'extern' (since it is, of course, not declared 'static').

The right attribute to use is the declaration attribute, which is unset only
for the definition -- the module containing the translation unit in which a
variable is defined is surely the module in which that variable resides.

Orabug: 21257163
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
scripts/kallsyms.c