aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2020-10-05 09:54:09 +0200
committerYann Gautier <yann.gautier@st.com>2020-10-05 10:48:05 +0200
commitb1f596b68b040cfcdb19d06252b2998e6354a36a (patch)
tree6986ef209e32c3f5628bf3e76a43eb6c9176fddf
parent5ecfd890707f4617205c02a2931bc94ac6c2b57f (diff)
downloadtrusted-firmware-a-b1f596b68b040cfcdb19d06252b2998e6354a36a.tar.gz
bl32: use SORT_BY_ALIGNMENT macro in sp_min.ld.S
The macro SORT_BY_ALIGNMENT is used for .text* and .rodata*. This allows reducing the space lost to object alignment. This is an alignment with the following patch: ebd6efae67c6a086bc97d807a638bde324d936dc Some comments are also aligned with other linker scripts. Change-Id: I2ea59edb445af0ed8c08fd883ffbf56852570d0c Signed-off-by: Yann Gautier <yann.gautier@st.com>
-rw-r--r--bl32/sp_min/sp_min.ld.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/bl32/sp_min/sp_min.ld.S b/bl32/sp_min/sp_min.ld.S
index 9e0596f1f0..5223915e59 100644
--- a/bl32/sp_min/sp_min.ld.S
+++ b/bl32/sp_min/sp_min.ld.S
@@ -22,14 +22,14 @@ MEMORY {
SECTIONS
{
. = BL32_BASE;
- ASSERT(. == ALIGN(PAGE_SIZE),
- "BL32_BASE address is not aligned on a page boundary.")
+ ASSERT(. == ALIGN(PAGE_SIZE),
+ "BL32_BASE address is not aligned on a page boundary.")
#if SEPARATE_CODE_AND_RODATA
.text . : {
__TEXT_START__ = .;
*entrypoint.o(.text*)
- *(.text*)
+ *(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@@ -46,7 +46,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
- *(.rodata*)
+ *(SORT_BY_ALIGNMENT(.rodata*))
RODATA_COMMON
@@ -61,8 +61,8 @@ SECTIONS
ro . : {
__RO_START__ = .;
*entrypoint.o(.text*)
- *(.text*)
- *(.rodata*)
+ *(SORT_BY_ALIGNMENT(.text*))
+ *(SORT_BY_ALIGNMENT(.rodata*))
RODATA_COMMON
@@ -76,7 +76,7 @@ SECTIONS
/*
* Memory page(s) mapped to this section will be marked as
* read-only, executable. No RW data from the next section must
- * creep in. Ensure the rest of the current memory block is unused.
+ * creep in. Ensure the rest of the current memory page is unused.
*/
. = ALIGN(PAGE_SIZE);
__RO_END__ = .;
@@ -134,10 +134,10 @@ SECTIONS
#endif
/*
- * Define a linker symbol to mark end of the RW memory area for this
+ * Define a linker symbol to mark the end of the RW memory area for this
* image.
*/
__RW_END__ = .;
- __BL32_END__ = .;
+ __BL32_END__ = .;
}