Question about life-time of symbol name strings in BFD

Ian Lance Taylor iant@google.com
Tue Jul 24 19:54:00 GMT 2007


"Doug Kwan (關振德)" <dougkwan@google.com> writes:

>     :I am working on speeding up nm -l in the case a large binary. I
> added a bit of code that uses the BFD hash table in dwarf2.c. The
> speed comes with a price in terms of memory usage. However, I found
> that I can reduce the extra memory required significantly if I do not
> copy hash keys. My question is whether this is safe. Can I assume that
> symbol->name is a constant pointer?

Yes.

Ian



More information about the Binutils mailing list