This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Speed up bfd_elf_match_symbols_in_sections
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 3 Feb 2007 07:08:47 +1030
- Subject: Re: [PATCH] Speed up bfd_elf_match_symbols_in_sections
- References: <20060829230012.GA19841@lucon.org> <20070119144609.GI3819@sunsite.mff.cuni.cz> <20070119150524.GJ3819@sunsite.mff.cuni.cz> <20070119152019.GK3819@sunsite.mff.cuni.cz> <20070119175824.GA27882@lucon.org> <20070201201217.GP3819@sunsite.mff.cuni.cz>
On Thu, Feb 01, 2007 at 09:12:17PM +0100, Jakub Jelinek wrote:
> * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
> * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
> (struct elf_symbol): Change first member into union.
> (elf_sort_elf_symbol): Compare pointers to internal syms rather than
> internal syms. Only compare st_shndx fields.
> (elf_create_symbuf): New function.
> (bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
> for bfds, use a binary search, otherwise don't qsort symbols
> unnecessarily only to select which symbols are for the particular
> shndx.
OK.
--
Alan Modra
IBM OzLabs - Linux Technology Centre