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/section.c | |
parent | Move bfd_alloc, bfd_zalloc and bfd_release to libbfd.c (diff) | |
download | binutils-gdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.tar.gz binutils-gdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.tar.bz2 binutils-gdb-717d4bd6d199fcf834f741489aaf3bd800f9769f.zip |
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/section.c')
-rw-r--r-- | bfd/section.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/bfd/section.c b/bfd/section.c index 1e7e8ac7522..73770294e56 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -137,14 +137,27 @@ SUBSECTION /* DOCDD INODE -typedef asection, section prototypes, Section Output, Sections + typedef asection, section prototypes, Section Output, Sections SUBSECTION typedef asection Here is the section structure: -CODE_FRAGMENT +EXTERNAL +.{* Linenumber stuff. *} +.typedef struct lineno_cache_entry +.{ +. unsigned int line_number; {* Linenumber from start of function. *} +. union +. { +. struct bfd_symbol *sym; {* Function name. *} +. bfd_vma offset; {* Offset into section. *} +. } u; +.} +.alent; . + +CODE_FRAGMENT .typedef struct bfd_section .{ . {* The name of the section; the name isn't a copy, the pointer is @@ -493,7 +506,7 @@ CODE_FRAGMENT . . {* If the SEC_IN_MEMORY flag is set, this points to the actual . contents. *} -. unsigned char *contents; +. bfd_byte *contents; . . {* Attached line number information. *} . alent *lineno; @@ -549,6 +562,8 @@ CODE_FRAGMENT . .} asection; . + +EXTERNAL .static inline const char * .bfd_section_name (const asection *sec) .{ |