DWARF 4 added a new ".debug_types" section -- a relatively simple and cheap way to compress DWARF debugging information. This feature changes Fedora to take advantage of this compression.

+

DWARF 4 added a new ".debug_types" section. This section enables a relatively simple and cheap way to compress DWARF debugging information. This feature changes Fedora to take advantage of this compression.

== Owner ==

== Owner ==

Line 16:

Line 16:

== Current status ==

== Current status ==

−

* Targeted release: [[Releases/18 | Fedora 18 ]]

+

* Obsoleted by [[Features/DwarfCompressor]]

−

* Last updated: 2012-03-21

+

−

* Percentage of completion: 50%

+

== Detailed Description ==

== Detailed Description ==

−

This feature was implemented in GCC and GDB quite a while ago, but until now Fedora has not taken advantage of it. The compression is quite good; building gdb with this option reduces the size of the final executable from 17M to 11M.

+

This feature works by enabling a compiler option that instructs GCC to put "large" types into comdat sections in the object files. Then, the linker automatically merges all such shared types when linking. Since types occupy a reasonable proportion of the DWARF data, and because types are often identically across compliation units, this results in space savings.

+

+

The .debug_types feature was implemented in GCC and GDB quite a while ago, but until now Fedora has not taken advantage of it. The compression is quite good. For exmaple, building gdb with this option reduces the size of the final executable from 17M to 11M. A stripped gdb is 6.7M; meaning that this flag removes around 60% of the debuginfo.

== Benefit to Fedora ==

== Benefit to Fedora ==

Line 35:

Line 35:

* Either change GCC to enable <code>-fdebug-types-section</code> by default, or add this to the default compiler flags used when building RPMs.

* Either change GCC to enable <code>-fdebug-types-section</code> by default, or add this to the default compiler flags used when building RPMs.

−

* Update SystemTap to handle the new section properly. (Done)

+

* Update SystemTap to handle the new section properly. (In stap git repository now; must ensure it is in the stap that is shipped in F18.)

* Update valgrind to handle the new section properly. The patch is in but must be backported to the Fedora valgrind; see https://bugzilla.redhat.com/show_bug.cgi?id=810286

* Disable the new flag for kernel builds. This is needed because libdw cannot handle the multiple .debug_types sections that can appear in ET_REL files -- which includes kernel modules.

* Disable the new flag for kernel builds. This is needed because libdw cannot handle the multiple .debug_types sections that can appear in ET_REL files -- which includes kernel modules.

Line 69:

Line 69:

== Release Notes ==

== Release Notes ==

−

TBD.

+

Packages built in Fedora 18 are compiled with -fdebug-types-section, yielding much smaller debuginfo packages. The new debuginfo is specified by the DWARF 4 standard; some debuginfo-reading packages may need updates in order to understand the new data. All DWARF-reading packages in Fedora 18 have been updated.

DWARF 4 added a new ".debug_types" section. This section enables a relatively simple and cheap way to compress DWARF debugging information. This feature changes Fedora to take advantage of this compression.

This feature works by enabling a compiler option that instructs GCC to put "large" types into comdat sections in the object files. Then, the linker automatically merges all such shared types when linking. Since types occupy a reasonable proportion of the DWARF data, and because types are often identically across compliation units, this results in space savings.

The .debug_types feature was implemented in GCC and GDB quite a while ago, but until now Fedora has not taken advantage of it. The compression is quite good. For exmaple, building gdb with this option reduces the size of the final executable from 17M to 11M. A stripped gdb is 6.7M; meaning that this flag removes around 60% of the debuginfo.

Packages built in Fedora 18 are compiled with -fdebug-types-section, yielding much smaller debuginfo packages. The new debuginfo is specified by the DWARF 4 standard; some debuginfo-reading packages may need updates in order to understand the new data. All DWARF-reading packages in Fedora 18 have been updated.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks or registered trademarks of
Red Hat, Inc. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community
maintained site. Red Hat is not responsible for content.