aboutsummaryrefslogtreecommitdiff
path: root/bfd/libaout.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-01 22:08:38 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-01 22:08:38 +0000
commit5c8444f8f80fee5a32dfecbc0e408640c57c6809 (patch)
tree6a44fabf7c642cf0c41fdeabe57063890231a015 /bfd/libaout.h
parent9deaaaf1b35a54f776957492c4300ea993a3961c (diff)
downloadgdb-5c8444f8f80fee5a32dfecbc0e408640c57c6809.zip
gdb-5c8444f8f80fee5a32dfecbc0e408640c57c6809.tar.gz
gdb-5c8444f8f80fee5a32dfecbc0e408640c57c6809.tar.bz2
Add bfd_free_cached_info support to a.out backends.
* aoutx.h (aout_get_external_symbols): Renamed from aout_link_get_symbols. Read strings even if symbols have been read. Store string size in obj_aout_string_size. (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to read the symbols. Allocate the cached symbols with malloc, not bfd_alloc. (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with malloc, not bfd_alloc. (NAME(aout,bfd_free_cached_info)): New function; free cached symbols and relocs. * libaout.h (struct aoutdata): Add external_string_size field. (obj_aout_external_string_size): New accessor macro. (NAME(aout,close_and_cleanup)): Don't declare. (NAME(aout,bfd_free_cached_info)): Declare. (aout_32_close_and_cleanup): Don't define. (aout_64_close_and_cleanup): Don't define. * aout-target.h (MY_bfd_free_cached_info): If not already defined, define as NAME(aout,free_cached_info). (MY_close_and_cleanup): If not already defined, define as MY_bfd_free_cached_info. * aout-adobe.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define. * bout.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define. * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true. (MY_close_and_cleanup): Don't define. * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached relocs with malloc, not bfd_alloc. * i386os9k.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define.
Diffstat (limited to 'bfd/libaout.h')
-rw-r--r--bfd/libaout.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/libaout.h b/bfd/libaout.h
index c9793f8..0b22dee 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -252,6 +252,7 @@ struct aoutdata {
struct external_nlist *external_syms;
bfd_size_type external_sym_count;
char *external_strings;
+ bfd_size_type external_string_size;
struct aout_link_hash_entry **sym_hashes;
/* A pointer for shared library information. */
@@ -277,6 +278,7 @@ struct aout_data_struct {
#define obj_aout_external_syms(bfd) (adata(bfd).external_syms)
#define obj_aout_external_sym_count(bfd) (adata(bfd).external_sym_count)
#define obj_aout_external_strings(bfd) (adata(bfd).external_strings)
+#define obj_aout_external_string_size(bfd) (adata(bfd).external_string_size)
#define obj_aout_sym_hashes(bfd) (adata(bfd).sym_hashes)
#define obj_aout_dynamic_info(bfd) (adata(bfd).dynamic_info)
@@ -356,9 +358,6 @@ NAME(aout,get_symbol_info) PARAMS ((bfd *ignore_abfd,
asymbol *symbol, symbol_info *ret));
boolean
-NAME(aout,close_and_cleanup) PARAMS ((bfd *abfd));
-
-boolean
NAME(aout,find_nearest_line) PARAMS ((bfd *abfd, asection *section,
asymbol **symbols, bfd_vma offset, CONST char **filename_ptr,
CONST char **functionname_ptr, unsigned int *line_ptr));
@@ -389,6 +388,9 @@ NAME(aout,final_link) PARAMS ((bfd *, struct bfd_link_info *,
void (*) (bfd *, file_ptr *, file_ptr *,
file_ptr *)));
+boolean
+NAME(aout,bfd_free_cached_info) PARAMS ((bfd *));
+
/* Prototypes for functions in stab-syms.c. */
CONST char *
@@ -397,10 +399,8 @@ aout_stab_name PARAMS ((int code));
/* A.out uses the generic versions of these routines... */
#define aout_32_get_section_contents bfd_generic_get_section_contents
-#define aout_32_close_and_cleanup bfd_generic_close_and_cleanup
#define aout_64_get_section_contents bfd_generic_get_section_contents
-#define aout_64_close_and_cleanup bfd_generic_close_and_cleanup
#ifndef NO_WRITE_HEADER_KLUDGE
#define NO_WRITE_HEADER_KLUDGE 0
#endif