It is possible to use group sections outside of COMDAT, but that's unsupported by lld. This makes lld unusuable
This is a tentative patch that just use the section content, without the duplication logic implied by COMDAT.
Differential D56437
Support blank flag in SHT_GROUP sections for ELF serge-sans-paille on Jan 8 2019, 6:39 AM. Authored by
Details
It is possible to use group sections outside of COMDAT, but that's unsupported by lld. This makes lld unusuable This is a tentative patch that just use the section content, without the duplication logic implied by COMDAT.
Diff Detail
Event TimelineComment Actions Why are you trying to do this? It is intentional that only GRP_COMDAT is supported. That's the only flag defined by the ELF spec as you can see here: https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter7-26/index.html Other flags may be added in the future, but we'd implement them when they are added. Blindly handling all the undefined flags as if they were GRP_COMDAT is simply wrong. We should reject unknown flags. Comment Actions For some background, the static glibc.a in the latest (unreleased) build of Fedora contains these non-comdat group sections. There are 2 types of group, one called .text.unliklely.group (unlikely is spelled wrongly in the object files) and one called .text.hot.group. The .text.unlikely and .text.hot sections usually come about when the gcc optimizations like -freorder-blocks-and-partition and -freorder-functions are used. However I've never seen them generate an ELF group before, I can't for the life of me reproduce with trunk gcc, and I can't find them in the source code. Looking at the objects in the glibc-static-2.28.9000-28.fc30.i686.rpm I can see a .text.unliklely.group with these contents: .text.unliklely .gnu.build.attributes.unliklely .rel.gnu.build.attributes.unliklely .gnu.build.attributes..text.unliklely .rel.gnu.build.attributes..text.unliklely .text.unliklely .text.unliklely .text.unliklely.zzz I think that the .gnu.build.attributes sections are not yet part of gcc trunk. There is a plugin mentioned in https://fedoraproject.org/wiki/Toolchain/Watermark so it is possible that these groups are only used when this plugin is used. As this is glibc then it would make lld unusable on the latest Fedora distributions. It would be good to try and find out why these groups are being created and whether it is down to the gcc plugin https://bugzilla.redhat.com/show_bug.cgi?id=1451407 mentioned in the Watermark link. I've not had a chance to look over the code in fine detail yet. At a quick glance:
Comment Actions Thanks @psmith for the context. I just found the culprit line in gas assembler: https://github.com/bminor/binutils-gdb/blob/502c64b9ac12cf2a35d3cb55c51e2eefd33a2494/bfd/elf.c#L3590 But as mentionned by @ruiu, I cannot find any evidence of this being a standard behavior :-/ For instance MC/ELFObjectWriter.cpp unconditionnaly write all group sections as COMDAT. Comment Actions I can confirm that the group sections are coming from the annobin tool. "attach""no-attach" When gcc compiles code with the -ffunction-sections option active it will place each function into its own section. When the annobin attach option is active the plugin will attempt to attach the function section to a group containing the notes and relocations for the function. In that way, if the linker decides to discard the function, it will also know that it should discard the notes and relocations as well. The default is to enable attach, but the inverse option is available in case the host assembler does not support the .attach_to_group pseudo-op. If this feature is disabled then note generation for function sections will not work properly. From https://developers.redhat.com/blog/2018/02/20/annobin-storing-information-binaries/ this appears to be on by default when building Redhat packages. Both gold and ld.bfd appear to take into account groups when doing garbage collection. As it stands the patch would permit programs to link correctly, but if --gc-sections were on then LLD's implementation wouldn't throw away the .gnu.build.attributes sections (they are not SHF_ALLOC so are always marked live). This would lead to the tools that read the build information potentially giving incorrect results for some programs. How much of a problem this is would depend on the program, and how widely the watermark system is deployed. Comment Actions I agree with Rui. My understanding is that groups in ELF were designed specifically to support C++ templates and inline functions which is why COMDAT groups are the only allowed kind. Comment Actions As a follow up to this review (and the original bug), a thread started on the binutils mlist: https://www.sourceware.org/ml/binutils/2019-01/msg00046.html A possible reading of the standard is that flags are additive and the absence of flag - i.e. 0, is a valid value. Comment Actions The wording of the standard is unfortunate. This has been brought up and clarified (that COMDATs are the only legal groups currently) on the list previously. Comment Actions https://groups.google.com/d/msg/generic-abi/_CbBM6T6WeM/cSELn86gAQAJ What I think is happening here is that a mechanism, SHF_LINK_ORDER, was introduced into ELF for marking sections as associated with other sections for the purpose of garbage collection (dead/unused section removal). However, about the same time the GUI toolchain started using non-COMDAT groups in ELF to accomplish the same goal. In order to resolve this we will either need to get agreement from GNU to use SHF_LINK_ORDER instead or we will need to implement support for non-COMDAT ELF groups in LLVM in order to be compatible. Comment Actions @ruiu given you answer to the thread above, I understand we can go on with that review. Anything you're expecting in addition to the current patch? Comment Actions I've had a look at the code in a bit more detail and have left some comments. I think we should state somewhere, either as a comment or in a commit message about how we handle garbage collection/icf for Section Groups. As it stands LLD marks all non-SHF_ALLOC sections as live so the primary use case for the non-comdat section groups (ensure removal of function removes all the build notes associated with it) isn't going to happen.
Comment Actions Given the discussion at the generic-abi mailing list, I'm fine with handling a group with no flags. However, I'd like you to add more code to this patch so that a group with no flags is actually handled as a group by garbage collector. Do you mind if I ask you do that? Comment Actions I *believe* that the following strategy seems like a good way to implement the feature (but I didn't try it personally so if you find it unable to work, take another path): Every input section have a list of DependentSections. Usually the list is empty, but if the list is not empty, the GC handles it as edges when doing the mark-sweep garbage collection. I think you can represent a group with DependentSections. If one section in a group is live, all sections in the same group are live. You can pick the first section (an arbitrary section) as a "leader" in a group and add all sections in the group to its DependentSection, and add the leader to every member's DependentSection. Comment Actions I strongly feel that we shouldn't implement this. This will tie groups and --gc-sections together when they are orthogonal features; e.g. COMDAT groups will *also* have to be considered by --gc-sections as a single unit. The ability to strip individual sections form COMDAT groups is an important feature. I will add similar comment to the abi list. I'm surprised that gold implements this behavior, back in 2017 gold and bfd-ld disagreed on this. Comment Actions Added rough support for dependencies withing a group. The test case I'm interested in focuses on SHT_NOTE within the same group as text sections. This aprt of the code is somehow clumsy, I'm eager to read your feedbacks. Comment Actions Given the comments from bd1976llvm about the intention vs the wording of the ELF specification, and the restriction in this patch of the behaviour to non-comdat groups (assuming intentional) then I think we should take a step back and decide why we want to make the change and what the requirements are. I think that if we are taking the annobin interpretation of the specification with respect to garbage collection and what to be strictly compliant then we should apply the behaviour to all groups. Another interpretation is that only use case for non-comdat groups is to affect garbage collection so we can handle them differently to comdat groups; given the only use case I've seen in many years is annobin then this could be low risk without adding group member squared extra dependencies for all comdat groups. Alternatively if we just want to support annobin then there may be a better way of doing this without involving groups. There is a relocation from each SHT_NOTE section to the code section that it describes. It could be possible to handle these in the same way as .ARM.exidx sections by making the SHT_NOTE section from the group dependent on the code section it relocates against. If we did that then you'd only need to preserve the SHF_GROUP flag on the SHT_NOTES section and wouldn't need to make all the sections in the group depend on each other.
Comment Actions Partial support of SHT_GROUP without flag This does *not* implement full SHT_GROUP semantic, yet it is a simple step forward: @psmith considering your remark and the one from @bd1976llvm I 'd rather split the patch in two. This implements basic and partial support for SHT_GROUP. Instead of raising an error, it just acepts the sections as regular sections, and does not implement the dependency part. We can settle on a better support for annobin in another patch, but at least with this patch lld can be used as a normal linker on fedora. Comment Actions I'm happy to split the patch into basic support and consider how we support GC separately. Comment Actions I'm fine with just skipping a group that has no flags, but looks like to me this patch does it in a little complicated way. Do you mind if I ask you to simplify it? I'll also take a quick look at how to simplify it. Comment Actions Does this work for you? https://gist.github.com/rui314/dc6d771f2fd9d4cb9f65ef6a970488b0 Comment Actions @ruiu It works fine, I just moved the comdat-related insertion after the flag check. It compiles and validates fine on my setup. Comment Actions LGTM
Comment Actions MSVC is printing lots of warnings about getShtGroupEntries(): https://logs.chromium.org/logs/chromium/bb/tryserver.chromium.win/win_upload_clang/471/+/recipes/steps/package_clang/0/stdout c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(265): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(265): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(265): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(265): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\ELF\InputFiles.cpp(304): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\ELF\InputFiles.cpp(304): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\ELF\InputFiles.cpp(304): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\ELF\InputFiles.cpp(304): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Casting.h(58): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Casting.h(58): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Casting.h(58): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Casting.h(58): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/ADT/STLExtras.h(125): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/ADT/STLExtras.h(125): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/ADT/STLExtras.h(125): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/ADT/STLExtras.h(125): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Error.h(790): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Error.h(790): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Error.h(790): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\llvm\include\llvm/Support/Error.h(790): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\depot_tools\win_toolchain\vs_files\818a152b3f1da991c1725d85be19a0f27af6bab4\win_sdk\bin\..\..\VC\Tools\MSVC\14.16.27023\include\type_traits(16707566): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\depot_tools\win_toolchain\vs_files\818a152b3f1da991c1725d85be19a0f27af6bab4\win_sdk\bin\..\..\VC\Tools\MSVC\14.16.27023\include\type_traits(16707566): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,false>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF32BE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\depot_tools\win_toolchain\vs_files\818a152b3f1da991c1725d85be19a0f27af6bab4\win_sdk\bin\..\..\VC\Tools\MSVC\14.16.27023\include\type_traits(16707566): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::little,1>> lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::little,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64LE>::getShtGroupEntries' C:\b\rr\tmpd0_670\w\src\third_party\depot_tools\win_toolchain\vs_files\818a152b3f1da991c1725d85be19a0f27af6bab4\win_sdk\bin\..\..\VC\Tools\MSVC\14.16.27023\include\type_traits(16707566): warning C4661: 'llvm::ArrayRef<llvm::support::detail::packed_endian_specific_integral<uint32_t,llvm::support::big,1>> lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries(const llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::big,true>> &)': no suitable definition provided for explicit template instantiation request c:\b\rr\tmpd0_670\w\src\third_party\llvm\tools\lld\elf\InputFiles.h(187): note: see declaration of 'lld::elf::ObjFile<llvm::object::ELF64BE>::getShtGroupEntries' It's probably complaining that a template function is defined out of line. Comment Actions Thank you for the heads-up. That function is gone, so we needed to remove that function from the header. I'll do that. |