I forgot to add emission of CG profile for COFF object file, when adding the support(https://reviews.llvm.org/D81775)
I was thinking about a discussion in https://reviews.llvm.org/D81775?id=270540#inline-751699, which might be the cause. I was trying to do the same as ELF. Not sure if that's the cause.
For symbols haven't seen, just set them to external not weak external.
Previously I did it that way, because http://llvm.org/docs/Extensions.html#sht-llvm-call-graph-profile-section-call-graph-profile says
If either symbol is undefined, then that symbol is defined as if .weak symbol has been written at the end of the file.
Can you remove the weak external marking in a separate change from relanding? It changes existing functionality of the .cg_profile directive, so it can be committed independently, which is nice for making changes as small and independent as possible.