Revision: 18130
          http://sourceforge.net/p/edk2/code/18130
Author:   abiesheuvel
Date:     2015-08-03 08:21:28 +0000 (Mon, 03 Aug 2015)
Log Message:
-----------
BaseTools IA32/X64: remove NOP padding from X86/IA32 GCC linker scripts

The NOP padding in the GCC linker scripts ensures that all empty
regions in the ELF binary are filled with x86 NOP instructions.

There is no upside to doing this: if the CPU ends up executing these
instructions, we have little hope of resuming normal execution of the
program anyway. And having NOP slides in memory only makes it easier
for attackers to launch exploits. So remove them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Tested-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script
    trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script

Modified: trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script
===================================================================
--- trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script       2015-08-03 07:14:11 UTC 
(rev 18129)
+++ trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script       2015-08-03 08:21:28 UTC 
(rev 18130)
@@ -7,7 +7,7 @@
   {
     *(.text .stub .text.* .gnu.linkonce.t.*)
     . = ALIGN(0x20);
-  } =0x90909090
+  }
   .data ALIGN(0x20) :
   {
     *(

Modified: trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script
===================================================================
--- trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script       2015-08-03 07:14:11 UTC 
(rev 18129)
+++ trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script       2015-08-03 08:21:28 UTC 
(rev 18130)
@@ -7,7 +7,7 @@
   {
     *(.text .stub .text.* .gnu.linkonce.t.*)
     . = ALIGN(0x20);
-  } =0x90909090
+  }
   .data ALIGN(0x40) :
   {
     *(


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to