def get_number_of_symbols(self):
        """ Get the number of symbols in the hash table by finding the bucket
            with the highest symbol index and walking to the end of its chain.
        """
        # Element sizes in the hash table
        wordsize = self._elffile.structs.Elf_word('').sizeof()
        xwordsize = self._elffile.structs.Elf_xword('').sizeof()

        # Find highest index in buckets array
        max_idx = max(self.params['buckets'])
        if max_idx < self.params['symoffset']:
            return self.params['symoffset']

        # Position the stream at the start of the corresponding chain
        chain_pos = self._offset + 4 * wordsize + \
            self.params['bloom_size'] * xwordsize + \
            self.params['nbuckets'] * wordsize + \
            (max_idx - self.params['symoffset']) * wordsize

        # Walk the chain to its end (lowest bit is set)
        while True:
            cur_hash = struct_parse(self._elffile.structs.Elf_word('elem'),
                                    self._stream,
                                    chain_pos)
            if cur_hash & 1:
                return max_idx + 1

            max_idx += 1
            chain_pos += wordsize
 Get the number of symbols in the hash table by finding the bucket
            with the highest symbol index and walking to the end of its chain.
        
product/runtime/src/main/python/java/_vendor/elftools/elf/hash.py