aboutsummaryrefslogtreecommitdiff
path: root/bl32
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2020-03-26 10:57:12 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2020-04-02 13:30:17 +0900
commit0a0a7a9ac82cb79af91f098cedc69cc67bca3978 (patch)
treef20e3a4f33e02cafc1c6f888c2c6567938795ed4 /bl32
parent9fb288a03ed2ced7706defbbf78f008e921e17e2 (diff)
downloadarm-trusted-firmware-0a0a7a9ac82cb79af91f098cedc69cc67bca3978.tar.gz
linker_script: replace common read-only data with RODATA_COMMON
The common section data are repeated in many linker scripts (often twice in each script to support SEPARATE_CODE_AND_RODATA). When you add a new read-only data section, you end up with touching lots of places. After this commit, you will only need to touch bl_common.ld.h when you add a new section to RODATA_COMMON. Replace a series of RO section with RODATA_COMMON, which contains 6 sections, some of which did not exist before. This is not a big deal because unneeded data should not be compiled in the first place. I believe this should be controlled by BL*_SOURCES in Makefiles, not by linker scripts. When I was working on this commit, the BL1 image size increased due to the fconf_populator. Commit c452ba159c14 ("fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES") fixed this issue. I investigated BL1, BL2, BL2U, BL31 for plat=fvp, and BL2-AT-EL3, BL31, BL31 for plat=uniphier. I did not see any more unexpected code addition. Change-Id: I5d14d60dbe3c821765bce3ae538968ef266f1460 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'bl32')
-rw-r--r--bl32/sp_min/sp_min.ld.S9
-rw-r--r--bl32/tsp/tsp.ld.S4
2 files changed, 4 insertions, 9 deletions
diff --git a/bl32/sp_min/sp_min.ld.S b/bl32/sp_min/sp_min.ld.S
index d83b4e018..f652f17e2 100644
--- a/bl32/sp_min/sp_min.ld.S
+++ b/bl32/sp_min/sp_min.ld.S
@@ -48,10 +48,7 @@ SECTIONS
__RODATA_START__ = .;
*(.rodata*)
- RT_SVC_DESCS
- FCONF_POPULATOR
- PMF_SVC_DESCS
- CPU_OPS
+ RODATA_COMMON
/* Place pubsub sections for events */
. = ALIGN(8);
@@ -67,9 +64,7 @@ SECTIONS
*(.text*)
*(.rodata*)
- RT_SVC_DESCS
- FCONF_POPULATOR
- CPU_OPS
+ RODATA_COMMON
/* Place pubsub sections for events */
. = ALIGN(8);
diff --git a/bl32/tsp/tsp.ld.S b/bl32/tsp/tsp.ld.S
index b1ec42350..b071e82fd 100644
--- a/bl32/tsp/tsp.ld.S
+++ b/bl32/tsp/tsp.ld.S
@@ -37,7 +37,7 @@ SECTIONS
__RODATA_START__ = .;
*(.rodata*)
- GOT
+ RODATA_COMMON
. = ALIGN(PAGE_SIZE);
__RODATA_END__ = .;
@@ -49,7 +49,7 @@ SECTIONS
*(.text*)
*(.rodata*)
- GOT
+ RODATA_COMMON
*(.vectors)