diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-09-16 18:39:35 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-18 02:17:26 +0000 |
commit | 170fa8ecd4bc5acb704400c5610365acff6a78e8 (patch) | |
tree | 39e65c672131a74efdd181bfcc7307bcc6b893bd /BaseTools | |
parent | 779642283a604370cef87fcd9bf730425f519147 (diff) | |
download | edk2-170fa8ecd4bc5acb704400c5610365acff6a78e8.tar.gz edk2-170fa8ecd4bc5acb704400c5610365acff6a78e8.tar.bz2 edk2-170fa8ecd4bc5acb704400c5610365acff6a78e8.zip |
BaseTools/tools_def ARM: Disable stack protector with CLANGDWARF
Clang insists on emitting a movt/movw pair into the function
pro/epilogues to load the stack protector reference value from memory,
and this movt/movw pair may turn out non-consecutively in the
instruction stream.
The resulting symbol reference cannot be fixed up by GenFw, as PE/COFF
always treats movt/movw as a pair, and the ELF-to-PE conversion will
therefore fail.
Just disable the stack protector when using CLANGDWARF.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'BaseTools')
-rwxr-xr-x | BaseTools/Conf/tools_def.template | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 87f035a56e..0f110fbb4a 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2096,7 +2096,7 @@ NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fu # CLANGDWARF ARM definitions
##################
DEFINE CLANGDWARF_ARM_TARGET = -target arm-linux-gnueabi
-DEFINE CLANGDWARF_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) DEF(CLANGDWARF_ARM_TARGET) DEF(CLANGDWARF_WARNING_OVERRIDES) -mno-movt
+DEFINE CLANGDWARF_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) DEF(CLANGDWARF_ARM_TARGET) DEF(CLANGDWARF_WARNING_OVERRIDES) -mno-movt -fno-stack-protector
DEFINE CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS)
*_CLANGDWARF_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS)
|