mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
Add section caches to coff_data_type
* libcoff-in.h (struct coff_tdata): Add section_by_index and section_by_target_index hash tables. * libcoff.h: Regenerate. * coffcode.h (htab_hash_section_index): New function. (htab_eq_section_index): New function. (htab_hash_section_target_index): New function. (htab_eq_section_target_index): New function. (coff_mkobject_hool): Create the hash tables. * peicode.h: Add the same new functions. (pe_mkobject_hook): Create the hash tables. * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to speed up lookups. * coffgen.c (coff_section_from_bfd_index): Likewise. (_bfd_coff_close_and_cleanup): Delete the hash tables.
This commit is contained in:
committed by
Nick Clifton
parent
73eff1cbd3
commit
0e759f232b
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "bfdlink.h"
|
||||
#include "coff-bfd.h"
|
||||
#include "hashtab.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -129,6 +130,13 @@ typedef struct coff_tdata
|
||||
COFF object into memory. */
|
||||
char * stub;
|
||||
bfd_size_type stub_size;
|
||||
|
||||
/* Hash table containing sections by target index. */
|
||||
htab_t section_by_target_index;
|
||||
|
||||
/* Hash table containing sections by index. */
|
||||
htab_t section_by_index;
|
||||
|
||||
} coff_data_type;
|
||||
|
||||
/* Tdata for pe image files. */
|
||||
|
||||
Reference in New Issue
Block a user