This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Indexed string tables?


Bernd Jendrissek <bernd.jendrissek@gmail.com> writes:

> I'm updating my support for 16-bit OMF objects, and noticed that
> bfd/hash.c has some sort of string table utilities, but they don't do
> what I need them to do.  OMF needs a strings table that is
> sequentially indexed, not hashed a la ELF.  I am not and was not aware
> of any such existing utilities, so I wrote a new file, calling it
> strtab.c (and a header).  It feels unclean to put such generic
> interfaces into i386omf.c, since there's nothing OMF-specific about
> such a table of strings.  Any objections to the name I chose?  The
> three functions comprising the interface are all prefixed with strtab_
> - same goes, comments?  I'm asking now because I hope to avoid having
> to rewrite history when I submit my OMF total-changes patch,
> preferring to preserve its history as much as is reasonable.

I would say that the string tables in bfd/hash.c are sequentially
indexed.  The hash table is there so that duplicate strings are only
entered once.  What do you want to do for duplicate strings?  Enter them
into the string table more than once?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]