This is to fix a bug with processing of DWARF v5 indexed strings in Mach-O object files. Mach-O limits section names to 16 characters, but the generic code expects DWARF v5 standard names, some of which are longer than 16 characters. Mapping of Mach-O section names to DWARF v5 standard names was implemented, but the call to the conversion routine was accidentally placed past the place where it was needed and was deemed dead code.
A test for Mach-O was added and the existing test updated.
Might be worth also commenting on what the original source is for ease of understanding/reading.