diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-27 12:08:20 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-02 10:58:25 +0200 |
commit | b89919ee8f8c9441c3514a3c5f352c0901103569 (patch) | |
tree | 14149620e7270025332148720812f6c23d906867 /BaseTools/Conf/build_rule.template | |
parent | 026a82abf0bd6268d32f4559dbede00715264f74 (diff) | |
download | edk2-platforms-b89919ee8f8c9441c3514a3c5f352c0901103569.tar.xz |
BaseTools AARCH64: override XIP module linker alignment to 32 bytes
Now that GenFw converts small code model ADRP instructions to ADR on
the fly, we can reduce the alignment for XIP modules, where large
alignment values may cause considerable waste of flash space due to
excessive padding. This limits the module size to 1 MB, but this is
not a concern in practice.
So set the XIP section alignment to 0x20 for DEBUG_GCC49, DEBUG_GCC5
and *_CLANG35, all of which use the small code model.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'BaseTools/Conf/build_rule.template')
-rw-r--r-- | BaseTools/Conf/build_rule.template | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index eb4ae749fd..9adf3918e4 100644 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -310,6 +310,21 @@ "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
+[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, Static-Library-File.PEIM.AARCH64]
+ <InputFile>
+ *.lib
+
+ <ExtraDependency>
+ $(MAKE_FILE)
+
+ <OutputFile>
+ $(DEBUG_DIR)(+)$(MODULE_NAME).dll
+
+ <Command.GCC, Command.GCCLD>
+ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
+ "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
+
+
[Static-Library-File.USER_DEFINED]
<InputFile>
*.lib
|