\begin{longtable}{ll}
\textbf{Date} & \textbf{Issue Incorporated or Other Change} \\ \hline \\
\endhead
+4/14/2014 & 130526.1 (Type unit merge) \\
2/8/2014 & 131113.1 (UTF-8), 131113.2 (correct \DWTAGtypeunitNAME{} in Appendix A), \\
& 131217.1 (C++ "auto" return type), 131105.1 (add example) \\
12/18/2013 & 131105.1 (\&- and \&\&-qualification), 131216.1 (non-defining wording), \\
ELF object file representation.
The notion of \addtoindex{section group} is
an abstraction of common extensions of the ELF representation
-widely known as \doublequote{COMDATs} or \doublequote{COMDAT sections.} (Other
-object file representations provide COMDAT\dash style mechanisms as
-well.) There are several variations in the COMDAT schemes in
+widely known as
+\doublequote{\COMDAT{}s} or \doublequote{\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
\addtoindexx{duplication elimination|see{DWARF duplicate elimination}}
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
-\dotdebugtypes{} section
+\COMDAT{} \dotdebuginfo{} section
and arranging for the linker to recognize and eliminate
duplicates at the individual type level.
\dotdebugline{}
\end{alltt}
-and any number of these additional sections:
-
-\begin{alltt}
-\dotdebugtypes{}
-\end{alltt}
+and any number of additional \COMDAT{} \dotdebuginfo{} sections
+containing type units.
\needlines{5}
As discussed in the previous section
(Section \refersec{app:usingcompilationunits}),
many
-linkers today support the concept of a COMDAT group or
+linkers today support the concept of a \COMDAT{} group or
linkonce section. The general idea is that a \doublequote{key} can be
attached to a section or a group of sections, and the linker
will include only one copy of a \addtoindex{section group}
(or individual section) for any given key.
-For
-\dotdebugtypes{} sections, the
+For \COMDAT{} \dotdebuginfo{} sections, the
key is the \addtoindex{type signature}
formed from the algorithm given in
Section \refersec{datarep:typesignaturecomputation}.
have a header
(\dotdebugaranges{},
\dotdebuginfo{},
-\dotdebugtypes{},
\dotdebugline{},
\dotdebugpubnames{}, and
\dotdebugpubtypes{}) or the length field
entries with an offset relative to a base offset in the
range table for the compilation unit.
-\item Separate type units, in the \dotdebugtypesdwo{} section.
+\item Separate type units, in the \dotdebuginfodwo{} section.
\item
Abbreviations table(s) for the compilation unit and type
\dotdebugpubtypes{} & \addtoindex{debug\_info\_offset} & offset in \dotdebuginfo{} \\
& \addtoindex{debug\_info\_length} & length of \dotdebuginfo{} \\
& & contribution \\
-\dotdebugtypes{} & \addtoindex{debug\_abbrev\_offset} & offset in \dotdebugabbrev{} \\
- & \addtoindex{type\_offset} & offset in \dotdebugtypes{} \\
-
\end{tabular}
\end{center}
present, consequently, these two fields must exactly overlay
each other (both offset and size).
-\item Within the body of the \dotdebuginfo{} or \dotdebugtypes{}
+\item Within the body of the \dotdebuginfo{}
section, certain forms of attribute value depend on the choice
of DWARF format as follows. For the 32\dash bit DWARF format,
the value is a 32\dash bit unsigned integer; for the 64\dash bit DWARF
\DWTAGpartialunit{} debugging
information entry, together with its children.
-For each type defined in a compilation unit, a contribution may
-be made to the \dotdebugtypes{}
+For each type defined in a compilation unit, a separate
+contribution may also be made to the
+\dotdebuginfo{}
section of the object file. Each
such contribution consists of a
\addtoindex{type unit} header
The appropriate entry in the
\addtoindex{abbreviations table} guides the
interpretation of the information contained directly in the
-\dotdebuginfo{} or
-\dotdebugtypes{} section.
+\dotdebuginfo{} section.
\needlines{4}
Multiple debugging information entries may share the same
abbreviation table entry. Each compilation unit is associated
with a particular abbreviation table, but multiple compilation
units may share the same table.
+
\subsection{Unit Headers}
\label{datarep:unitheaders}
+Unit headers contain a field, \texttt{unit\_type}, whose value indicates the kind of
+compilation unit that follows. The encodings for the unit type
+enumeration are shown in Table \refersec{tab:unitheaderunitkindencodings}.
+
+\needlines{6}
+\begin{centering}
+\setlength{\extrarowheight}{0.1cm}
+\begin{longtable}{l|l}
+ \caption{Unit header unit kind encodings}
+ \label{tab:unitheaderunitkindencodings}
+ \addtoindexx{Unit header unit kind encodings} \\
+ \hline \bfseries Unit header unit kind encodings&\bfseries Value \\ \hline
+\endfirsthead
+ \bfseries Unit header unit kind encodings&\bfseries Value \\ \hline
+\endhead
+ \hline \emph{Continued on next page}
+\endfoot
+ \hline
+\endlastfoot
+\DWUTcompileTARG &0x01 \\
+\DWUTtypeTARG &0x02 \\
+\DWUTpartialTARG &0x03 \\ \hline
+\end{longtable}
+\end{centering}
\subsubsection{Compilation Unit Header}
\label{datarep:compilationunitheader}
integer that gives the actual length
(see Section \refersec{datarep:32bitand64bitdwarfformats}).
-\needlines{4}
\item \texttt{version} (\addtoindex{uhalf}) \\
A 2\dash byte unsigned integer representing the version of the
DWARF information for the compilation unit \addtoindexx{version number!compilation unit}
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
-The value in this field is 4.
+The value in this field is \versiondotdebuginfo.
+
+\needlines{4}
+\item \texttt{unit\_type} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer identifying this unit as a compilation unit.
+The value of this field is
+\DWUTcompile{} for a {normal compilation} unit or
+\DWUTpartial{} for a {partial compilation} unit
+(see Section \refersec{chap:normalandpartialcompilationunitentries}).
+
+\textit{This field is new in \DWARFVersionV.}
\item \addttindex{debug\_abbrev\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
A
The header for the series of debugging information entries
contributing to the description of a type that has been
placed in its own \addtoindex{type unit}, within the
-\dotdebugtypes{} section,
+\dotdebuginfo{} section,
consists of the following information:
\begin{enumerate}[1. ]
A 4\dash byte or 12\dash byte unsigned integer
\addtoindexx{initial length}
representing the length
-of the \dotdebugtypes{} contribution for that type unit,
+of the \dotdebuginfo{} contribution for that type unit,
not including the length field itself. In the \thirtytwobitdwarfformat,
this is a 4\dash byte unsigned integer (which must be
less than \xfffffffzero); in the \sixtyfourbitdwarfformat, this
DWARF information for the
type unit\addtoindexx{version number!type unit}
(see Appendix \refersec{app:dwarfsectionversionnumbersinformative}).
-The value in this field is 4.
+The value in this field is \versiondotdebuginfo.
+
+\item \texttt{unit\_type} (\addtoindex{ubyte}) \\
+A 1-byte unsigned integer identifying this unit as a type unit.
+The value of this field is \DWUTtype{} for a type unit
+(see Section \refersec{chap:separatetypeunitentries}).
+
+\textit{This field is new in \DWARFVersionV.}
+\needlines{4}
\item \addttindex{debug\_abbrev\_offset} (\livelink{datarep:sectionoffsetlength}{section offset}) \\
A
\addtoindexx{section offset!in .debug\_types header}
an unsigned LEB128 number representing the abbreviation
code itself. It is this code that appears at the beginning
of a debugging information entry in the
-\dotdebuginfo{} or
-\dotdebugtypes{}
+\dotdebuginfo{}
section. As described above, the abbreviation
code 0 is reserved for null debugging information entries. The
abbreviation code is followed by another unsigned LEB128
The attribute form
\DWFORMindirectTARG{} is a special case. For
attributes with this form, the attribute value itself in the
-\dotdebuginfo{} or
-\dotdebugtypes{}
+\dotdebuginfo{}
section begins with an unsigned
LEB128 number that represents its form. This allows producers
to choose forms for particular attributes
\dotdebugpubtypes{},
\dotdebugranges{},
\dotdebugstr{},
+and
\dotdebugstroffsets{}
-and
-\dotdebugtypes{}
sections of an object file, or equivalent
separate file or database. The information is not
word\dash aligned. Consequently:
\node(zsectara) at ( 0, 16.) [sect] {\dotdebugaranges};
\node(zlinka) at ( 0, 14.) [link] {To compilation unit (a)};
\node(zsectinf) at ( 0, 8.0) [sect] {\begin{tabular}{c}
- \dotdebuginfo \\
- \dotdebugtypes
+ \dotdebuginfo
\end{tabular}};
\node(zlinkb) at ( 0, 2.0) [link] {To compilation unit (b)};
\node(zsectpub) at ( 0, 0.0) [sect] {\begin{tabular}{c}
information entry.
%c
-\item \dotdebuginfo{} and \dotdebugtypes{} to \dotdebugabbrev \\
+\item \dotdebuginfo{} to \dotdebugabbrev \\
The \texttt{debug\_abbrev\_offset} value in the header is the offset in the
\dotdebugabbrev{}
section of the abbreviations for that compilation unit.
%d
-\item \dotdebuginfo{} and \dotdebugtypes{} to \dotdebugstr \\
+\item \dotdebuginfo{} to \dotdebugstr \\
Attribute values of class string may have form
\DWFORMstrp, whose
value is the offset in the \dotdebugstr{}
\DWOPaddrx{} and \DWOPconstx{} operators that occur in the
\dotdebugloc{} section refer indirectly to the
\dotdebugaddr{} section by way of the
-\DWATaddrbase{} attribute in the associated \dotdebuginfo{} or
-\dotdebugtypes{} section.
+\DWATaddrbase{} attribute in the associated \dotdebuginfo{}
+section.
\end{enumerate}
% If draft is in the document class list, pix are just suggested
% by an outline, the pic does not appear as a picture.
%
-\newcommand{\docdate}{February 8, 2014}
+\newcommand{\docdate}{April 14, 2014}
%
\usepackage{ifthen}
\newboolean{isdraft}
\newcommand{\livelink}[2]{\hyperlink{#1}{#2}\index{#2}}
% use when the index is different from the text and target.
\newcommand{\livelinki}[3]{\hyperlink{#1}{#2}\index{#3}}
-% livetarg is the declaration this is the target of livelinks.
+% livetarg is the declaration that is the target of livelinks.
% FIXME: we might want livetarg and livetargi #2 to be \textbf{#2}
\newcommand{\livetarg}[2]{\hypertarget{#1}{#2}\index{#2}}
% When we want the index entry to look different from the name.
\newdwfnamecommands{DWTAGvolatiletype}{DW\_TAG\_volatile\_type}
\newdwfnamecommands{DWTAGwithstmt}{DW\_TAG\_with\_stmt}
%
+% DW_UT
+%
+\newdwfnamecommands{DWUTcompile}{DW\_UT\_compile}
+\newdwfnamecommands{DWUTtype}{DW\_UT\_type}
+\newdwfnamecommands{DWUTpartial}{DW\_UT\_partial}
+%
% DW_VIRTUALITY
%
\newdwfnamecommands{DWVIRTUALITYnone}{DW\_VIRTUALITY\_none}
\newcommand{\dotdebugranges}{\addtoindex{\texttt{.debug\_ranges}}}
\newcommand{\dotdebugstr}{\addtoindex{\texttt{.debug\_str}}}
\newcommand{\dotdebugstroffsets}{\addtoindex{\texttt{.debug\_str\_offsets}}}
-\newcommand{\dotdebugtypes}{\addtoindex{\texttt{.debug\_types}}}
%
\newcommand{\dotdebugabbrevdwo}{\addtoindex{\texttt{.debug\_abbrev.dwo}}}
\newcommand{\dotdebugaddrdwo}{\addtoindex{\texttt{.debug\_addr.dwo}}}
\newcommand{\dotdebugrangesdwo}{\addtoindex{\texttt{.debug\_ranges.dwo}}}
\newcommand{\dotdebugstrdwo}{\addtoindex{\texttt{.debug\_str.dwo}}}
\newcommand{\dotdebugstroffsetsdwo}{\addtoindex{\texttt{.debug\_str\_offsets.dwo}}}
-\newcommand{\dotdebugtypesdwo}{\addtoindex{\texttt{.debug\_types.dwo}}}
%
\newcommand{\dotdata}{\addtoindex{\texttt{.data}}}
\newcommand{\dottext}{\addtoindex{\texttt{.text}}}
\newcommand{\versiondotdebugranges} {5}
\newcommand{\versiondotdebugstr} {5}
\newcommand{\versiondotdebugstroffsets}{5}
-\newcommand{\versiondotdebugtypes} {\versiondotdebuginfo}
%
% DWARF Standard Versions
%
\newcommand{\DWARFVersionI} {\addtoindex{DWARF Version 1}}
\newcommand{\DWARFVersionII} {\addtoindex{DWARF Version 2}}
-\newcommand{\DWARFVersionIIII}{\addtoindex{DWARF Version 3}}
+\newcommand{\DWARFVersionIII} {\addtoindex{DWARF Version 3}}
\newcommand{\DWARFVersionIV} {\addtoindex{DWARF Version 4}}
\newcommand{\DWARFVersionV} {\addtoindex{DWARF Version 5}}
%
% Miscellaneous
%
-\newcommand{\MDfive}{\livelink{def:MDfive}{MD5}}
\ No newline at end of file
+\newcommand{\MDfive}{\livelink{def:MDfive}{MD5}}
+\newcommand{\COMDAT}{\addtoindex{COMDAT}}
\ No newline at end of file
\DWATdescription,
among others.}
-The debugging information entries are contained
-in the \dotdebuginfo{} and
-\dotdebugtypes{}
-sections of an object file.
+The debugging information entries are contained in the
+\dotdebuginfo{} sections of an object file.
\needlines{7}
Optionally, debugging information may be partitioned such
that the majority of the debugging information can remain in
individual object files without being processed by the
linker. These debugging information entries are contained in
-the \dotdebuginfodwo{} and \dotdebugtypesdwo{} sections. These
+the \dotdebuginfodwo{} sections. These
sections may be placed in the object file but marked so that
the linker ignores them, or they may be placed in a separate
DWARF object file that resides alongside the normal object
The operand is used as the offset of a
debugging information entry in a
\dotdebuginfo{}
-or
-\dotdebugtypes{}
section which may be contained in a shared object or executable
other than that containing the operator. For references from
one shared object or executable to another, the relocation
\item Add an attribute, \DWATmainsubprogram, to identify the main subprogram of a
program.
\item Define default array lower bound values for each supported language.
-\item Add a new technique using separate type units, type signatures and COMDAT sections to
+\item Add a new technique using separate type units, type signatures and \COMDAT{} sections to
improve compression and duplicate elimination of DWARF information.
\item Add support for new C++ language constructs, including rvalue references, generalized
constant expressions, Unicode character types and template aliases.
% references to chapter 7 look like {datarep:...}
This section describes debugging information that is not
represented in the form of debugging information entries and
-is not contained within a \dotdebuginfo{} or
-\dotdebugtypes{} section.
+is not contained within a \dotdebuginfo{} section.
In the descriptions that follow, these terms are used to
specify the representation of DWARF sections:
There are sections with no version number encoded in them;
they are only accessed via the
-\dotdebuginfo{} and
-\dotdebugtypes{}
+\dotdebuginfo{}
sections and so an incompatible change in those sections'
format would be represented by a change in the
-and \dotdebugtypes{} section version number.
+\dotdebuginfo{} section version number.
\begin{centering}
\setlength{\extrarowheight}{0.1cm}
\dotdebugpubtypes{} & x & 2 & 2 & 2 \\
\dotdebugranges{} & x & - & - & 5 \\
\dotdebugstr{} & - & - & - & - \\
-\dotdebugstroffsets & x & x & x & 5 \\
-\dotdebugtypes{} & x & x & 4 & 5 \\
+\dotdebugstroffsets & x & x & x & 5 \\
+
\hspace{3cm}\textit{(.dwo sections)} \\
\dotdebugabbrevdwo & x & x & x & 5 \\
\dotdebuginfodwo & x & x & x & 5 \\
\dotdebugstrdwo & x & x & x & - \\
\dotdebugstroffsetsdwo
& x & x & x & 5 \\
-\dotdebugtypesdwo & x & x & x & 5 \\
\end{longtable}
\end{centering}
\item \doublequote{x} means that the section was not defined in that
version of the DWARF standard.
-\item The version numbers for the \dotdebuginfo{} and \dotdebugtypes{}
-sections must be the same.
-
\item The version numbers for corresponding .debug\_<kind> and .debug\_<kind>.dwo
sections are the same.
The optional set of debugging sections includes the following:
\begin{itemize}
\item
-\dotdebuginfodwo{} - Contains the \DWTAGcompileunit{} DIE and
-its descendants. This is the bulk of the debugging
+\dotdebuginfodwo{} - Contains the \DWTAGcompileunit{} and
+\DWTAGtypeunit{} DIEs and
+their descendants. This is the bulk of the debugging
information for the compilation unit that is normally found
in the \dotdebuginfo{} section.
\item
-\dotdebugtypesdwo{} - Contains the \DWTAGtypeunit{} DIEs and
-their descendants. This is the bulk of the debugging
-information for the type units that is normally found in the
-\dotdebugtypes{} section.
-\item
\dotdebugabbrevdwo{} - Contains the abbreviations tables used by
-the \dotdebuginfodwo{} and \dotdebugtypesdwo{} sections.
+the \dotdebuginfodwo{} sections.
\item
\dotdebuglocdwo{} - Contains the location lists referenced by
the debugging information entries in the \dotdebuginfodwo{}
\item
\dotdebugstrdwo{} - Contains the string table for all indirect
strings referenced by the debugging information in the
-\dotdebuginfodwo{} and \dotdebugtypesdwo{} sections.
+\dotdebuginfodwo{} sections.
\item
\dotdebugstroffsetsdwo{} - Contains the string offsets table
for the strings in the \dotdebugstrdwo{}{} section.
normally found in the \dotdebugmacinfo{} section.
\item
\dotdebuglinedwo{} - Contains skeleton line tables for the type
-units in the \dotdebugtypesdwo{} section. These line tables
+units in the \dotdebuginfodwo{} section. These line tables
contain only the directory and files lists needed to
interpret \DWATdeclfile{} attributes in the debugging
information entries. Actual line number tables remain in the
binary. A skeleton \dotdebuginfo{} section for each compilation unit
contains a reference to the corresponding ".o" or ".dwo"
file, and the \dotdebugline{} section (which is typically small
-compared to the \dotdebuginfo{} and \dotdebugtypes{} sections) is
+compared to the \dotdebuginfo{} sections) is
linked into the output binary, as is the new \dotdebugaddr{}
section.
Because of other improvements in \DWARFVersionV, most of the
relocations that would normally be found in the \dotdebuginfodwo{}
-and \dotdebugtypesdwo{} sections is moved to the \dotdebugaddr{} and
+sections are moved to the \dotdebugaddr{} and
\dotdebugstroffsetsdwo{} sections. Those in the
-\dotdebugstroffsetsdwo{} sections are simply be omitted because the
+\dotdebugstroffsetsdwo{} sections are simply omitted because the
DWARF information in those sections is not combined at link
time, so no relocation is necessary. Similarly,
many of the remaining relocations referring to range lists are
to the \dotdebugstroffsetsdwo{} section, via
\DWATstroffsetsbase{}. Because the new sections are not
combined at link time, the \DWATstroffsetsbase{} attribute
-is not required in a \dotdebuginfodwo{} or \dotdebugtypesdwo{}
+is not required in a \dotdebuginfodwo{}
section.
\item
References from \DWTAGcompileunit{} DIEs to the \dotdebugaddr{}