• Andrew Morton's avatar
    [PATCH] show last kernel-image symbol in /proc/kallsyms · bfb288f1
    Andrew Morton authored
    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()).
    bfb288f1
kallsyms.c 7.5 KB