Add a cache of the text section.

2006-10-08  Soren Sandmann  <sandmann@redhat.com>

	* elfparser.c (struct ElfParser): Add a cache of the text section.

	* binparser.c (struct BinParser): Add a cache of a bin record to
	get rid of malloc()/free() overhead.

	* elfparser.c (struct ElfSym): Cache the size of the symbol
This commit is contained in:
Soren Sandmann
2006-10-08 20:14:25 +00:00
committed by Søren Sandmann Pedersen
parent 86810e63a5
commit 0cf636d8fe
4 changed files with 60 additions and 38 deletions

View File

@ -191,9 +191,12 @@ bin_file_new (const char *filename)
* (potential) debug binary
*/
if (bf->elf)
{
bf->text_offset = elf_parser_get_text_offset (bf->elf);
bf->elf = find_separate_debug_file (bf->elf, filename); /* find_separate_debug_file (bf->elf, filename); */
bf->elf = find_separate_debug_file (bf->elf, filename);
}
bf->inode = read_inode (filename);
bf->filename = g_strdup (filename);
bf->undefined_name = g_strdup_printf ("In file %s", filename);