diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-10-01 14:01:07 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-10-01 14:01:07 +0000 |
commit | 64a63d6942532da9d162df676f2dd9e6c576921a (patch) | |
tree | 28e3efc9e7d7523971279c3cf884db2b05622372 /BaseTools/Conf | |
parent | ddd89cd50dd3a989e58a75ed38011168e3ec0954 (diff) | |
download | edk2-64a63d6942532da9d162df676f2dd9e6c576921a.zip edk2-64a63d6942532da9d162df676f2dd9e6c576921a.tar.gz edk2-64a63d6942532da9d162df676f2dd9e6c576921a.tar.bz2 |
BaseTools/ARM: move to unified GCC linker script
Instead of using the ARM builtin linker script for GNU ld, use the
new unified one instead. This will allow us to increase the section
alignment for DXE_RUNTIME_MODULEs, which is a prerequisite for
enabling the UEFIv2.5 Properties Table memory protection feature.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18565 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf')
-rw-r--r-- | BaseTools/Conf/tools_def.template | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index cf49144..1f9b89d 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3817,7 +3817,7 @@ DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie DEFINE GCC_DLINK2_FLAGS_COMMON = --script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections
DEFINE GCC_ARM_AARCH64_DLINK_COMMON= --emit-relocs -nostdlib --gc-sections -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
-DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -Ttext=0x0
+DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20
DEFINE GCC_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20
DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) --entry ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
@@ -3871,6 +3871,7 @@ DEFINE GCC46_ASM_FLAGS = DEF(GCC45_ASM_FLAGS) DEFINE GCC46_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
DEFINE GCC46_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector
DEFINE GCC46_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) --oformat=elf32-littlearm
+DEFINE GCC46_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x220
DEFINE GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS) --oformat=elf32-littlearm
DEFINE GCC47_IA32_CC_FLAGS = DEF(GCC46_IA32_CC_FLAGS)
@@ -3887,6 +3888,7 @@ DEFINE GCC47_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GC DEFINE GCC47_ARM_CC_FLAGS = DEF(GCC46_ARM_CC_FLAGS) -mno-unaligned-access
DEFINE GCC47_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS)
DEFINE GCC47_ARM_DLINK_FLAGS = DEF(GCC46_ARM_DLINK_FLAGS)
+DEFINE GCC47_ARM_DLINK2_FLAGS = DEF(GCC46_ARM_DLINK2_FLAGS)
DEFINE GCC47_AARCH64_DLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS)
DEFINE GCC47_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x228
DEFINE GCC47_ARM_ASLDLINK_FLAGS = DEF(GCC46_ARM_ASLDLINK_FLAGS)
@@ -3906,6 +3908,7 @@ DEFINE GCC48_AARCH64_ASM_FLAGS = DEF(GCC47_AARCH64_ASM_FLAGS) DEFINE GCC48_ARM_CC_FLAGS = DEF(GCC47_ARM_CC_FLAGS)
DEFINE GCC48_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS)
DEFINE GCC48_ARM_DLINK_FLAGS = DEF(GCC47_ARM_DLINK_FLAGS)
+DEFINE GCC48_ARM_DLINK2_FLAGS = DEF(GCC47_ARM_DLINK2_FLAGS)
DEFINE GCC48_AARCH64_DLINK_FLAGS = DEF(GCC47_AARCH64_DLINK_FLAGS)
DEFINE GCC48_AARCH64_DLINK2_FLAGS = DEF(GCC47_AARCH64_DLINK2_FLAGS)
DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC47_ARM_ASLDLINK_FLAGS)
@@ -3925,6 +3928,7 @@ DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS) DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS)
DEFINE GCC49_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS)
DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS)
+DEFINE GCC49_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS)
DEFINE GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS)
DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS)
@@ -4250,6 +4254,7 @@ DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS) *_GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC46_ARM_ASLDLINK_FLAGS)
*_GCC46_ARM_ASM_FLAGS = DEF(GCC46_ARM_ASM_FLAGS)
*_GCC46_ARM_DLINK_FLAGS = DEF(GCC46_ARM_DLINK_FLAGS)
+*_GCC46_ARM_DLINK2_FLAGS = DEF(GCC46_ARM_DLINK2_FLAGS)
*_GCC46_ARM_PLATFORM_FLAGS = -march=armv7-a
*_GCC46_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC46_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
@@ -4349,6 +4354,7 @@ RELEASE_GCC46_ARM_CC_FLAGS = DEF(GCC46_ARM_CC_FLAGS) -D__ARM_FEATURE_UNALI *_GCC47_ARM_ASLDLINK_FLAGS = DEF(GCC47_ARM_ASLDLINK_FLAGS)
*_GCC47_ARM_ASM_FLAGS = DEF(GCC47_ARM_ASM_FLAGS)
*_GCC47_ARM_DLINK_FLAGS = DEF(GCC47_ARM_DLINK_FLAGS)
+*_GCC47_ARM_DLINK2_FLAGS = DEF(GCC47_ARM_DLINK2_FLAGS)
*_GCC47_ARM_PLATFORM_FLAGS = -march=armv7-a
*_GCC47_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC47_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
@@ -4475,6 +4481,7 @@ RELEASE_GCC47_AARCH64_CC_FLAGS = DEF(GCC47_AARCH64_CC_FLAGS) -Wno-unused-but-s *_GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS)
*_GCC48_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS)
*_GCC48_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS)
+*_GCC48_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
*_GCC48_ARM_PLATFORM_FLAGS = -march=armv7-a
*_GCC48_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC48_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
@@ -4601,6 +4608,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s *_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
*_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
*_GCC49_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
+*_GCC49_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS)
*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
*_GCC49_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC49_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
|