]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
build(trp): sort sections by alignment by default
authorChris Kay <chris.kay@arm.com>
Thu, 26 Jan 2023 18:31:52 +0000 (18:31 +0000)
committerChris Kay <chris.kay@arm.com>
Mon, 17 Apr 2023 16:15:35 +0000 (17:15 +0100)
This change forces LD to sort all input sections by alignment when
allocating them within an output section. This is done in some places
explicitly in the linker scripts today, but this makes sure we don't
miss any easy targets.

Change-Id: Ife89a8bb9e592b55c761d9a3dfefc2aeeb07802f
Signed-off-by: Chris Kay <chris.kay@arm.com>
services/std_svc/rmmd/trp/trp.mk

index e511bf5d147e7e51cd0fbc4bbe6e38b62d811477..b7bd31762db9f1553174c040fc7e3046f53e3f56 100644 (file)
@@ -10,6 +10,12 @@ RMM_SOURCES          +=      services/std_svc/rmmd/trp/trp_entry.S \
 
 RMM_DEFAULT_LINKER_SCRIPT_SOURCE := services/std_svc/rmmd/trp/linker.ld.S
 
+ifneq ($(findstring gcc,$(notdir $(LD))),)
+        RMM_LDFLAGS    +=      -Wl,--sort-section=alignment
+else ifneq ($(findstring ld,$(notdir $(LD))),)
+        RMM_LDFLAGS    +=      --sort-section=alignment
+endif
+
 # Include the platform-specific TRP Makefile
 # If no platform-specific TRP Makefile exists, it means TRP is not supported
 # on this platform.