diff options
author | Alan Modra <amodra@gmail.com> | 2023-04-30 20:42:30 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-05-03 15:00:05 +0930 |
commit | 717d4bd6d199fcf834f741489aaf3bd800f9769f (patch) | |
tree | 41ecfc03c6cd82e376d3b8bfe328842af6a7a250 /bfd/archive.c | |
parent | a41bd1c837f9b71b44dbb71c2d47814326cfaa8d (diff) | |
download | gdb-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/archive.c')
-rw-r--r-- | bfd/archive.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bfd/archive.c b/bfd/archive.c index 01bfcfc..273a1b3 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -146,6 +146,37 @@ SUBSECTION extern int errno; #endif +/* +EXTERNAL +.{* A canonical archive symbol. *} +.{* This is a type pun with struct symdef/struct ranlib on purpose! *} +.typedef struct carsym +.{ +. const char *name; +. file_ptr file_offset; {* Look here to find the file. *} +.} +.carsym; +. +.{* A count of carsyms (canonical archive symbols). *} +. typedef unsigned long symindex; +.#define BFD_NO_MORE_SYMBOLS ((symindex) ~0) +. + +INTERNAL +.{* Used in generating armaps (archive tables of contents). *} +.struct orl {* Output ranlib. *} +.{ +. char **name; {* Symbol name. *} +. union +. { +. file_ptr pos; +. bfd *abfd; +. } u; {* bfd* or file position. *} +. int namidx; {* Index into string table. *} +.}; +. +*/ + /* We keep a cache of archive filepointers to archive elements to speed up searching the archive by filepos. We only add an entry to the cache when we actually read one. We also don't sort the cache; |