compression.tex
[dwarf-doc.git] / dwarf5 / latexdoc / compression.tex
index 0459138..d6e7c33 100644 (file)
@@ -5,7 +5,11 @@
 % captioning as DWARF4 here with figures as they moved (floated)
 % making it hard to follow.  Hence this uses fewer figures.
 
-DWARF can use a lot of disk space.
+DWARF 
+\addtoindexx{DWARF compression}
+can 
+\addtoindexx{DWARF duplicate elimination}
+use a lot of disk space.
 
 This is especially true for C++, where the depth and complexity
 of headers can mean that many, many (possibly thousands of)
@@ -48,40 +52,41 @@ to suggest traditional contents as a way of explaining the
 approach, not to be limiting.}
 
 A traditional relocatable object output 
-from a single compilation might contain sections named:
+from a single compilation might contain sections 
+named:
 \begin{alltt}
-    .data
-    .text
-    .debug\_info
-    .debug\_abbrev
-    .debug\_line
-    .debug\_aranges
+    \addtoindex{.data}
+    \addtoindex{.text}
+    \addtoindex{.debug\_info}
+    \addtoindex{.debug\_abbrev}
+    \addtoindex{.debug\_line}
+    \addtoindex{.debug\_aranges}
 \end{alltt}
 A relocatable object from a compilation system 
 attempting duplicate DWARF elimination might
 contain sections as in:
 
 \begin{alltt}
-    .data
-    .text
-    .debug\_info
-    .debug\_abbrev
-    .debug\_line
-    .debug\_aranges
+    \addtoindex{.data}
+    \addtoindex{.text}
+    \addtoindex{.debug\_info}
+    \addtoindex{.debug\_abbrev}
+    \addtoindex{.debug\_line}
+    \addtoindex{.debug\_aranges}
 \end{alltt}
 
 followed (or preceded, the order is not significant) 
 by a series of section groups:
 \begin{alltt}
 ==== Section group 1
-    .debug\_info
-    .debug\_abbrev
-    .debug\_line
+    \addtoindex{.debug\_info}
+    \addtoindex{.debug\_abbrev}
+    \addtoindex{.debug\_line}
 ==== ...
 ==== Section group N
-    .debug\_info
-    .debug\_abbrev
-    .debug\_line
+    \addtoindex{.debug\_info}
+    \addtoindex{.debug\_abbrev}
+    \addtoindex{.debug\_line}
 \end{alltt}
 
 where each section group might or might not contain executable
@@ -128,12 +133,13 @@ facilities such as simple relocations) are:
 
 \begin{enumerate}[1.]
 
-\item A means of referencing from inside one .debug\_info
-compilation unit to another .debug\_info compilation unit
-(DW\-\_FORM\-\_ref\-\_addr provides this).
+\item A means of referencing from inside one \addtoindex{.debug\_info}
+compilation unit to another 
+\addtoindex{.debug\_info} compilation unit
+(\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} provides this).
 
 \item A means of having multiple contributions to specific sections
-(for example, .debug\_info, and so on) in a single object file.
+(for example, \addtoindex{.debug\_info}, and so on) in a single object file.
 
 \item  A means of identifying a section group (giving it a name).
 
@@ -154,7 +160,9 @@ widely known as ``COMDATs'' or ``COMDAT sections''. (Other
 object file representations provide COMDAT\dash style mechanisms as
 well.) There are several variations in the COMDAT schemes in
 common use, any of which should be sufficient for the purposes
-of the DWARF duplicate elimination techniques described here.}
+of the 
+\addtoindexx{duplication elimination|see{DWARF duplicate elimination}}
+DWARF duplicate elimination techniques described here.}
 
 \subsection{Naming and Usage Considerations}
 \label{app:namingandusageconsiderations}
@@ -177,7 +185,8 @@ Section \refersec{app:examples}.
 
 \textbf{Section Group Names}
 
-Section groups must have a section group name. For the subsequent C++ example, a name like
+Section groups must have a section group name. For the subsequent 
+\addtoindex{C++} example, a name like
 
 <producer-prefix>.<file-designator>.<gid-number>
 
@@ -229,7 +238,9 @@ above is given the name \textit{my.compiler.company.cpp.wa.h.123456}.
 
 \textbf{Debugging Information Entry Names}
 
-Global labels for debugging information entries (need explained
+Global labels for 
+\addtoindexx{debugging information entry!ownership relation}
+debugging information entries (need explained
 below) within a section group can be given names of the form
 
 \begin{alltt}
@@ -259,7 +270,8 @@ during compilation.
 
 \end{itemize}
 
-In general, every point in the section group .debug\_info that
+In general, every point in the section group 
+\addtoindex{.debug\_info} that
 could be referenced from outside by any compilation unit must
 normally have an external name generated for it in the linker
 symbol table, whether the current compilation references all
@@ -289,16 +301,16 @@ relocations).
 (This is a consequence of separate compilation, not a rule
 imposed by this document.)
 
-\textit{Local labels use references with form DW\-\_FORM\-\_ref4
+\textit{Local labels use references with form \livelink{chap:DWFORMref4}{DW\-\_FORM\-\_ref4}
 or 
-DW\-\_FORM\-\_ref8
+\livelink{chap:DWFORMref8}{DW\-\_FORM\-\_ref8}
 (These are affected by relocations
 so 
-DW\-\_FORM\-\_ref\-\_udata
-DW\-\_FORM\-\_ref1 and 
-DW\-\_FORM\-\_ref2 are
+\livelink{chap:DWFORMrefudata}{DW\-\_FORM\-\_ref\-\_udata}
+\livelink{chap:DWFORMref1}{DW\-\_FORM\-\_ref1} and 
+\livelink{chap:DWFORMref2}{DW\-\_FORM\-\_ref2} are
 normally not usable and 
-DW\-\_FORM\-\_ref\-\_addr is not necessary
+\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} is not necessary
 for a local label.)}
 
 \textbf{Use of \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit} versus 
@@ -314,7 +326,7 @@ An \#include directive appearing outside any other
 declarations is a good candidate to be represented using
 \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}. 
 However, an \#include appearing inside
-a C++ namespace declaration or a function, for example, is
+a \addtoindex{C++} namespace declaration or a function, for example, is
 not a good candidate because the entities included are not
 necessarily file level entities.
 
@@ -339,7 +351,7 @@ the attributes assigned to a \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compi
 \textbf{Use of \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit}}
 
 A \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit} debugging information entry has an
-DW\-\_AT\-\_import attribute referencing a \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit} or
+\livelink{chap:DWATimport}{DW\-\_AT\-\_import} attribute referencing a \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit} or
 \livelink{chap:DWTAGpartialunit}{DW\-\_TAG\-\_partial\-\_unit} debugging information entry.
 
 A \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit} debugging information entry refers
@@ -353,24 +365,26 @@ of the
 \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit} entry.
 
 
-\textbf{Use of DW\-\_FORM\-\_ref\-\_addr}
+\textbf{Use of \livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr}}
 
 Use 
-DW\-\_FORM\-\_ref\-\_addr to reference from one compilation
+\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} to reference from one compilation
 unit's debugging information entries to those of another
 compilation unit.
 
-When referencing into a removable section group .debug\_info
-from another .debug\_info (from anywhere), the
+When referencing into a removable section group 
+\addtoindex{.debug\_info}
+from another \addtoindex{.debug\_info} (from anywhere), the
 \begin{alltt}
 <prefix>.<file-designator>.<gid-number>.<die-number>
 \end{alltt}
 name should be used for an external symbol and a relocation
 generated based on that name.
 
-When referencing into a non-section group .debug\_info,
-from another .debug\_info (from anywhere) 
-DW\-\_FORM\-\_ref\-\_addr is
+When referencing into a non-section group 
+\addtoindex{.debug\_info},
+from another \addtoindex{.debug\_info} (from anywhere) 
+\livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} is
 still the form to be used, but a section\dash relative relocation
 generated by use of a non-exported name (often called an
 ``internal name'') may be used for references within the
@@ -379,16 +393,22 @@ same object file.
 \subsection{Examples}
 \label{app:examples}
 
-This section provides several examples in order to have a
+This section provides several 
+\addtoindexx{DWARF duplicate elimination!examples}
+examples in order to have a
 concrete basis for discussion.
 
 In these examples, the focus is on the arrangement of DWARF
-information into sections (specifically the .debug\_info
+information into sections (specifically the 
+\addtoindex{.debug\_info}
 section) and the naming conventions used to achieve references
 into section groups. In practice, all of the examples that
-follow involve DWARF sections other than just .debug\_info
-(for example, .debug\_line, .debug\_aranges, or others);
-however, only the .debug\_info section is shown to keep the
+follow involve DWARF sections other than just 
+\addtoindex{.debug\_info}
+(for example, \addtoindex{.debug\_line}, 
+\addtoindex{.debug\_aranges}, or others);
+however, only the \addtoindex{.debug\_info}
+section is shown to keep the
 examples compact and easier to read.
 
 The grouping of sections into a named set is shown, but the means for achieving this in terms of
@@ -396,7 +416,9 @@ the underlying object language is not (and varies from system to system).
 
 \subsubsection{C++ Example}
 
-The C++ source in 
+The addtoindex{C++} source 
+\addtoindexx{DWARF duplicate elimination!C++ example}
+in 
 Section \refersec{app:duplicateeliminationexample1csource}
 is used to illustrate the DWARF
 representation intended to allow duplicate elimination.
@@ -432,27 +454,28 @@ wa.h.
 \paragraph{Duplicate elimination example 1: DWARF section group} 
 
 \label{app:duplicateeliminationexample1dwarfsectiongroup}
-
+% FIXME: the DWFORMrefn could use rethinking
 \begin{alltt}
 ==== Section group name:
     my.compiler.company.cpp.wa.h.123456
-== section .debug\_info
+== section \addtoindex{.debug\_info}
 DW.cpp.wa.h.123456.1: ! linker global symbol
     \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
-        DW\-\_AT\-\_language(DW\-\_LANG\-\_C\-\_plus\-\_plus)
+        \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language}(\livelink{chap:DWLANGCplusplus}{DW\-\_LANG\-\_C\-\_plus\-\_plus})
         ...  ! other unit attributes
 DW.cpp.wa.h.123456.2: ! linker global symbol
     \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-        DW\-\_AT\-\_name("int")
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}("int")
 DW.cpp.wa.h.123456.3: ! linker global symbol
     \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
-        DW\-\_AT\-\_NAME("A")
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}("A")
 DW.cpp.wa.h.123456.4: ! linker global symbol
         \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-        DW\-\_AT\-\_name("i")
-        DW\-\_AT\-\_type(DW\-\_FORM\-\_refn to DW.cpp.wa.h.123456.2)
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}("i")
+        \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(\livelink{chap:DWFORMrefn}{DW\-\_FORM\-\_refn} to DW.cpp.wa.h.123456.2)
             ! (This is a local reference, so the more
-            ! compact form DW\-\_FORM\-\_refn can be used)
+            ! compact form \livetarg{chap:DWFORMrefn}{DW\-\_FORM\-\_refn} 
+            ! for n 1,2,4, or 8 can be used)
 \end{alltt}
 
 
@@ -466,29 +489,32 @@ in the section group shown above.
 \begin{alltt}
 == section .text
     [generated code for function f]
-== section .debug\_info
+== section \addtoindex{.debug\_info}
     \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
 .L1:                   ! local (non-linker) symbol
         \livelink{chap:DWTAGreferencetype}{DW\-\_TAG\-\_reference\-\_type}
-            DW\-\_AT\-\_type(reference to DW.cpp.wa.h.123456.3)
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.cpp.wa.h.123456.3)
         \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-            DW\-\_AT\-\_name("f")
-            DW\-\_AT\-\_type(reference to DW.cpp.wa.h.123456.2)
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name}("f")
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.cpp.wa.h.123456.2)
             \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}
-                DW\-\_AT\-\_name("a")
-                DW\-\_AT\-\_type(reference to .L1)
+                \livelink{chap:DWATname}{DW\-\_AT\-\_name}("a")
+                \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to .L1)
         ...
 \end{alltt}
 
 This example uses \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit} for the section group,
 implying that the contents of the compilation unit are
-globally visible (in accordance with C++ language rules).
+globally visible (in accordance with 
+\addtoindex{C++} language rules).
 \livelink{chap:DWTAGpartialunit}{DW\-\_TAG\-\_partial\-\_unit} is not needed for the same reason.
 
 \subsubsection{Fortran Example}
 
 
-For a Fortran example, consider 
+For a Fortran 
+\addtoindexx{DWARF duplicate elimination!Fortran example}
+example, consider 
 Figure \refersec{app:duplicateeliminationexample2fortransource}.
 
 
@@ -526,40 +552,40 @@ corresponding to the included file CommonStuff.fh.
 
     my.f90.company.f90.CommonStuff.fh.654321
 
-== section .debug\_info
+== section \addtoindex{.debug\_info}
 
 DW.myf90.CommonStuff.fh.654321.1:    ! linker global symbol
     \livelink{chap:DWTAGpartialunit}{DW\-\_TAG\-\_partial\-\_unit}
         ! ...compilation unit attributes, including...
-        DW\-\_AT\-\_language(DW\-\_LANG\-\_Fortran90)
-        DW\-\_AT\-\_identifier\-\_case(DW\-\_ID\-\_case\-\_insensitive)
+        \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language}(\livelink{chap:DWLANGFortran90}{DW\-\_LANG\-\_Fortran90})
+        \livelink{chap:DWATidentifiercase}{DW\-\_AT\-\_identifier\-\_case}(\livelink{chap:DWIDcaseinsensitive}{DW\-\_ID\-\_case\-\_insensitive})
 
 DW.myf90.CommonStuff.fh.654321.2: ! linker global symbol
 3\$: \livelink{chap:DWTAGarraytype}{DW\-\_TAG\-\_array\-\_type}
         ! unnamed
-        DW\-\_AT\-\_type(reference to DW.f90.F90\$main.f.2)
+        \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.f90.F90\$main.f.2)
             ! base type INTEGER
         \livelink{chap:DWTAGsubrangetype}{DW\-\_TAG\-\_subrange\-\_type}
-            DW\-\_AT\-\_type(reference to DW.f90.F90\$main.f.2)
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.f90.F90\$main.f.2)
                 ! base type INTEGER)
-            DW\-\_AT\-\_lower\-\_bound(constant 1)
-            DW\-\_AT\-\_upper\-\_bound(constant 100)
+            \livelink{chap:DWATlowerbound}{DW\-\_AT\-\_lower\-\_bound}(constant 1)
+            \livelink{chap:DWATupperbound}{DW\-\_AT\-\_upper\-\_bound}(constant 100)
 
 DW.myf90.CommonStuff.fh.654321.3: ! linker global symbol
     \livelink{chap:DWTAGcommonblock}{DW\-\_TAG\-\_common\-\_block}
-        DW\-\_AT\-\_name("Common1")
-        DW\-\_AT\-\_location(Address of common block Common1)
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}("Common1")
+        \livelink{chap:DWATlocation}{DW\-\_AT\-\_location}(Address of common \nolink{block} Common1)
         \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}
-            DW\-\_AT\-\_name("C")
-            DW\-\_AT\-\_type(reference to 3\$)
-            DW\-\_AT\-\_location(address of C)
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name}("C")
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to 3\$)
+            \livelink{chap:DWATlocation}{DW\-\_AT\-\_location}(address of C)
 
 DW.myf90.CommonStuff.fh.654321.4: ! linker global symbol
     \livelink{chap:DWTAGconstant}{DW\-\_TAG\-\_constant}
-        DW\-\_AT\-\_name("SEVEN")
-        DW\-\_AT\-\_type(reference to DW.f90.F90\$main.f.2)
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}("SEVEN")
+        \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.f90.F90\$main.f.2)
             ! base type INTEGER
-        DW\-\_AT\-\_const\-\_value(constant 7)
+        \livelink{chap:DWATconstvalue}{DW\-\_AT\-\_const\-\_value}(constant 7)
 \end{alltt}
 
 Section \refersec{app:duplicateeliminationexample2primaryunit}
@@ -573,21 +599,21 @@ shows the sections for the primary compilation unit.
 == section .text
     [code for function Foo]
 
-== section .debug\_info
+== section \addtoindex{.debug\_info}
     \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
         \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-            DW\-\_AT\-\_name("Foo")
-            DW\-\_AT\-\_type(reference to DW.f90.F90\$main.f.2)
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name}("Foo")
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.f90.F90\$main.f.2)
                 ! base type INTEGER
             \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit}
-                DW\-\_AT\-\_import(reference to
+                \livelink{chap:DWATimport}{DW\-\_AT\-\_import}(reference to
                     DW.myf90.CommonStuff.fh.654321.1)
             \livelink{chap:DWTAGcommoninclusion}{DW\-\_TAG\-\_common\-\_inclusion} ! For Common1
-                DW\-\_AT\-\_common\-\_reference(reference to
+                \livelink{chap:DWATcommonreference}{DW\-\_AT\-\_common\-\_reference}(reference to
                     DW.myf90.CommonStuff.fh.654321.3)
             \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable} ! For function result
-                DW\-\_AT\-\_name("Foo")
-                    DW\-\_AT\-\_type(reference to DW.f90.F90\$main.f.2)
+                \livelink{chap:DWATname}{DW\-\_AT\-\_name}("Foo")
+                    \livelink{chap:DWATtype}{DW\-\_AT\-\_type}(reference to DW.f90.F90\$main.f.2)
                         ! base type INTEGER
 \end{alltt}
 
@@ -618,24 +644,24 @@ Section \refersec{app:duplicateeliminationexample2companiondwarf}.
 \label{app:duplicateeliminationexample2companiondwarf}
 
 \begin{alltt}
-== section .debug\_info
+== section \addtoindex{.debug\_info}
     \livelink{chap:DWTAGcompileunit}{DW\-\_TAG\-\_compile\-\_unit}
-        DW\-\_AT\-\_name(F90\$main)
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name}(F90\$main)
         \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-            DW\-\_AT\-\_name("INTEGER")
-            DW\-\_AT\-\_encoding(DW\-\_ATE\-\_signed)
-            DW\-\_AT\-\_byte\-\_size(...)
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name}("INTEGER")
+            \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding}(\livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed})
+            \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size}(...)
 
         \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
             ...
         ...  ! other base types
         \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-            DW\-\_AT\-\_name("F90\$main")
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name}("F90\$main")
             \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit}
-                DW\-\_AT\-\_import(reference to
+                \livelink{chap:DWATimport}{DW\-\_AT\-\_import}(reference to
                     DW.myf90.CommonStuff.fh.654321.1)
             \livelink{chap:DWTAGcommoninclusion}{DW\-\_TAG\-\_common\-\_inclusion} ! for Common1
-                DW\-\_AT\-\_common\-\_reference(reference to
+                \livelink{chap:DWATcommonreference}{DW\-\_AT\-\_common\-\_reference}(reference to
                     DW.myf90.CommonStuff.fh.654321.3)
             ...
 \end{alltt}
@@ -648,13 +674,17 @@ visible as global entities.
 
 \subsubsection{C Example}
 
-The C++ example in this Section might appear to be equally
-valid as a C example. However, it is prudent to include
-a \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit} in the primary unit (see Figure 84)
-with an DW\-\_AT\-\_import attribute that refers to the proper unit
+The \addtoindex{C} example 
+\addtoindexx{DWARF duplicate elimination!C example}
+in this Section might appear to be equally
+valid as a \addtoindex{C} example. However, it is prudent to include
+a \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit}
+in the primary unit 
+(see Figure \refersec{app:duplicateeliminationexample1primarycompilationunit})
+with an \livelink{chap:DWATimport}{DW\-\_AT\-\_import} attribute that refers to the proper unit
 in the section group.
 
-\textit{The C rules for consistency of global (file scope) symbols
+\textit{The \addtoindex{C} rules for consistency of global (file scope) symbols
 across compilations are less strict than for C++; inclusion
 of the import unit attribute assures that the declarations of
 the proper section group are considered before declarations
@@ -667,7 +697,8 @@ from other compilations.}
 A large portion of debug information is type information, and
 in a typical compilation environment, many types are duplicated
 many times. One method of controlling the amount of duplication
-is separating each type into a separate .debug\_types section
+is separating each type into a separate 
+addtoindex{.debug\_types} section
 and arranging for the linker to recognize and eliminate
 duplicates at the individual type level.
 
@@ -680,15 +711,15 @@ implementation, the relocatable object file may contain one
 of each of these debug sections:
 
 \begin{alltt}
-.debug\_abbrev
-.debug\_info
-.debug\_line
+\addtoindex{.debug\_abbrev}
+\addtoindex{.debug\_info}
+\addtoindex{.debug\_line}
 \end{alltt}
 
 and any number of these additional sections:
 
 \begin{alltt}
-.debug\_types
+\addtoindex{.debug\_types}
 \end{alltt}
 
 As discussed in the previous section 
@@ -698,14 +729,15 @@ linkers today support the concept of a COMDAT group or
 linkonce section. The general idea is that a ``key'' can be
 attached to a section or a group of sections, and the linker
 will include only one copy of a section group (or individual
-section) for any given key. For .debug\_types sections, the
+section) for any given key. For 
+\addtoindex{.debug\_types} sections, the
 key is the type signature formed from the algorithm given in
 Section \refersec{datarep:typesignaturecomputation}.
 
 \subsection{Signature Computation Example}
 \label{app:signaturecomputationexample}
 
-As an example, consider a C++ header file 
+As an example, consider a \addtoindex{C++} header file 
 containing the type definitions shown
 in Section \refersec{app:typesignatureexamplescsource}.
 
@@ -746,32 +778,32 @@ in
 % does not result in adding : into the attribute name.
 \begin{alltt}
   \livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
-      DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
+      \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language} : \livelink{chap:DWLANGCplusplus}{DW\-\_LANG\-\_C\-\_plus\-\_plus} (4)
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-        DW\-\_AT\-\_name : "N"
+        \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "N"
 L1:
       \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
-          DW\-\_AT\-\_name : "C"
-          DW\-\_AT\-\_byte\-\_size : 8
-          DW\-\_AT\-\_decl\-\_file : 1
-          DW\-\_AT\-\_decl\-\_line : 5
+          \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "C"
+          \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} : 8
+          \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+          \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 5
         \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-            DW\-\_AT\-\_name : "x"
-            DW\-\_AT\-\_decl\-\_file : 1
-            DW\-\_AT\-\_decl\-\_line : 6
-            DW\-\_AT\-\_type : reference to L2
-            DW\-\_AT\-\_data\-\_member\-\_location : 0
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "x"
+            \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+            \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 6
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L2
+            \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 0
         \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-            DW\-\_AT\-\_name : "y"
-            DW\-\_AT\-\_decl\-\_file : 1
-            DW\-\_AT\-\_decl\-\_line : 7
-            DW\-\_AT\-\_type : reference to L2
-            DW\-\_AT\-\_data\-\_member\-\_location : 4
+            \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "y"
+            \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+            \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 7
+            \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L2
+            \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 4
 L2:
      \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-         DW\-\_AT\-\_byte\-\_size : 4
-         DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
-         DW\-\_AT\-\_name : "int"
+         \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} : 4
+         \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} : \livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed}
+         \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "int"
 \end{alltt}
 
 In computing a signature for the type N::C, flatten the type
@@ -789,26 +821,26 @@ Section \refersec{app:typesignaturecomputation1flattenedbytestream}.
 0x43 0x39 0x4e 0x00
 // Step 3: 'D' \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
 0x44 0x13
-// Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "C"
+// Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "C"
 0x41 0x03 0x08 0x43 0x00
-// Step 4: 'A' DW\-\_AT\-\_byte\-\_size DW\-\_FORM\-\_sdata 8
+// Step 4: 'A' \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 8
 0x41 0x0b 0x0d 0x08
 // Step 7: First child ("x")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "x"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "x"
     0x41 0x03 0x08 0x78 0x00
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 0
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 0
     0x41 0x38 0x0d 0x00
-    // Step 6: 'T' DW\-\_AT\-\_type (type \#2)
+    // Step 6: 'T' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#2)
     0x54 0x49
         // Step 3: 'D' \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
         0x44 0x24
-        // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "int"
+        // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "int"
         0x41 0x03 0x08 0x69 0x6e 0x74 0x00
-        // Step 4: 'A' DW\-\_AT\-\_byte\-\_size DW\-\_FORM\-\_sdata 4
+        // Step 4: 'A' \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 4
         0x41 0x0b 0x0d 0x04
-        // Step 4: 'A' DW\-\_AT\-\_encoding DW\-\_FORM\-\_sdata DW\-\_ATE\-\_signed
+        // Step 4: 'A' \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed}
         0x41 0x3e 0x0d 0x05
         // Step 7: End of \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type} "int"
         0x00
@@ -817,11 +849,11 @@ Section \refersec{app:typesignaturecomputation1flattenedbytestream}.
 // Step 7: Second child ("y")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "y"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "y"
     0x41 0x03 0x08 0x78 0x00
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 4
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 4
     0x41 0x38 0x0d 0x04
-    // Step 6: 'R' DW\-\_AT\-\_type (type \#2)
+    // Step 6: 'R' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#2)
     0x52 0x49 0x02
     // Step 7: End of \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} "y"
     0x00
@@ -843,81 +875,81 @@ Section \refersec{app:typesignaturecomputation2dwarfrepresentation}.
 
 \begin{alltt}
   \livelink{chap:DWTAGtypeunit}{DW\-\_TAG\-\_type\-\_unit}
-      DW\-\_AT\-\_language: DW\-\_LANG\-\_C\-\_plus\-\_plus (4)
+      \livelink{chap:DWATlanguage}{DW\-\_AT\-\_language} : \livelink{chap:DWLANGCplusplus}{DW\-\_LANG\-\_C\-\_plus\-\_plus} (4)
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-          DW\-\_AT\-\_name : "N"
+          \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "N"
 L1:
         \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type}
-             DW\-\_AT\-\_name : "A"
-             DW\-\_AT\-\_byte\-\_size : 20
-             DW\-\_AT\-\_decl\-\_file : 1
-             DW\-\_AT\-\_decl\-\_line : 10
+             \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "A"
+             \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} : 20
+             \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+             \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 10
            \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-                DW\-\_AT\-\_name : "v\_"
-                DW\-\_AT\-\_decl\-\_file : 1
-                DW\-\_AT\-\_decl\-\_line : 15
-                DW\-\_AT\-\_type : reference to L2
-                DW\-\_AT\-\_data\-\_member\-\_location : 0
-                DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
+                \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "v\_"
+                \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+                \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 15
+                \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L2
+                \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 0
+                \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} : \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name : "next"
-               DW\-\_AT\-\_decl\-\_file : 1
-               DW\-\_AT\-\_decl\-\_line : 16
-               DW\-\_AT\-\_type : reference to L3
-               DW\-\_AT\-\_data\-\_member\-\_location : 4
-               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
+               \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "next"
+               \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+               \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 16
+               \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L3
+               \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 4
+               \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} : \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name : "bp"
-               DW\-\_AT\-\_decl\-\_file : 1
-               DW\-\_AT\-\_decl\-\_line : 17
-               DW\-\_AT\-\_type : reference to L4
-               DW\-\_AT\-\_data\-\_member\-\_location : 8
-               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
+               \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "bp"
+               \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+               \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 17
+               \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L4
+               \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 8
+               \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} : \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
           \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
-               DW\-\_AT\-\_name : "c"
-               DW\-\_AT\-\_decl\-\_file : 1
-               DW\-\_AT\-\_decl\-\_line : 18
-               DW\-\_AT\-\_type : 0xd28081e8 dcf5070a (signature for struct C)
-               DW\-\_AT\-\_data\-\_member\-\_location : 12
-               DW\-\_AT\-\_accessibility : DW\-\_ACCESS\-\_private
+               \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "c"
+               \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+               \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 18
+               \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : 0xd28081e8 dcf5070a (signature for struct C)
+               \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} : 12
+               \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} : \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
        \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-           DW\-\_AT\-\_external : 1
-           DW\-\_AT\-\_name : "A"
-           DW\-\_AT\-\_decl\-\_file : 1
-           DW\-\_AT\-\_decl\-\_line : 12
-           DW\-\_AT\-\_declaration : 1
+           \livelink{chap:DWATexternal}{DW\-\_AT\-\_external} : 1
+           \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "A"
+           \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+           \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 12
+           \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} : 1
         \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type : reference to L3
-           DW\-\_AT\-\_artificial : 1
+           \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L3
+           \livelink{chap:DWATartificial}{DW\-\_AT\-\_artificial} : 1
         \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type : reference to L2
+           \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L2
        \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
-           DW\-\_AT\-\_external : 1
-           DW\-\_AT\-\_name : "v"
-           DW\-\_AT\-\_decl\-\_file : 1
-           DW\-\_AT\-\_decl\-\_line : 13
-           DW\-\_AT\-\_type : reference to L2
-           DW\-\_AT\-\_declaration : 1
+           \livelink{chap:DWATexternal}{DW\-\_AT\-\_external} : 1
+           \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "v"
+           \livelink{chap:DWATdeclfile}{DW\-\_AT\-\_decl\-\_file} : 1
+           \livelink{chap:DWATdeclline}{DW\-\_AT\-\_decl\-\_line} : 13
+           \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L2
+           \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} : 1
          \livelink{chap:DWTAGformalparameter}{DW\-\_TAG\-\_formal\-\_parameter}
-           DW\-\_AT\-\_type : reference to L3
-           DW\-\_AT\-\_artificial : 1
+           \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L3
+           \livelink{chap:DWATartificial}{DW\-\_AT\-\_artificial} : 1
 L2:
     \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
-         DW\-\_AT\-\_byte\-\_size : 4
-         DW\-\_AT\-\_encoding : DW\-\_ATE\-\_signed
-         DW\-\_AT\-\_name : "int"
+         \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} : 4
+         \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} : \livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed}
+         \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "int"
 L3:
     \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
-         DW\-\_AT\-\_type : reference to L1
+         \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L1
 L4:
     \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
-         DW\-\_AT\-\_type : reference to L5
+         \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : reference to L5
     \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace}
-         DW\-\_AT\-\_name : "N"
+         \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "N"
 L5:
        \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
-           DW\-\_AT\-\_name : "B"
-           DW\-\_AT\-\_declaration : 1
+           \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "B"
+           \livelink{chap:DWATdeclaration}{DW\-\_AT\-\_declaration} : 1
 \end{alltt}
 
 In this example, the structure types N::A and N::C have each
@@ -931,7 +963,8 @@ separate type unit. The last pointer type contains a reference
 to an incomplete type N::B, which is also included here as
 a declaration, since the complete type is unknown and its
 signature is therefore unavailable. There is also a reference
-to N::C, using DW\-\_FORM\-\_sig8 to refer to the type signature
+to N::C, using 
+\livelink{chap:DWFORMrefsig8}{DW\-\_FORM\-\_ref\-\_sig8} to refer to the type signature
 for that type.
 
 In computing a signature for the type N::A, flatten the type
@@ -943,34 +976,35 @@ Section \refersec{app:typesignatureexample2flattenedbytestream}.
 
 \subsubsection{Type signature example 2: flattenedbytestream}
 \label{app:typesignatureexample2flattenedbytestream}
-
+% DWARF4 had a \livelink{chap:DWATnamespace}{DW_AT_namespace} below, 
+% but this error is fixed here to be \livelink{chap:DWTAGnamespace}{DW_TAG_namespace}.
 \begin{alltt}
 // Step 2: 'C' \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace} "N"
 0x43 0x39 0x4e 0x00
 // Step 3: 'D' \livelink{chap:DWTAGclasstype}{DW\-\_TAG\-\_class\-\_type}
 0x44 0x02
-// Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "A"
+// Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "A"
 0x41 0x03 0x08 0x41 0x00
-// Step 4: 'A' DW\-\_AT\-\_byte\-\_size DW\-\_FORM\-\_sdata 20
+// Step 4: 'A' \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 20
 0x41 0x0b 0x0d 0x14
 // Step 7: First child ("v\_")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "v\_"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "v\_"
     0x41 0x03 0x08 0x76 0x5f 0x00
-    // Step 4: 'A' DW\-\_AT\-\_accessibility DW\-\_FORM\-\_sdata DW\-\_ACCESS\-\_private
+    // Step 4: 'A' \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
     0x41 0x32 0x0d 0x03
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 0
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 0
     0x41 0x38 0x0d 0x00
-    // Step 6: 'T' DW\-\_AT\-\_type (type \#2)
+    // Step 6: 'T' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#2)
     0x54 0x49
         // Step 3: 'D' \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type}
         0x44 0x24
-        // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "int"
+        // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "int"
         0x41 0x03 0x08 0x69 0x6e 0x74 0x00
-        // Step 4: 'A' DW\-\_AT\-\_byte\-\_size DW\-\_FORM\-\_sdata 4
+        // Step 4: 'A' \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 4
         0x41 0x0b 0x0d 0x04
-        // Step 4: 'A' DW\-\_AT\-\_encoding DW\-\_FORM\-\_sdata DW\-\_ATE\-\_signed
+        // Step 4: 'A' \livelink{chap:DWATencoding}{DW\-\_AT\-\_encoding} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWATEsigned}{DW\-\_ATE\-\_signed}
         0x41 0x3e 0x0d 0x05
         // Step 7: End of \livelink{chap:DWTAGbasetype}{DW\-\_TAG\-\_base\-\_type} "int"
         0x00
@@ -979,19 +1013,19 @@ Section \refersec{app:typesignatureexample2flattenedbytestream}.
 // Step 7: Second child ("next")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "next"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "next"
     0x41 0x03 0x08 0x6e 0x65 0x78 0x74 0x00
-    // Step 4: 'A' DW\-\_AT\-\_accessibility DW\-\_FORM\-\_sdata DW\-\_ACCESS\-\_private
+    // Step 4: 'A' \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
     0x41 0x32 0x0d 0x03
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 4
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 4
     0x41 0x38 0x0d 0x04
-    // Step 6: 'T' DW\-\_AT\-\_type (type \#3)
+    // Step 6: 'T' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#3)
     0x54 0x49
         // Step 3: 'D' \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
         0x44 0x0f
-        // Step 5: 'N' DW\-\_AT\-\_type
+        // Step 5: 'N' \livelink{chap:DWATtype}{DW\-\_AT\-\_type}
         0x4e 0x49
-        // Step 5: 'C' DW\-\_AT\-\_namespace "N" 'E'
+        // Step 5: 'C' \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace} "N" 'E'
         0x43 0x39 0x4e 0x00 0x45
         // Step 5: "A"
         0x41 0x00
@@ -1002,19 +1036,19 @@ Section \refersec{app:typesignatureexample2flattenedbytestream}.
 // Step 7: Third child ("bp")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "bp"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "bp"
     0x41 0x03 0x08 0x62 0x70 0x00
-    // Step 4: 'A' DW\-\_AT\-\_accessibility DW\-\_FORM\-\_sdata DW\-\_ACCESS\-\_private
+    // Step 4: 'A' \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
     0x41 0x32 0x0d 0x03
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 8
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 8
     0x41 0x38 0x0d 0x08
-    // Step 6: 'T' DW\-\_AT\-\_type (type \#4)
+    // Step 6: 'T' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#4)
     0x54 0x49
         // Step 3: 'D' \livelink{chap:DWTAGpointertype}{DW\-\_TAG\-\_pointer\-\_type}
 0x44 0x0f
-        // Step 5: 'N' DW\-\_AT\-\_type
+        // Step 5: 'N' \livelink{chap:DWATtype}{DW\-\_AT\-\_type}
         0x4e 0x49
-        // Step 5: 'C' DW\-\_AT\-\_namespace "N" 'E'
+        // Step 5: 'C' \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace} "N" 'E'
         0x43 0x39 0x4e 0x00 0x45
         // Step 5: "B"
         0x42 0x00
@@ -1025,41 +1059,41 @@ Section \refersec{app:typesignatureexample2flattenedbytestream}.
 // Step 7: Fourth child ("c")
     // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
     0x44 0x0d
-    // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "c"
+    // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "c"
     0x41 0x03 0x08 0x63 0x00
-    // Step 4: 'A' DW\-\_AT\-\_accessibility DW\-\_FORM\-\_sdata DW\-\_ACCESS\-\_private
+    // Step 4: 'A' \livelink{chap:DWATaccessibility}{DW\-\_AT\-\_accessibility} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} \livelink{chap:DWACCESSprivate}{DW\-\_ACCESS\-\_private}
     0x41 0x32 0x0d 0x03
-    // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 12
+    // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 12
     0x41 0x38 0x0d 0x0c
-    // Step 6: 'T' DW\-\_AT\-\_type (type \#5)
+    // Step 6: 'T' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#5)
     0x54 0x49
         // Step 2: 'C' \livelink{chap:DWTAGnamespace}{DW\-\_TAG\-\_namespace} "N"
         0x43 0x39 0x4e 0x00
         // Step 3: 'D' \livelink{chap:DWTAGstructuretype}{DW\-\_TAG\-\_structure\-\_type}
         0x44 0x13
-        // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "C"
+        // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "C"
         0x41 0x03 0x08 0x43 0x00
-        // Step 4: 'A' DW\-\_AT\-\_byte\-\_size DW\-\_FORM\-\_sdata 8
+        // Step 4: 'A' \livelink{chap:DWATbytesize}{DW\-\_AT\-\_byte\-\_size} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 8
         0x41 0x0b 0x0d 0x08
         // Step 7: First child ("x")
             // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
             0x44 0x0d
-            // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "x"
+            // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "x"
             0x41 0x03 0x08 0x78 0x00
-            // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 0
+            // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 0
             0x41 0x38 0x0d 0x00
-            // Step 6: 'R' DW\-\_AT\-\_type (type \#2)
+            // Step 6: 'R' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#2)
             0x52 0x49 0x02
             // Step 7: End of \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} "x"
             0x00
         // Step 7: Second child ("y")
             // Step 3: 'D' \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member}
             0x44 0x0d
-            // Step 4: 'A' DW\-\_AT\-\_name DW\-\_FORM\-\_string "y"
+            // Step 4: 'A' \livelink{chap:DWATname}{DW\-\_AT\-\_name} \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} "y"
             0x41 0x03 0x08 0x79 0x00
-            // Step 4: 'A' DW\-\_AT\-\_data\-\_member\-\_location DW\-\_FORM\-\_sdata 4
+            // Step 4: 'A' \livelink{chap:DWATdatamemberlocation}{DW\-\_AT\-\_data\-\_member\-\_location} \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} 4
             0x41 0x38 0x0d 0x04
-            // Step 6: 'R' DW\-\_AT\-\_type (type \#2)
+            // Step 6: 'R' \livelink{chap:DWATtype}{DW\-\_AT\-\_type} (type \#2)
             0x52 0x49 0x02
             // Step 7: End of \livelink{chap:DWTAGmember}{DW\-\_TAG\-\_member} "y"
             0x00
@@ -1097,9 +1131,9 @@ Section \refersec{app:typesignatureexampleusage}.
   \livelink{chap:DWTAGsubprogram}{DW\-\_TAG\-\_subprogram}
     ...
     \livelink{chap:DWTAGvariable}{DW\-\_TAG\-\_variable}
-      DW\-\_AT\-\_name : "a"
-      DW\-\_AT\-\_type : (signature) 0xd6d160f5 5589f6e9
-      DW\-\_AT\-\_location : ...
+      \livelink{chap:DWATname}{DW\-\_AT\-\_name} : "a"
+      \livelink{chap:DWATtype}{DW\-\_AT\-\_type} : (signature) 0xd6d160f5 5589f6e9
+      \livelink{chap:DWATlocation}{DW\-\_AT\-\_location} : ...
     ...
 \end{alltt}
 
@@ -1147,23 +1181,23 @@ tag-code
 at-code
     : <ULEB128>
 form-encoded-value
-    : DW\-\_FORM\-\_sdata value
-    : DW\-\_FORM\-\_flag value
-    : DW\-\_FORM\-\_string string
-    : DW\-\_FORM\-\_block block
-DW\-\_FORM\-\_string
+    : \livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata} value
+    : \livelink{chap:DWFORMflag}{DW\-\_FORM\-\_flag} value
+    : \livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string} string
+    : \livelink{chap:DWFORMblock}{DW\-\_FORM\-\_block} \nolink{block}
+\livelink{chap:DWFORMstring}{DW\-\_FORM\-\_string}
     : '\\x08'
-DW\-\_FORM\-\_block
+\livelink{chap:DWFORMblock}{DW\-\_FORM\-\_block}
     : '\\x09'
-DW\-\_FORM\-\_flag
+\livelink{chap:DWFORMflag}{DW\-\_FORM\-\_flag}
     : '\\x0c'
-DW\-\_FORM\-\_sdata
+\livelink{chap:DWFORMsdata}{DW\-\_FORM\-\_sdata}
     : '\\x0d'
 value
     : <SLEB128>
-block
+\nolink{block}
     : <ULEB128> <fixed-length-block>
-                      // The ULEB128 gives the length of the block
+                      // The ULEB128 gives the length of the \nolink{block}
 back-ref
     : <ULEB128>
 string
@@ -1178,9 +1212,12 @@ empty
 \subsection{\#include compression}
 \label{app:includecompression}
 
-C++ has a much greater problem than C with the number and
+\addtoindex{C++} has a much greater 
+problem than 
+\addtoindex{C} with the number and
 size of the headers included and the amount of data in each,
-but even with C there is substantial header file information
+but even with \addtoindex{C} 
+there is substantial header file information
 duplication.
 
 A reasonable approach is to put each header file in its own
@@ -1189,7 +1226,8 @@ section groups are marked to ensure duplicate removal.
 
 All data instances and code instances (even if they came
 from the header files above) are put into non-section group
-sections such as the base object file .debug\_info section.
+sections such as the base object file 
+\addtoindex{.debug\_info} section.
 
 \subsection{Eliminating function duplication}
 \label{app:eliminatingfunctionduplication}
@@ -1209,7 +1247,8 @@ removal, so that the second and subsequent definitions seen
 by the static linker are simply discarded.
 
 
-References to other .debug\_info sections follow the approach
+References to other 
+\addtoindex{.debug\_info} sections follow the approach
 suggested above, but the naming rule might be slightly
 different in that the 
 \begin{alltt}
@@ -1238,10 +1277,11 @@ text, data, and DWARF sections.
 
 There will also be a compilation unit that has the file\dash level
 declarations and definitions. Other per\dash function compilation
-unit DWARF information (.debug\_info) points to this common
+unit DWARF information (
+\addtoindex{.debug\_info}) points to this common
 file\dash level compilation unit using \livelink{chap:DWTAGimportedunit}{DW\-\_TAG\-\_imported\-\_unit}.
 
-Section groups can use DW\-\_FORM\-\_ref\-\_addr and internal labels
+Section groups can use \livelink{chap:DWFORMrefaddr}{DW\-\_FORM\-\_ref\-\_addr} and internal labels
 (section\dash relative relocations) to refer to the main object
 file sections, as the section groups here are either deleted
 as unused or kept. There is no possibility (aside from error)
@@ -1252,7 +1292,10 @@ of one of these groups.
 \subsection{Inlining and out-of-line-instances}
 \label{app:inliningandoutoflineinstances}
 
-Abstract instances and concrete-out-of-line instances may be
+Abstract instances
+\addtoindexx{abstract instance}
+\addtoindexx{concrete out-of-line instance}
+and concrete-out-of-line instances may be
 put in distinct compilation units using section groups. This
 makes possible some useful duplicate DWARF elimination.