The DWARF5 specification says(Appendix F.1):
"The sections that do not require relocation, however, can be written to the relocatable object (.o) file but ignored by the
linker or they can be written to a separate DWARF object (.dwo) file that need not be accessed by the linker."
The first part describes a single file split DWARF feature and there is no way to trigger this behavior atm.
Fortunately, no many changes are required to keep *.dwo sections in a .o, the patch does that.
Rather than creating a string in the case where there's no need for string matching/parsing, perhaps that could be avoided?