-/* Prototype declarations for functions defined in aoutx.h */
-
-PROTO (boolean, NAME(aout,squirt_out_relocs),(bfd *abfd, asection *section));
-
-PROTO (bfd_target *, NAME(aout,some_aout_object_p), (bfd *abfd,
- struct internal_exec *execp,
- bfd_target *(*callback)()));
-PROTO (boolean, NAME(aout,mkobject), (bfd *abfd));
-PROTO (enum machine_type, NAME(aout,machine_type), (enum bfd_architecture arch,
- unsigned long machine));
-PROTO (boolean, NAME(aout,set_arch_mach), (bfd *abfd, enum bfd_architecture arch,
- unsigned long machine));
-
-PROTO (boolean, NAME(aout,new_section_hook), (bfd *abfd, asection *newsect));
-PROTO (boolean, NAME(aout,set_section_contents), (bfd *abfd, sec_ptr section,
- PTR location, file_ptr offset, bfd_size_type count));
-
-PROTO (asymbol *,NAME(aout,make_empty_symbol), (bfd *abfd));
-PROTO (boolean, NAME(aout,slurp_symbol_table), (bfd *abfd));
-PROTO (void, NAME(aout,write_syms), (bfd *abfd));
-PROTO (void, NAME(aout,reclaim_symbol_table), (bfd *abfd));
-PROTO (unsigned int, NAME(aout,get_symtab_upper_bound), (bfd *abfd));
-PROTO (unsigned int, NAME(aout,get_symtab), (bfd *abfd, asymbol **location));
-PROTO (boolean, NAME(aout,slurp_reloc_table), (bfd *abfd, sec_ptr asect,
- asymbol **symbols));
-PROTO (unsigned int, NAME(aout,canonicalize_reloc), (bfd *abfd, sec_ptr section,
- arelent **relptr, asymbol **symbols));
-PROTO (unsigned int, NAME(aout,get_reloc_upper_bound), (bfd *abfd, sec_ptr asect));
-PROTO (void, NAME(aout,reclaim_reloc), (bfd *ignore_abfd, sec_ptr ignore));
-PROTO (alent *, NAME(aout,get_lineno), (bfd *ignore_abfd, asymbol *ignore_symbol));
-PROTO (void, NAME(aout,print_symbol), (bfd *ignore_abfd, PTR file,
- asymbol *symbol, bfd_print_symbol_type how));
-PROTO (boolean, NAME(aout,close_and_cleanup), (bfd *abfd));
-PROTO (boolean, NAME(aout,find_nearest_line), (bfd *abfd, asection *section,
- asymbol **symbols, bfd_vma offset, CONST char **filename_ptr,
- CONST char **functionname_ptr, unsigned int *line_ptr));
-PROTO (int, NAME(aout,sizeof_headers), (bfd *abfd, boolean exec));
-
-PROTO (void, NAME(aout,swap_exec_header_in), (bfd *abfd,
- struct external_exec *raw_bytes, struct internal_exec *execp));
-
-PROTO (void, NAME(aout,swap_exec_header_out),(bfd *abfd, struct internal_exec *execp,
- struct external_exec *raw_bytes));
-
-/* Prototypes for functions in stab-syms.c. */
-
-PROTO(char *, aout_stab_name, (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
+/* Information we keep for each a.out section. This is currently only
+ used by the a.out backend linker. */
+
+struct aout_section_data_struct
+{
+ /* The unswapped relocation entries for this section. */
+ void * relocs;
+};
+
+#define aout_section_data(s) \
+ ((struct aout_section_data_struct *) (s)->used_by_bfd)
+
+#define set_aout_section_data(s,v) \
+ ((s)->used_by_bfd = (void *)&(v)->relocs)
+
+/* Prototype declarations for functions defined in aoutx.h. */
+
+extern bfd_boolean NAME (aout, squirt_out_relocs)
+ (bfd *, asection *);
+
+extern bfd_boolean NAME (aout, make_sections)
+ (bfd *);
+
+extern bfd_cleanup NAME (aout, some_aout_object_p)
+ (bfd *, struct internal_exec *, bfd_cleanup (*) (bfd *));
+
+extern bfd_boolean NAME (aout, mkobject)
+ (bfd *);
+
+extern enum machine_type NAME (aout, machine_type)
+ (enum bfd_architecture, unsigned long, bfd_boolean *);
+
+extern bfd_boolean NAME (aout, set_arch_mach)
+ (bfd *, enum bfd_architecture, unsigned long);
+
+extern bfd_boolean NAME (aout, new_section_hook)
+ (bfd *, asection *);
+
+extern bfd_boolean NAME (aout, set_section_contents)
+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
+
+extern asymbol * NAME (aout, make_empty_symbol)
+ (bfd *);
+
+extern bfd_boolean NAME (aout, translate_symbol_table)
+ (bfd *, aout_symbol_type *, struct external_nlist *, bfd_size_type,
+ char *, bfd_size_type, bfd_boolean);
+
+extern bfd_boolean NAME (aout, slurp_symbol_table)
+ (bfd *);
+
+extern bfd_boolean NAME (aout, write_syms)
+ (bfd *);
+
+extern void NAME (aout, reclaim_symbol_table)
+ (bfd *);
+
+extern long NAME (aout, get_symtab_upper_bound)
+ (bfd *);
+
+extern long NAME (aout, canonicalize_symtab)
+ (bfd *, asymbol **);
+
+extern void NAME (aout, swap_ext_reloc_in)
+ (bfd *, struct reloc_ext_external *, arelent *, asymbol **,
+ bfd_size_type);
+
+extern void NAME (aout, swap_std_reloc_in)
+ (bfd *, struct reloc_std_external *, arelent *, asymbol **,
+ bfd_size_type);
+
+extern reloc_howto_type * NAME (aout, reloc_type_lookup)
+ (bfd *, bfd_reloc_code_real_type);
+
+extern reloc_howto_type * NAME (aout, reloc_name_lookup)
+ (bfd *, const char *);
+
+extern bfd_boolean NAME (aout, slurp_reloc_table)
+ (bfd *, sec_ptr, asymbol **);
+
+extern long NAME (aout, canonicalize_reloc)
+ (bfd *, sec_ptr, arelent **, asymbol **);
+
+extern long NAME (aout, get_reloc_upper_bound)
+ (bfd *, sec_ptr);
+
+extern void NAME (aout, reclaim_reloc)
+ (bfd *, sec_ptr);
+
+extern alent * NAME (aout, get_lineno)
+ (bfd *, asymbol *);
+
+extern void NAME (aout, print_symbol)
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
+
+extern void NAME (aout, get_symbol_info)
+ (bfd *, asymbol *, symbol_info *);
+
+extern bfd_boolean NAME (aout, find_nearest_line)
+ (bfd *, asymbol **, asection *, bfd_vma,
+ const char **, const char **, unsigned int *, unsigned int *);
+
+extern long NAME (aout, read_minisymbols)
+ (bfd *, bfd_boolean, void * *, unsigned int *);
+
+extern asymbol * NAME (aout, minisymbol_to_symbol)
+ (bfd *, bfd_boolean, const void *, asymbol *);
+
+extern int NAME (aout, sizeof_headers)
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
+ (bfd *);
+
+extern void NAME (aout, swap_exec_header_in)
+ (bfd *, struct external_exec *, struct internal_exec *);
+
+extern void NAME (aout, swap_exec_header_out)
+ (bfd *, struct internal_exec *, struct external_exec *);
+
+extern struct bfd_hash_entry * NAME (aout, link_hash_newfunc)
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
+
+extern bfd_boolean NAME (aout, link_hash_table_init)
+ (struct aout_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *),
+ unsigned int);
+
+extern struct bfd_link_hash_table * NAME (aout, link_hash_table_create)
+ (bfd *);
+
+extern bfd_boolean NAME (aout, link_add_symbols)
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean NAME (aout, final_link)
+ (bfd *, struct bfd_link_info *,
+ void (*) (bfd *, file_ptr *, file_ptr *, file_ptr *));
+
+extern bfd_boolean NAME (aout, bfd_free_cached_info)
+ (bfd *);
+
+#define aout_32_find_inliner_info _bfd_nosymbols_find_inliner_info
+#if 0 /* Are these needed? */
+#define aout_16_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define aout_64_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
+
+/* A.out uses the generic versions of these routines... */
+
+#define aout_16_get_section_contents _bfd_generic_get_section_contents
+
+#define aout_32_get_section_contents _bfd_generic_get_section_contents
+
+#define aout_64_get_section_contents _bfd_generic_get_section_contents
+
+#ifndef aout_32_bfd_is_local_label_name
+#define aout_32_bfd_is_local_label_name bfd_generic_is_local_label_name
+#endif
+
+#ifndef aout_32_bfd_is_target_special_symbol
+#define aout_32_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false