diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-03-26 13:16:33 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-04-02 13:38:24 +0900 |
commit | a7739bc7b16bf3e43f370864f8a800cf8943b391 (patch) | |
tree | bdd3f96b4e584eb3b4066a8244a388449e4cf8d6 /bl32 | |
parent | 0a0a7a9ac82cb79af91f098cedc69cc67bca3978 (diff) | |
download | arm-trusted-firmware-a7739bc7b16bf3e43f370864f8a800cf8943b391.tar.gz |
linker_script: move bss section to bl_common.ld.h
Move the bss section to the common header. This adds BAKERY_LOCK_NORMAL
and PMF_TIMESTAMP, which previously existed only in BL31. This is not
a big deal because unused data should not be compiled in the first
place. I believe this should be controlled by BL*_SOURCES in Makefiles,
not by linker scripts.
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.
The bss section has bigger alignment. I added BSS_ALIGN for this.
Currently, SORT_BY_ALIGNMENT() is missing in sp_min.ld.S, and with this
change, the BSS symbols in SP_MIN will be sorted by the alignment.
This is not a big deal (or, even better in terms of the image size).
Change-Id: I680ee61f84067a559bac0757f9d03e73119beb33
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'bl32')
-rw-r--r-- | bl32/sp_min/sp_min.ld.S | 15 | ||||
-rw-r--r-- | bl32/tsp/tsp.ld.S | 13 |
2 files changed, 2 insertions, 26 deletions
diff --git a/bl32/sp_min/sp_min.ld.S b/bl32/sp_min/sp_min.ld.S index f652f17e2..da005db64 100644 --- a/bl32/sp_min/sp_min.ld.S +++ b/bl32/sp_min/sp_min.ld.S @@ -107,20 +107,7 @@ SECTIONS __STACKS_END__ = .; } >RAM - /* - * The .bss section gets initialised to 0 at runtime. - * Its base address should be 8-byte aligned for better performance of the - * zero-initialization code. - */ - .bss (NOLOAD) : ALIGN(8) { - __BSS_START__ = .; - *(.bss*) - *(COMMON) - BAKERY_LOCK_NORMAL - PMF_TIMESTAMP - __BSS_END__ = .; - } >RAM - + BSS_SECTION >RAM XLAT_TABLE_SECTION >RAM __BSS_SIZE__ = SIZEOF(.bss); diff --git a/bl32/tsp/tsp.ld.S b/bl32/tsp/tsp.ld.S index b071e82fd..bf77c9234 100644 --- a/bl32/tsp/tsp.ld.S +++ b/bl32/tsp/tsp.ld.S @@ -97,18 +97,7 @@ SECTIONS __STACKS_END__ = .; } >RAM - /* - * The .bss section gets initialised to 0 at runtime. - * Its base address should be 16-byte aligned for better performance of the - * zero-initialization code. - */ - .bss : ALIGN(16) { - __BSS_START__ = .; - *(SORT_BY_ALIGNMENT(.bss*)) - *(COMMON) - __BSS_END__ = .; - } >RAM - + BSS_SECTION >RAM XLAT_TABLE_SECTION >RAM #if USE_COHERENT_MEM |