From dff55db0d28380140e3702f6495498507b2ce0d7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 15 Dec 2011 11:01:14 +0000 Subject: 2011-12-15 Shinichiro Hamaji * mach-o.c (bfd_mach_o_canonicalize_reloc): Update relocation table only when there isn't the cahce. (bfd_mach_o_get_dynamic_reloc_upper_bound): Need one more space for a pointer for the watchdog. (bfd_mach_o_canonicalize_dynamic_reloc): Utilize cache like bfd_mach_o_canonicalize_reloc. (bfd_mach_o_close_and_cleanup): Call bfd_mach_o_free_cached_info. (bfd_mach_o_free_cached_info): Free up cache data. * mach-o.h (reloc_cache): A place to store cache of dynamic relocs. (bfd_mach_o_free_cached_info): Add declaration. --- bfd/mach-o.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bfd/mach-o.h') diff --git a/bfd/mach-o.h b/bfd/mach-o.h index e22b41a..23c3e1c 100644 --- a/bfd/mach-o.h +++ b/bfd/mach-o.h @@ -519,6 +519,9 @@ typedef struct mach_o_data_struct /* A place to stash dwarf2 info for this bfd. */ void *dwarf2_find_line_info; + + /* Cache of dynamic relocs. */ + arelent *dyn_reloc_cache; } bfd_mach_o_data_struct; @@ -590,6 +593,7 @@ bfd_boolean bfd_mach_o_find_nearest_line (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, unsigned int *); bfd_boolean bfd_mach_o_close_and_cleanup (bfd *); +bfd_boolean bfd_mach_o_free_cached_info (bfd *); unsigned int bfd_mach_o_section_get_nbr_indirect (bfd *, bfd_mach_o_section *); unsigned int bfd_mach_o_section_get_entry_size (bfd *, bfd_mach_o_section *); -- cgit v1.1