Revision: 18133
http://sourceforge.net/p/edk2/code/18133
Author: abiesheuvel
Date: 2015-08-03 08:22:00 +0000 (Mon, 03 Aug 2015)
Log Message:
-----------
BaseTools IA32/X64: move .got contents to the PE/COFF .text section
Move the .got contents to the PE/COFF .text section. This should be
a no-op, since we typically don't generate position independent code
(i.e., using -fPIC). But since the GOT contains variable addresses that
are updated at relocation time only, its contents are best kept in .text
to prevent them from being overwritten inadvertently.
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/gcc-4K-align-ld-script
trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script
trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script
Modified: trunk/edk2/BaseTools/Scripts/gcc-4K-align-ld-script
===================================================================
--- trunk/edk2/BaseTools/Scripts/gcc-4K-align-ld-script 2015-08-03 08:21:49 UTC
(rev 18132)
+++ trunk/edk2/BaseTools/Scripts/gcc-4K-align-ld-script 2015-08-03 08:22:00 UTC
(rev 18133)
@@ -7,6 +7,7 @@
{
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data : ALIGN(0x1000)
{
@@ -20,10 +21,6 @@
{
KEEP (*(.eh_frame))
}
- .got : ALIGN(0x1000)
- {
- *(.got .got.*)
- }
.rela : ALIGN(0x1000)
{
*(.rela .rela.*)
Modified: trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script
===================================================================
--- trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script 2015-08-03 08:21:49 UTC
(rev 18132)
+++ trunk/edk2/BaseTools/Scripts/gcc4.4-ld-script 2015-08-03 08:22:00 UTC
(rev 18133)
@@ -7,6 +7,7 @@
{
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data ALIGN(0x20) :
{
@@ -20,10 +21,6 @@
{
KEEP (*(.eh_frame))
}
- .got ALIGN(0x20) :
- {
- *(.got .got.*)
- }
.rela ALIGN(0x20) :
{
*(.rela .rela.*)
Modified: trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script
===================================================================
--- trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script 2015-08-03 08:21:49 UTC
(rev 18132)
+++ trunk/edk2/BaseTools/Scripts/gcc4.9-ld-script 2015-08-03 08:22:00 UTC
(rev 18133)
@@ -7,6 +7,7 @@
{
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data ALIGN(0x40) :
{
@@ -20,10 +21,6 @@
{
KEEP (*(.eh_frame))
}
- .got ALIGN(0x20) :
- {
- *(.got .got.*)
- }
.rela ALIGN(0x20) :
{
*(.rela .rela.*)
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits