aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/stabs.texinfo
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-05-06 03:31:15 +0000
committerStan Shebs <shebs@codesourcery.com>1994-05-06 03:31:15 +0000
commit87d62f677bedf2533fd67c7062a855765d19e46c (patch)
treef4455ab8f7edba2c83e5917717c3bca8e325cf4c /gdb/doc/stabs.texinfo
parentdb4a85f981a98894dc8c5e92daf633d61fa117ef (diff)
downloadgdb-87d62f677bedf2533fd67c7062a855765d19e46c.zip
gdb-87d62f677bedf2533fd67c7062a855765d19e46c.tar.gz
gdb-87d62f677bedf2533fd67c7062a855765d19e46c.tar.bz2
Thu May 5 20:23:36 1994 Stan Shebs (shebs@andros.cygnus.com)
* stabs.texinfo (Stab Section Basics): Add comment about alignment of stabs-in-coff sections.
Diffstat (limited to 'gdb/doc/stabs.texinfo')
-rw-r--r--gdb/doc/stabs.texinfo14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 3d68856..8a8baf3 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -3936,6 +3936,8 @@ Offset in the @code{.stabstr} section to the source filename.
@item n_other
Unused field, always zero.
+This may eventually be used to hold overflows from the count in
+the @code{n_desc} field.
@item n_desc
Count of upcoming symbols, i.e., the number of remaining stabs for this
@@ -3957,6 +3959,18 @@ header @code{sh_type} member set to @code{SHT_STRTAB} to mark it as a
string table. SOM and COFF have no way of linking the sections together
or marking them as string tables.
+For COFF, the @code{.stab} and @code{.stabstr} sections are simply
+concatenated by the linker. GDB then uses the @code{n_desc} fields to
+figure out the extent of the original sections. Similarly, the
+@code{n_value} fields of the header symbols are added together in order
+to get the actual position of the strings in a desired @code{.stabstr}
+section. Although this design obviates any need for the linker to relocate
+or otherwise manipulate @code{.stab} and @code{.stabstr} sections, it also
+requires some care to ensure that the offsets are calculated correctly.
+For instance, if the linker were to pad in between the @code{.stabstr}
+sections before concatenating, then the offsets to strings in the middle
+of the executable's @code{.stabstr} section would be wrong.
+
@node ELF Linker Relocation
@appendixsec Having the Linker Relocate Stabs in ELF