aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1993-06-18 19:15:45 +0000
committerFred Fish <fnf@specifix.com>1993-06-18 19:15:45 +0000
commitcc4fb84844bdb1a0a1c4aa5a8fa770442b7477ce (patch)
tree9ba0e18f27bbb2ef047802e0300b6fdb91e699c8
parentfe560b9fdf9bdc7a1f887442b0fea24ab1a49290 (diff)
downloadgdb-cc4fb84844bdb1a0a1c4aa5a8fa770442b7477ce.zip
gdb-cc4fb84844bdb1a0a1c4aa5a8fa770442b7477ce.tar.gz
gdb-cc4fb84844bdb1a0a1c4aa5a8fa770442b7477ce.tar.bz2
* stabs.texinfo: Add some basic info about stabs-in-elf.
(this may require attention from a tex/texinfo wizard..)
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/stabs.texinfo44
2 files changed, 48 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 9494bed..2012e69 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jun 18 12:12:57 1993 Fred Fish (fnf@cygnus.com)
+
+ * stabs.texinfo: Add some basic info about stabs-in-elf.
+
Fri Jun 18 13:57:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabs.texinfo (Top): Minor cleanup.
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 46fc747..2995ac1 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -3855,5 +3855,49 @@ new type defined in the compilation. GNU C stabs use the type number
alone, with no source file number.
@end itemize
+@node stabs-in-elf
+@appendix Using stabs with the ELF object file format.
+
+The ELF object file format allows tools to create object files with custom
+sections containing any arbitrary data. To use stabs in ELF object files,
+the tools create two custom sections, a ".stab" section which contains
+an array of fixed length structures, one struct per stab, and a ".stabstr"
+section containing all the variable length strings that are referenced by
+stabs in the ".stab" section.
+
+The first stab in the ".stab" section for each object file is a "synthetic
+stab", generated entirely by the assembler, with no corresponding ".stab"
+directive as input to the assembler. This stab contains the following
+fields:
+
+@itemize @bullet
+@item
+Offset in the ".stabstr" section to the source filename.
+
+@item
+N_UNDF
+
+@item
+Unused field, always zero.
+
+@item
+Count of upcoming symbols. I.E. the number of remaining stabs for this
+object module.
+
+@item
+Size of the string table fragment associated with this object module, in
+bytes.
+
+@end itemize
+
+The ".stabstr" section always starts with a null byte (so that string
+offsets of zero reference a null string), followed by random length strings,
+each of which is null byte terminated.
+
+The ELF section header for the ".stab" section has it's sh_link member set
+to the section number of the ".stabstr" section, and the ".stabstr" section
+has it's ELF section header sh_type member set to SHT_STRTAB to mark it as
+a string table.
+
@contents
@bye