* Using hash table
@ 2000-07-10 14:26 Bharadwaj Yadavalli
2000-07-10 19:32 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Bharadwaj Yadavalli @ 2000-07-10 14:26 UTC (permalink / raw)
To: binutils
The ELF spec. says the following regarding the contents of .hash
section:
A hashing function accepts a symbol name and returns a value that
may be used to compute a bucket index. Consequently, if the hashing
function returns the value x for some name, bucket[x%nbucket] gives
an index, y, into both the symbol table and the chain table. If the
symbol table entry is not the one desired, chain[y] gives the next
symbol table entry with the same hash value.
One can follow the chain links until either the selected symbol
table entry holds the desired name or the chain entry contains the
value STN_UNDEF.
What does "following the chain links" mean? Assume that the symbol at
index y does not match the name desired. The above says that I should
look up for the symbol whose index is the content of chain[y]. Assume
that even this does not match. Which is the next index I need to look
for the symbol being looked up? chain[y+1]? But that doesn't seem
correct either - given that chain table parallels (dynamic) symbol
table. So how does "follow the chain links"?
Thanks for your help in advance. My apologies if I am unable to see
the obvious.
Bharadwaj
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-10 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-10 14:26 Using hash table Bharadwaj Yadavalli
2000-07-10 19:32 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).