Browse Source

* make stack non executable on arm-linux

git-svn-id: trunk@42539 -
florian 6 years ago
parent
commit
26acc8fb2a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/systems/t_linux.pas

+ 4 - 0
compiler/systems/t_linux.pas

@@ -371,6 +371,10 @@ begin
   else
   else
     platformopt:=' -b elf64-powerpc -m elf64ppc';
     platformopt:=' -b elf64-powerpc -m elf64ppc';
 {$endif powerpc64}
 {$endif powerpc64}
+{$ifdef arm}
+  platformopt:=' -z noexecstack';
+{$endif arm}
+
   with Info do
   with Info do
    begin
    begin
      ExeCmd[1]:='ld '+platform_select+platformopt+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP $LTO -L. -o $EXE';
      ExeCmd[1]:='ld '+platform_select+platformopt+' $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP $MAP $LTO -L. -o $EXE';