aboutsummaryrefslogtreecommitdiff
path: root/bfd/targets.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-04-30 20:42:30 +0930
committerAlan Modra <amodra@gmail.com>2023-05-03 15:00:05 +0930
commit717d4bd6d199fcf834f741489aaf3bd800f9769f (patch)
tree41ecfc03c6cd82e376d3b8bfe328842af6a7a250 /bfd/targets.c
parenta41bd1c837f9b71b44dbb71c2d47814326cfaa8d (diff)
downloadgdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.zip
gdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.tar.gz
gdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.tar.bz2
Generated docs and include files
bfd/doc/chew.c extracts documentation from source code comments annotated with keywords, and generates much of bfd.h and libbfd.h from those same comments. The docs have suffered from people (me too) adding things like CODE_FRAGMENT to the source to put code into bfd.h without realising that CODE_FRAGMENT also puts @example around said code into the docs. So we have random senseless things in the docs. This patch fixes that problem (well, the senseless things from CODE_FRAGMENT), moves most of the code out of bfd-in.h, and improves a few chew.c features. libbfd.h now automatically gets ATTRIBUTE_HIDDEN prototypes, and indentation in bfd.h and libbfd.h is better.
Diffstat (limited to 'bfd/targets.c')
-rw-r--r--bfd/targets.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/targets.c b/bfd/targets.c
index 44fb5a3..021c808 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -148,6 +148,7 @@ DESCRIPTION
the entry points which call them. Too bad we can't have one
macro to define them both!
+EXTERNAL
.enum bfd_flavour
.{
. {* N.B. Update bfd_flavour_name if you change this. *}
@@ -173,14 +174,12 @@ DESCRIPTION
.
.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
.
-.{* Forward declaration. *}
-.typedef struct bfd_link_info _bfd_link_info;
-.
-.{* Forward declaration. *}
-.typedef struct flag_info flag_info;
-.
+.{* Forward declarations. *}
+.struct flag_info;
.typedef void (*bfd_cleanup) (bfd *);
.
+
+CODE_FRAGMENT
.typedef struct bfd_target
.{
. {* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. *}
@@ -258,9 +257,10 @@ DESCRIPTION
. {* Write cached information into a file being written, at <<bfd_close>>. *}
. bool (*_bfd_write_contents[bfd_type_end]) (bfd *);
.
+
The general target vector. These vectors are initialized using the
BFD_JUMP_TABLE macros.
-.
+
. {* Generic entry points. *}
.#define BFD_JUMP_TABLE_GENERIC(NAME) \
. NAME##_close_and_cleanup, \
@@ -1471,7 +1471,7 @@ static const struct targmatch bfd_target_match[] = {
};
/*
-CODE_FRAGMENT
+INTERNAL
.{* Cached _bfd_check_format messages are put in this. *}
.struct per_xvec_message
.{