Commit b1f596b6 authored by Yann Gautier's avatar Yann Gautier
Browse files

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:
ebd6efae



Some comments are also aligned with other linker scripts.

Change-Id: I2ea59edb445af0ed8c08fd883ffbf56852570d0c
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
parent 5ecfd890
...@@ -29,7 +29,7 @@ SECTIONS ...@@ -29,7 +29,7 @@ SECTIONS
.text . : { .text . : {
__TEXT_START__ = .; __TEXT_START__ = .;
*entrypoint.o(.text*) *entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -46,7 +46,7 @@ SECTIONS ...@@ -46,7 +46,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
RODATA_COMMON RODATA_COMMON
...@@ -61,8 +61,8 @@ SECTIONS ...@@ -61,8 +61,8 @@ SECTIONS
ro . : { ro . : {
__RO_START__ = .; __RO_START__ = .;
*entrypoint.o(.text*) *entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
RODATA_COMMON RODATA_COMMON
...@@ -76,7 +76,7 @@ SECTIONS ...@@ -76,7 +76,7 @@ SECTIONS
/* /*
* Memory page(s) mapped to this section will be marked as * Memory page(s) mapped to this section will be marked as
* read-only, executable. No RW data from the next section must * 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); . = ALIGN(PAGE_SIZE);
__RO_END__ = .; __RO_END__ = .;
...@@ -134,7 +134,7 @@ SECTIONS ...@@ -134,7 +134,7 @@ SECTIONS
#endif #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. * image.
*/ */
__RW_END__ = .; __RW_END__ = .;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment