This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Any way to get number of symbols in GNU_HASH section ?
- From: Ian Lance Taylor <iant at google dot com>
- To: kernel error <k3rn3l dot 3rr0r at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 27 Dec 2010 15:34:23 -0800
- Subject: Re: Any way to get number of symbols in GNU_HASH section ?
- References: <AANLkTikDDaUW4eUmOdhS7Lf0SByakAjEAex9p9sibe2d@mail.gmail.com>
kernel error <k3rn3l.3rr0r@gmail.com> writes:
> I'm currently trying to get the address of a symbol on a dynamic
> library mapped in memory (by means of link_map structure).
> I wondered if there is any easy way to get number of symbols in a
> GNU_HASH section, like old HASH section ?
Not as far as I know. Because the symbols are in order, you can it by
walking the chain of the last bucket. You know that the last symbol in
the chain will be the last symbol overall, and you can calculate its
offset from the start of the symbols.
Ian