Properly set weak flag to COMDAT symbols so that no duplicate definition error will be generated. There is an inaccuracy in setting plain weak for largest selection type, which will be dealt with soon when largest type is properly implemented.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks!
llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp | ||
---|---|---|
165 | I guess this could indeed fail for malformed objects. The referred section might not exist, right? | |
llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_weak_plus_strong.s | ||
12 | I never double-checked this with the Mircosoft toolchain. Did you? | |
llvm/test/ExecutionEngine/JITLink/X86/COFF_strong_duplicate.s | ||
10 | Can we use # RUN: not llvm-jitlink ... to check that we get a non-zero exit code instead of XFAILing the test? My impression was that XFAIL should be used specifically to mark bugs and todos. |
Thanks for the review!
llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp | ||
---|---|---|
165 | It shouldn't happen in valid object file, but yes it could happen in invalid ones, I'll change it to check error. | |
llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_weak_plus_strong.s | ||
12 | I just checked with msvc toolchain and it gets duplicate definition error. I guess we need to introduce new linkage type for this. | |
llvm/test/ExecutionEngine/JITLink/X86/COFF_strong_duplicate.s | ||
10 | I didn't know about not when I wrote this. Thanks for pointing out! |
I guess this could indeed fail for malformed objects. The referred section might not exist, right?