diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-12-15 14:04:51 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-12-15 14:04:51 +0000 |
commit | 978f6c787795629df2b5847a792484e096e8e20d (patch) | |
tree | 66a42199a8de7e2456ffcc85d1cb8034b8891ffc /bfd/mach-o.c | |
parent | 2092ddde01b99f81139e6648896bce4623184e14 (diff) | |
download | binutils-redhat-978f6c787795629df2b5847a792484e096e8e20d.tar.gz |
2011-12-15 Iain Sandoe <iains@gcc.gnu.org>
* mach-o.c (bfd_mach_o_mkobject_init): Initialize dyn_reloc_cache.
(bfd_mach_o_close_and_cleanup): Only cleanup Mach-O private data
for object files.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r-- | bfd/mach-o.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 182f0efc2d..325cf61329 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -3202,6 +3202,7 @@ bfd_mach_o_mkobject_init (bfd *abfd) mdata->commands = NULL; mdata->nsects = 0; mdata->sections = NULL; + mdata->dyn_reloc_cache = NULL; return TRUE; } @@ -3765,9 +3766,10 @@ bfd_mach_o_close_and_cleanup (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); if (bfd_get_format (abfd) == bfd_object && mdata != NULL) - _bfd_dwarf2_cleanup_debug_info (abfd, &mdata->dwarf2_find_line_info); - - bfd_mach_o_free_cached_info (abfd); + { + _bfd_dwarf2_cleanup_debug_info (abfd, &mdata->dwarf2_find_line_info); + bfd_mach_o_free_cached_info (abfd); + } return _bfd_generic_close_and_cleanup (abfd); } |