This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: Speedup dwfl_module_addrsym
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 31 Oct 2011 15:30:58 -0700
- Subject: Re: Speedup dwfl_module_addrsym
> I only wanted to expose the index where the globals started (if known)
> since that is all you need to use it together with dwfl_module_getsymtab
> and dwfl_module_getsym. The symbols don't actually have to come from an
> actual Elf_Scn, they could come from the dynamic symbol table via phdrs.
Ah, good point.
> I removed the public interface for now and just access the field directly
> in dwfl_module_addrsym. Any preference on a public interface?
I prefer to wait until there is a concrete prospective user.
> first_global does sound better. I changed it in the attached patch.
> OK, to commit this version for now, while we discuss whether or not
> and how the public interface should look?
Rather than the goto, move the matching loop into a nested function that
takes the loop bounds as arguments. Then just call that twice.
Thanks,
Roland