diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-08-03 08:22:00 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-08-03 08:22:00 +0000 |
commit | 25e63063e3a2817fd56fd47fffb11173472a15de (patch) | |
tree | 810a1072b6dc07268e08528eb640f083489e9092 /BaseTools/Scripts | |
parent | cdeb268cb0c2d1a1a80ac3c7edc83c6c535cdc7f (diff) | |
download | edk2-platforms-25e63063e3a2817fd56fd47fffb11173472a15de.tar.xz |
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18133 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Scripts')
-rw-r--r-- | BaseTools/Scripts/gcc-4K-align-ld-script | 5 | ||||
-rw-r--r-- | BaseTools/Scripts/gcc4.4-ld-script | 5 | ||||
-rw-r--r-- | BaseTools/Scripts/gcc4.9-ld-script | 5 |
3 files changed, 3 insertions, 12 deletions
diff --git a/BaseTools/Scripts/gcc-4K-align-ld-script b/BaseTools/Scripts/gcc-4K-align-ld-script index 3ed1c12fb8..34957a5314 100644 --- a/BaseTools/Scripts/gcc-4K-align-ld-script +++ b/BaseTools/Scripts/gcc-4K-align-ld-script @@ -7,6 +7,7 @@ SECTIONS {
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data : ALIGN(0x1000)
{
@@ -20,10 +21,6 @@ SECTIONS {
KEEP (*(.eh_frame))
}
- .got : ALIGN(0x1000)
- {
- *(.got .got.*)
- }
.rela : ALIGN(0x1000)
{
*(.rela .rela.*)
diff --git a/BaseTools/Scripts/gcc4.4-ld-script b/BaseTools/Scripts/gcc4.4-ld-script index 0d86908d0b..48320c6611 100644 --- a/BaseTools/Scripts/gcc4.4-ld-script +++ b/BaseTools/Scripts/gcc4.4-ld-script @@ -7,6 +7,7 @@ SECTIONS {
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data ALIGN(0x20) :
{
@@ -20,10 +21,6 @@ SECTIONS {
KEEP (*(.eh_frame))
}
- .got ALIGN(0x20) :
- {
- *(.got .got.*)
- }
.rela ALIGN(0x20) :
{
*(.rela .rela.*)
diff --git a/BaseTools/Scripts/gcc4.9-ld-script b/BaseTools/Scripts/gcc4.9-ld-script index 207b9e1dc7..3dff0b2907 100644 --- a/BaseTools/Scripts/gcc4.9-ld-script +++ b/BaseTools/Scripts/gcc4.9-ld-script @@ -7,6 +7,7 @@ SECTIONS {
*(.text .stub .text.* .gnu.linkonce.t.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
+ *(.got .got.*)
}
.data ALIGN(0x40) :
{
@@ -20,10 +21,6 @@ SECTIONS {
KEEP (*(.eh_frame))
}
- .got ALIGN(0x20) :
- {
- *(.got .got.*)
- }
.rela ALIGN(0x20) :
{
*(.rela .rela.*)
|