I have a need of the debugging information of the code in our project. The following two approaches are available:
-g
and afterwards use GNU binary utilities strip
and objcopy
to strip the debugging information into a separate file.-gsplit-dwarf
The second approach creates a .dwo
for each translation unit in the application.
Although this would improve the linker time. But with the huge number of translation files, this would create management headache for us.
Is there a way to combine all the .dwo
files into a single file per binary ?
Compiler : GCC toolchain.
OS: CentOS/RH 7/8
The tool you're looking for is called dwp
. It collects your .dwo files into a .dwp file ("DWARF package"). .dwp files can themselves be combined into larger .dwp files if needed.
It should come with non-ancient binutils packages.