public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Question about life-time of symbol name strings in BFD
@ 2007-07-17 13:11 Doug Kwan (關振德)
  2007-07-24 19:54 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Kwan (關振德) @ 2007-07-17 13:11 UTC (permalink / raw)
  To: binutils

Hi,

    :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?

Thanks

-Doug

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about life-time of symbol name strings in BFD
  2007-07-17 13:11 Question about life-time of symbol name strings in BFD Doug Kwan (關振德)
@ 2007-07-24 19:54 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-07-24 19:54 UTC (permalink / raw)
  To: Doug Kwan (關振德); +Cc: binutils

"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-24 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-17 13:11 Question about life-time of symbol name strings in BFD Doug Kwan (關振德)
2007-07-24 19:54 ` Ian Lance Taylor

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).