[PATCH] D48402: [mingw] Fix GCC ABI compatibility for comdat things

Pirama Arumuga Nainar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 15:32:42 PDT 2018


pirama added a comment.

Reid, thanks a lot for addressing this issue.

(For reference to @mstorsjo, I am trying option #2 that you mention).

> I fixed up the .pdata and .xdata sections needed everywhere other than
>  32-bit x86. GCC doesn't use associative comdats for those, it appears to
>  rely on the section name.

With your change, the duplicate definition errors for x86_64 are addressed but still happen for 32-bit x86.

I also found that for x86_64, the section also has a comdat tag.

  Sections:
  ....
    4 .text$_Z3fooi 00000014  0000000000000000  0000000000000000  000001bc  2**4
                    CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE, LINK_ONCE_DISCARD (COMDAT _Z3fooi 10)

while for i686, it doesn't:

  Sections:
  ....
    3 .text$___Z3fooi 00000013  00000000  00000000  0000012c  2**4
                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE, LINK_ONCE_DISCARD

Could that explain the difference?


Repository:
  rL LLVM

https://reviews.llvm.org/D48402





More information about the llvm-commits mailing list