4.1 Elimination of common debug sections

The linker can detect multiple copies of a debug section, and discard the additional copies.

In DWARF 2, the compiler and assembler generate one set of debug sections for each source file that contributes to a compilation unit. armlink can detect multiple copies of a debug section for a particular source file and discard all but one copy in the final image. This can result in a considerable reduction in image debug size.
In DWARF 3, common debug sections are placed in common groups. armlink discards all but one copy of each group with the same signature.
Related concepts
4.2 Elimination of common groups or sections
4.3 Elimination of unused sections
4.4 Elimination of unused virtual functions
3.1.2 Input sections, output sections, regions, and program segments
Related information
--debug, --no_debug compiler option
--debug assembler option
The DWARF Debugging Standard web site
Non-ConfidentialPDF file icon PDF versionARM DUI0377G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.