aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1991-12-01 00:39:12 +0000
committerSteve Chamberlain <sac@cygnus>1991-12-01 00:39:12 +0000
commit0cda46cff12b3ee596b1d1ac521a3014e92b5492 (patch)
treefee107a1424a5ffc7b6a17b5ba4ca91565fb8cad /bfd/libbfd.h
parent93351e91c53c3a4dcc69950f6542c2e7788d7851 (diff)
downloadgdb-0cda46cff12b3ee596b1d1ac521a3014e92b5492.zip
gdb-0cda46cff12b3ee596b1d1ac521a3014e92b5492.tar.gz
gdb-0cda46cff12b3ee596b1d1ac521a3014e92b5492.tar.bz2
New documentation style
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r--bfd/libbfd.h211
1 files changed, 24 insertions, 187 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 3c964ac..929b076 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -189,146 +189,32 @@ extern bfd *bfd_last_cache;
/* THE FOLLOWING IS EXTRACTED FROM THE SOURCE*/
/*:init.c*/
-/* bfd_check_init
-
-This routine is called before any other bfd function using initialized
-data is used to ensure that the structures have been initialized.
-Soon this function will go away, and the bfd library will assume that
-bfd_init has been called.
-*/
-
- void EXFUN(bfd_check_init,(void));
-
-/*
-*/
+void EXFUN(bfd_check_init, (void));
/*:libbfd.c*/
-/* bfd_xmalloc
-bfd_xmalloc -- Like malloc, but exit if no more memory.
-*/
- PROTO(PTR, bfd_xmalloc,( bfd_size_type size));
-
-/*
-
- bfd_write_bigendian_4byte_int
-*/
-
- PROTO(void, bfd_write_bigendian_4byte_int,( bfd *abfd, int i));
-
-/*
-
-*i bfd_log2
-Return the log base 2 of the value supplied, rounded up. eg an arg
-of 1025 would return 11.
-*/
- PROTO(bfd_vma, bfd_log2,(bfd_vma x));
-
-/*
-*/
+bfd_vma EXFUN(bfd_log2, (bfd_vma x));
/*:cache.c*/
-/* BFD_CACHE_MAX_OPEN
-The maxiumum number of files which the cache will keep open at one
-time.
-*/
#define BFD_CACHE_MAX_OPEN 10
-
-/*
-
- bfd_last_cache
-Zero, or a pointer to the topmost BFD on the chain. This is used by
-the @code{bfd_cache_lookup} macro in @file{libbfd.h} to determine when
-it can avoid a function call.
-*/
extern bfd *bfd_last_cache;
-
-/*
-
- bfd_cache_lookup
-Checks to see if the required BFD is the same as the last one looked
-up. If so then it can use the iostream in the BFD with impunity, since
-it can't have changed since the last lookup, otherwise it has to
-perform the complicated lookup function
-*/
#define bfd_cache_lookup(x) \
- ((x)==bfd_last_cache? \
- (FILE*)(bfd_last_cache->iostream): \
- bfd_cache_lookup_worker(x))
-
-/*
-
-*i bfd_cache_init
-Initialize a BFD by putting it on the cache LRU.
-*/
- PROTO(void, bfd_cache_init, (bfd *));
-
-/*
-
-*i bfd_cache_close
-Remove the BFD from the cache. If the attached file is open, then close it too.
-*/
- PROTO(void, bfd_cache_close, (bfd *));
-
-/*
-
-*i bfd_open_file
-Call the OS to open a file for this BFD. Returns the FILE *
-(possibly null) that results from this operation. Sets up the
-BFD so that future accesses know the file is open. If the FILE *
-returned is null, then there is won't have been put in the cache, so
-it won't have to be removed from it.
-*/
- PROTO(FILE *, bfd_open_file, (bfd *));
-
-/*
-
-*i bfd_cache_lookup_worker
-Called when the macro @code{bfd_cache_lookup} fails to find a quick
-answer. Finds a file descriptor for this BFD. If necessary, it open it.
-If there are already more than BFD_CACHE_MAX_OPEN files open, it trys to close
-one first, to avoid running out of file descriptors.
-*/
- PROTO(FILE *, bfd_cache_lookup_worker, (bfd *));
-
-/*
-*/
-
+ ((x)==bfd_last_cache? \
+ (FILE*)(bfd_last_cache->iostream): \
+ bfd_cache_lookup_worker(x))
+void EXFUN(bfd_cache_init , (bfd *));
+void EXFUN(bfd_cache_close , (bfd *));
+FILE* EXFUN(bfd_open_file, (bfd *));
+FILE *EXFUN(bfd_cache_lookup_worker, (bfd *));
/*:ctor.c*/
-/* bfd_constructor_entry
-
-This function is called with an a symbol describing the
-function to be called, an string which descibes the xtor type, eg
-something like "CTOR" or "DTOR" would be fine. And the bfd which owns
-the function.
-
-It's duty is to create a section called "CTOR" or "DTOR" or whatever
-if the bfd doesn't already have one, and grow a relocation table for
-the entry points as they accumulate.
-*/
-
- PROTO(void, bfd_constructor_entry,
- (bfd *abfd,
- asymbol **symbol_ptr_ptr,
- CONST char*type));
-
-/*
-*/
-
+void EXFUN(bfd_constructor_entry, (bfd *abfd,
+asymbol **symbol_ptr_ptr,
+CONST char*type));
/*:reloc.c*/
-/* bfd_default_reloc_type_lookup
-
-Provides a default relocation lookuperer for any architectue
-*/
-
- CONST struct reloc_howto_struct *EXFUN(bfd_default_reloc_type_lookup,
- (CONST struct bfd_arch_info *,
- bfd_reloc_code_type code));
-
-/*
-*/
-
+CONST struct reloc_howto_struct *EXFUN(bfd_default_reloc_type_lookup
+, (CONST struct bfd_arch_info *,
+bfd_reloc_code_type code));
/*:cpu-h8300.c*/
@@ -337,62 +223,13 @@ Provides a default relocation lookuperer for any architectue
/*:cpu-empty.c*/
/*:archures.c*/
-/* bfd_default_arch_struct
-
-What bfds are seeded with
-*/
-
-extern bfd_arch_info_type bfd_default_arch_struct;
-
-/*
- bfd_default_set_arch_mach
-
-Set the architecture and machine type in a bfd. This finds the correct
-pointer to structure and inserts it into the arch_info pointer.
-*/
-
- boolean EXFUN(bfd_default_set_arch_mach,(bfd *abfd,
- enum bfd_architecture arch,
- unsigned long mach));
-
-/*
-
-This routine initializes the architecture dispatch table by calling
-all installed architecture packages and getting them to poke around.
-*/
-
- PROTO(void, bfd_arch_init,(void));
-
-/*
-
- bfd_arch_linkin
-
-Link the provided arch info structure into the list
-*/
-
- void EXFUN(bfd_arch_linkin,(bfd_arch_info_type *));
-
-/*
-
- bfd_default_compatible
-
-The default function for testing for compatibility
-*/
-
- CONST bfd_arch_info_type *EXFUN(bfd_default_compatible,
- (CONST bfd_arch_info_type *a,
- CONST bfd_arch_info_type *b));
-
-/*
-
- bfd_default_scan
-The default function for working out whether this is an architecture
-hit and a machine hit
-*/
-
- boolean EXFUN(bfd_default_scan,(CONST struct bfd_arch_info *, CONST char *));
-
-/*
-*/
-
+boolean EXFUN(bfd_default_set_arch_mach, (bfd *abfd,
+enum bfd_architecture arch,
+unsigned long mach));
+void EXFUN(bfd_arch_init, (void));
+void EXFUN(bfd_arch_linkin, (bfd_arch_info_type *));
+CONST bfd_arch_info_type *EXFUN(bfd_default_compatible
+, (CONST bfd_arch_info_type *a,
+CONST bfd_arch_info_type *b));
+boolean EXFUN(bfd_default_scan, (CONST struct bfd_arch_info *, CONST char *));