]> git.hungrycats.org Git - linux/commit
[PATCH] show last kernel-image symbol in /proc/kallsyms
authorAndrew Morton <akpm@osdl.org>
Sat, 15 May 2004 03:19:11 +0000 (20:19 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 15 May 2004 03:19:11 +0000 (20:19 -0700)
commitbfb288f1177db455dca1387fd3b97e3b9b94b09c
treeeda4543ec55d7ab6742ae375c89457e3724bf8b9
parent017474ed123ac14187eef6a0d5b76becbce763e0
[PATCH] show last kernel-image symbol in /proc/kallsyms

From: Rusty Russell <rusty@rustcorp.com.au>

The current code doesn't show the last symbol (usually _einittext) in
/proc/kallsyms.  The reason for this is subtle: s_start() returns an empty
string for position 0 (ignored by s_show()), and s_next() returns the first
symbol for position 1.

What should happen is that update_iter() for position 0 should fill in the
first symbol.  Unfortunately, the get_ksymbol_core() fills in the symbol
information, *and* updates the iterator: we have to split these functions,
which we do by making it return the length of the name offset.

Then we can call get_ksymbol_core() without moving the iterator, meaning
that we can call it at position 0 (ie.  s_start()).
kernel/kallsyms.c