diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-04-01 22:08:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-04-01 22:08:38 +0000 |
commit | 5c8444f8f80fee5a32dfecbc0e408640c57c6809 (patch) | |
tree | 6a44fabf7c642cf0c41fdeabe57063890231a015 /bfd/aout-target.h | |
parent | 9deaaaf1b35a54f776957492c4300ea993a3961c (diff) | |
download | gdb-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/aout-target.h')
-rw-r--r-- | bfd/aout-target.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bfd/aout-target.h b/bfd/aout-target.h index dc59e27..6c2ace9 100644 --- a/bfd/aout-target.h +++ b/bfd/aout-target.h @@ -316,9 +316,6 @@ MY_bfd_final_link (abfd, info) #ifndef MY_write_armap #define MY_write_armap NAME(aout,write_armap) #endif -#ifndef MY_close_and_cleanup -#define MY_close_and_cleanup NAME(aout,close_and_cleanup) -#endif #ifndef MY_set_section_contents #define MY_set_section_contents NAME(aout,set_section_contents) #endif @@ -401,7 +398,11 @@ MY_bfd_final_link (abfd, info) #endif #ifndef MY_bfd_free_cached_info -#define MY_bfd_free_cached_info bfd_true +#define MY_bfd_free_cached_info NAME(aout,bfd_free_cached_info) +#endif + +#ifndef MY_close_and_cleanup +#define MY_close_and_cleanup MY_bfd_free_cached_info #endif /* Aout symbols normally have leading underscores */ |