[JITLink][COFF] Implement IMAGE_COMDAT_SELECT_LARGEST partially.
authorSunho Kim <ksunhokim123@gmail.com>
Tue, 26 Jul 2022 03:51:33 +0000 (12:51 +0900)
committerSunho Kim <ksunhokim123@gmail.com>
Tue, 26 Jul 2022 03:51:33 +0000 (12:51 +0900)
commitdf344e1f44282848eefac252fbe1a7b4d6031430
treea3dcb21af4ed7447988b7819a6a9c7c2c541f78a
parent736b6311e136c854b753648bafb60914393d41de
[JITLink][COFF] Implement IMAGE_COMDAT_SELECT_LARGEST partially.

Implement IMAGE_COMDAT_SELECT_LARGEST partially. It's going to fail if larger symbol appears but this hasn't happened at least in vcruntime library.

We probably would not implement this properly as it requires complicated runtime patching which is not of nature of JIT. However, we'd like to validate if larger section appears and report to the user in the near future.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D129941
llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_largest.test