-
Notifications
You must be signed in to change notification settings - Fork 206
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
Enable -pie and -z,relro,-z,now for NativeAOT binaries #1739
Conversation
Fixes binskim warning BA3001 and BA3011 Contributes to #1738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Hi, any way to disable these options? Other things might not work with pie binaries so wondering whether I can disable those linker options? |
I do think there is an easy way to suppress this option today. We would be happy to accept a PR to add |
I assume you are missing a "not" there? |
Yes, of course... |
Does this match what you were thinking of? Unfortunately I am failing to make my project work with the local build of nativeaot so can't really test it. |
I think this can be just one-line change for the
Do you really need to control the other command line options too? If yes, the msbuild property should have different name. |
I guess not but I feel like they all belong together hence why I included them all. Happy to only do pie if you prefer that. |
All of these options are related to security hardening of the final binary. We strongly prefer .NET (and NativeAOT in particular) to have security hardening enabled if possible. So it is preferable to just omit the one option that is causing problems. |
Yeah sure, have created dotnet/runtime#64580 |
Fixes binskim warning BA3001 and BA3011
Contributes to dotnet/runtime#96848