Skip to content

Commit

Permalink
Set noexecstack on NativeAOT-generated executables
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed Jan 19, 2022
1 parent b0de23b commit 2c1b40d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ The .NET Foundation licenses this file to you under the MIT license.
<LinkerArg Include="-Wl,-z,relro" Condition="'$(TargetOS)' != 'OSX'" />
<!-- binskim warning BA3011 The BIND_NOW flag is missing -->
<LinkerArg Include="-Wl,-z,now" Condition="'$(TargetOS)' != 'OSX'" />
<!-- binskim warning BA3006: The non-executable stack is not enabled -->
<LinkerArg Include="-Wl,-z,noexecstack" Condition="'$(TargetOS)' != 'OSX'" />
<LinkerArg Include="-Wl,-u,_CoreRT_StaticInitialization" Condition="'$(TargetOS)' == 'OSX' and '$(NativeLib)' == 'Shared'" />
<LinkerArg Include="-Wl,--require-defined,CoreRT_StaticInitialization" Condition="'$(TargetOS)' != 'OSX' and '$(NativeLib)' == 'Shared'" />

Expand Down

0 comments on commit 2c1b40d

Please sign in to comment.