This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A gdb+bfd string pool?
On Fri, Oct 31, 2003 at 12:29:03PM -0500, Andrew Cagney wrote:
>
> >>The interface or the implementation? The bcache interface is focused
> >>and simple (something that can't be said for that hash table). The
> >>hashtab could certainly be used in the implementation (as elf-strtab did).
> >
> >
> >So does gdb/symtab.c.
> >
> >
> >>Anyway, back to the question. Does a [global] common pool make sense
> >>for BFD?
> >
> >
> >Oh, you meant an _instance_, not a data structure. Sorry.
>
> More specifically, a single instance. Instead of having something like
> a per-object file symbol bcache as was done with GDB, there would just
> be a single global bcache (and it would never shrink).
elf-strtab has a property which I'm not sure you really need in GDB,
as it slow things down. It attempts to do suffix merging, ie. if you have
p = "abcde" and q = "cde", r = "cde", s = "abcde" strings,
then p = "abcde", q = p + 2, r = q, s = p. Storing strings in a hashtable
is certainly cheaper for CPU time than this.
Jakub