summaryrefslogtreecommitdiff
path: root/BaseTools/Conf
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-09-24 19:35:16 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-09-24 19:35:16 +0000
commit0bd0d6dff6d34b0c6abfb87d73f2a5973e3cd273 (patch)
tree9b4c07e9e03109b0dd126a709f622fc3a827b674 /BaseTools/Conf
parent0c960e86c22c46c002b257c4ba3500d1fba03c26 (diff)
downloadedk2-platforms-0bd0d6dff6d34b0c6abfb87d73f2a5973e3cd273.tar.xz
BaseTools/GenFw: disable RVCT linker size optimization
Disable the RVCT size optimization that may put sections at an offset that is not aligned to their own alignment, by adding the --no_legacyalign switch to the RVCT linker command line. This is necessary since such sections cannot be correctly converted into PE/COFF sections without padding them at the front, which defeats the purpose of the optimization anyway. With the optimization gone, we can also remove the special case for ARM in GenFw that could result in corrupt PE/COFF images to be emitted. Instead, sections whose base address is not aligned correctly are outright rejected. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18540 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf')
-rw-r--r--BaseTools/Conf/tools_def.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index aa2b6b1488..cf4914415e 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -6609,7 +6609,7 @@ RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -W
DEFINE RVCT_ALL_ASM_FLAGS = --diag_suppress=1786 --diag_error=warning --apcs /interwork
DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_suppress=186 --diag_warning 167 --diag_error=warning --diag_style=ide --protect_stack
-DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide
+DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide --no_legacyalign
####################################################################################
#