Subject: Re: Compiler Symbols (Re: Compiling the kernel)
To: None <port-arm32@NetBSD.ORG>
From: Tony Houghton <tonyh@tcp.co.uk>
List: port-arm32
Date: 02/16/1998 02:21:52
In message <34E688C5.4CB8E61A@nc.com>
          paul <pwain@nc.com> wrote:

> Helpful Hint:
>
> However, when searching for which object files define or use a symbol 'nm'
> is a much better program. Say you were looking for the above function.
> running nm on an object file may yeild:
>
>        0x5a04    U    _assert_wait
>
> This would mean the function is used, but not defined. However:
>
>         0x5a04    T    _assert_wait
>
> would tell you that is where it is defined. So a useful 'c' script in your
> NetBSD kernel compile directory would be:
>
>     foreach f ( *.o )
>     echo ==$f==
>     nm $f | grep $1    # if you were typing this at a command like enter
> function name
>     end
>
> Using the above you could find out exactly where a function or variable is
> used quick than with find over a tree.

Could someone who has successfully compiled a kernel please try the
above. And if it doesn't show up a definition in the sys tree, could you
look for it in whatever libraries it links with (er, nm does work on
libraries doesn't it?).

-- 
  \_________________
                    \  http://homepages.tcp.co.uk/~tonyh/
   The Curling Pages \ The home of WinEd, Bombz and NewsFind for RISC OS