[PATCH] D82883: [LLD][COFF] Deduplicate .pdata entries

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 01:12:24 PDT 2020


mstorsjo added a comment.

In D82883#2126581 <https://reviews.llvm.org/D82883#2126581>, @mstorsjo wrote:

> Just curious - do you know why you end up with duplicates? In most cases where there could be duplicates, they should be in a comdat section where only one is picked? And if not, you'd have a duplicate definition of a symbol in the corresponding text section - right?


Poking into this again - so in the testcase, you made the .text section a comdat so that doesn't conflict, but not the .pdata/.xdata. As far as I know, when llvm generates .pdata/.xdata for a comdat .text section, the .pdata/.xdata sections also should be comdat (and made associative to the .text section).

So in the case when you're running into this issue, aren't .pdata made into an associative comdat at all? Or does it work in general, but is failing in some corner case? Or is it a case of handwritten assembly, or code generated by some other external tool that doesn't get this aspect entirely right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82883/new/

https://reviews.llvm.org/D82883





More information about the llvm-commits mailing list