aboutsummaryrefslogtreecommitdiff
path: root/bfd/libcoff.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-06-07 14:16:06 +0930
committerAlan Modra <amodra@gmail.com>2023-06-07 14:16:06 +0930
commitba75d1c55cb42114e3bb5c8abe37e5c2bd657a02 (patch)
tree7e5342433baeaf8305f7a9b08ab58cfc521b4dd4 /bfd/libcoff.h
parent0a22a8f27df7d092620dfa1f0135a2dd7b44528a (diff)
downloadgdb-ba75d1c55cb42114e3bb5c8abe37e5c2bd657a02.zip
gdb-ba75d1c55cb42114e3bb5c8abe37e5c2bd657a02.tar.gz
gdb-ba75d1c55cb42114e3bb5c8abe37e5c2bd657a02.tar.bz2
_bfd_free_cached_info
doc/bfdint.texi and comments in the aout and som code about this function are just wrong, and its name is not very apt. Better would be _bfd_mostly_destroy, and we certainly should not be saying anything about the possibility of later recreating anything lost by this function. What's more, if _bfd_free_cached_info is called when creating an archive map to reduce memory usage by throwing away symbols, the target _close_and_cleanup function won't have access to tdata or section bfd_user_data to tidy memory. This means most of the target _close_and_cleanup function won't do anything, and therefore sometimes will result in memory leaks. This patch fixes the documentation problems and moves most of the target _close_and_cleanup code to target _bfd_free_cached_info. Another notable change is that bfd_generic_bfd_free_cached_info is now defined as _bfd_free_cached_info rather than _bfd_bool_bfd_true, ie. the default now frees objalloc memory.
Diffstat (limited to 'bfd/libcoff.h')
-rw-r--r--bfd/libcoff.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 61561c5..b53c311 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -409,7 +409,7 @@ extern bfd_vma bfd_coff_reloc16_get_value
(arelent *, struct bfd_link_info *, asection *);
extern void bfd_perform_slip
(bfd *, unsigned int, asection *, bfd_vma);
-extern bool _bfd_coff_close_and_cleanup
+extern bool _bfd_coff_free_cached_info
(bfd *);
/* Functions and types in cofflink.c. */