1
Fork 0

linker: Use data execution prevention options by default when linker supports them

This commit is contained in:
Vadim Petrochenkov 2021-03-28 23:18:39 +03:00
parent 4a20eb6a9d
commit cc5392e76b
11 changed files with 23 additions and 73 deletions

View file

@ -1651,6 +1651,10 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
cmd.add_eh_frame_header();
}
// NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
// Make the binary compatible with data execution prevention schemes.
cmd.add_no_exec();
// NO-OPT-OUT, OBJECT-FILES-NO
// Avoid linking to dynamic libraries unless they satisfy some undefined symbols
// at the point at which they are specified on the command line.