summaryrefslogtreecommitdiff
path: root/bl32
diff options
context:
space:
mode:
authorJoanna Farley <joanna.farley@arm.com>2023-04-26 13:20:23 +0200
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2023-04-26 13:20:23 +0200
commit89bc91a1ad68af547d77dfa008eb4f10b1639167 (patch)
treecc6e531f4530e8f9a7001c0018e9e6854c6bc4fa /bl32
parent44fcbb4a121fdb9ec7d41d7b928f5f224f81e8df (diff)
parent2ed0936dd07da8faed8748ac7e7eb5433c4c5081 (diff)
Merge changes from topic "align-sections" into integration
* changes: build(trp): sort sections by alignment by default build(tsp): sort sections by alignment by default build(sp-min): sort sections by alignment by default build(bl31): sort sections by alignment by default build(bl2u): sort sections by alignment by default build(bl2): sort sections by alignment by default
Diffstat (limited to 'bl32')
-rw-r--r--bl32/sp_min/sp_min.mk6
-rw-r--r--bl32/tsp/tsp.mk6
2 files changed, 12 insertions, 0 deletions
diff --git a/bl32/sp_min/sp_min.mk b/bl32/sp_min/sp_min.mk
index 0e5c1420c..fb0161c28 100644
--- a/bl32/sp_min/sp_min.mk
+++ b/bl32/sp_min/sp_min.mk
@@ -56,6 +56,12 @@ endif
BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/sp_min/sp_min.ld.S
+ifneq ($(findstring gcc,$(notdir $(LD))),)
+ BL32_LDFLAGS += -Wl,--sort-section=alignment
+else ifneq ($(findstring ld,$(notdir $(LD))),)
+ BL32_LDFLAGS += --sort-section=alignment
+endif
+
# Include the platform-specific SP_MIN Makefile
# If no platform-specific SP_MIN Makefile exists, it means SP_MIN is not supported
# on this platform.
diff --git a/bl32/tsp/tsp.mk b/bl32/tsp/tsp.mk
index cfffbdbed..4c1813118 100644
--- a/bl32/tsp/tsp.mk
+++ b/bl32/tsp/tsp.mk
@@ -24,6 +24,12 @@ BL32_SOURCES += bl32/tsp/aarch64/tsp_entrypoint.S \
BL32_DEFAULT_LINKER_SCRIPT_SOURCE := bl32/tsp/tsp.ld.S
+ifneq ($(findstring gcc,$(notdir $(LD))),)
+ BL32_LDFLAGS += -Wl,--sort-section=alignment
+else ifneq ($(findstring ld,$(notdir $(LD))),)
+ BL32_LDFLAGS += --sort-section=alignment
+endif
+
# This flag determines if the TSPD initializes BL32 in tspd_init() (synchronous
# method) or configures BL31 to pass control to BL32 instead of BL33
# (asynchronous method).