Any way to get number of symbols in GNU_HASH section ?

Ian Lance Taylor iant@google.com
Mon Dec 27 23:53:00 GMT 2010


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



More information about the Binutils mailing list