Skip to content
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

fix: suppress linker warnings exposed by nightly rustc change #279

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

wmmc88
Copy link
Collaborator

@wmmc88 wmmc88 commented Jan 27, 2025

This pull request includes changes to the crates/wdk-build/src/lib.rs file to address linker warnings when building Windows drivers. The most important changes involve adding linker arguments to ignore specific warnings that are safe to ignore.

These warnings were exposed by a change in nightly toolchain. Even though the change has been since downgraded to allow by default, we should still explicitly ignore these linker warnings since they are safe to ignore.

Linker warning suppression:

  • Added linker argument to ignore LNK4257: object file was not compiled for kernel mode; the image might not run for both Kernel Mode Driver Framework (KMDF) and Windows Driver Model (WDM) configurations. (crates/wdk-build/src/lib.rs, [1] [2]
  • Added linker argument to ignore LNK4216: Exported entry point DriverEntry for the WDM configuration. (crates/wdk-build/src/lib.rs, crates/wdk-build/src/lib.rsR716-R724)

@wmmc88 wmmc88 requested review from Copilot and a team January 27, 2025 22:29
@wmmc88 wmmc88 added this pull request to the merge queue Jan 28, 2025
@wmmc88 wmmc88 removed the request for review from Copilot January 28, 2025 23:30
Merged via the queue into microsoft:main with commit 54b0fd4 Jan 28, 2025
62 checks passed
@wmmc88 wmmc88 deleted the linker-warnings branch January 28, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants