This fixes an issue where OBJs files containing a malformed .text$x section references label symbols (that is IMAGE_SYM_CLASS_LABEL) that live in a COMDAT .text$mn. This kind of OBJ files are generated when using binutils objcopy. A tentative reproducer can be found here in https://github.com/llvm/llvm-project/issues/62182. This patch already contains a test that covers the bug.
Fixes PR62182.
Can we use a typedef for the std::vector<std::pair<DefinedRegular *, const llvm::object::coff_aux_section_definition *>>?