New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Studio 2022 lld-link: warning/error: ignoring unknown debug$S subsection kind 0xFF in file libucrt.lib
#56285
Visual Studio 2022 lld-link: warning/error: ignoring unknown debug$S subsection kind 0xFF in file libucrt.lib
#56285
Comments
@llvm/issue-subscribers-lld-coff |
This suggests that Microsoft has added additional subsection kinds: +various others @zmodem @ZequanWu @alanzhao1 |
Can @StephanTLavavej @gratianlup help here? |
lld-link: warning/error: ignoring unknown debug$S subsection kind 0xFF in file libucrt.lib
@aganea I'm very unfamiliar with this area (as I work on the STL), but @rnk's link helped me find the latest enumerators in the internal repo. I know less about XFG than I do about quantum mechanics, so that's all the info I can provide - but I'll mail the backend devs and ask if someone can comment here. Hope this helps! |
Thanks! XFG appears to be for Xtended Flow Guard, so another security hardening technology similar to Control Flow Guard (CFG), which LLD does not yet implement. I think we should:
It would be nice if LLD had a warning suppression infrastructure to allow users to suppress individual warnings if this comes up again in the future, but to date the whole idea has been that it's a linker, it shouldn't have warnings, only errors, so there is no infrastructure to leverage for that purpose. In the absence of such functionality, I'm glad we have the warning, so I'd like to keep it so we find out about future debug subsection additions. |
Posted a diff here: https://reviews.llvm.org/D129378 I know it needs a test as well - but I couldn't find where other flags that are ignored was tested, so any pointers on how to test it similar to other things that are ignored it would be great. |
/cherry-pick 576375a |
/branch llvm/llvm-project-release-prs/issue56285 |
/pull-request llvm/llvm-project-release-prs#73 |
These are new debug types that ships with the latest Windows SDK and would warn and finally fail lld-link. The symbols seems to be related to Microsoft's XFG which is their version of CFG. We can't handle any of this yet, so for now we can just ignore these types so that lld doesn't fail with a new version of Windows SDK. Fixes: #56285 Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D129378 (cherry picked from commit 576375a)
….visualstudio.com/t/lots-of-lld-link-warnings-about-PDB-with/1667797> is no longer needed, but now we are hitting <llvm/llvm-project#56285> which requires the exact same work-around. Progress, I guess /o\. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@17700 56274372-70c3-4bfc-bfc3-4c3a0b034d27
I got an impression that linker (lld-link) warnings result in non-zero error code returned by the linker console application. This breaks some of our CI builds. |
@kuzminrobin The user has control of whether warnings should be errors via the /WX flag, which should do what you need. |
Looks like I was wrong. The exit code of Looks like the problem with our CI build is related to the output to the |
Related to actions/runner-images#5813
Problem
We started seeing
lld-link: warning/error: ignoring unknown debug$S subsection kind 0xFF in file libucrt.lib
with newer windows-sdks in visual studio 2022 (this does not happen with vs2019)Is the following a problem in windows-sdks with vs2022 or in lld-link?
example.c
Invoke-CmdScript (click me)
With a previous win-sdk version:
10.0.19041.0
With newer win-sdk version (WX made warnings errors)
llvm version
The text was updated successfully, but these errors were encountered: