diff --git a/bl1/bl1.ld.S b/bl1/bl1.ld.S index a2527e63a..49dda855e 100644 --- a/bl1/bl1.ld.S +++ b/bl1/bl1.ld.S @@ -41,6 +41,7 @@ SECTIONS { *bl1_entrypoint.o(.text*) *(SORT_BY_ALIGNMENT(.text*)) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -72,6 +73,7 @@ SECTIONS { * aligned and lld does not align the LMA to the alignment specified * on the .data section. */ + __RODATA_END_UNALIGNED__ = .; __RODATA_END__ = .; . = ALIGN(16); diff --git a/bl2/bl2.ld.S b/bl2/bl2.ld.S index 5f689d55c..db83a0c50 100644 --- a/bl2/bl2.ld.S +++ b/bl2/bl2.ld.S @@ -35,6 +35,7 @@ SECTIONS { *(SORT_BY_ALIGNMENT(.text*)) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -57,6 +58,7 @@ SECTIONS { RODATA_COMMON + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; diff --git a/bl2/bl2_el3.ld.S b/bl2/bl2_el3.ld.S index 5da631c07..4aa5cb045 100644 --- a/bl2/bl2_el3.ld.S +++ b/bl2/bl2_el3.ld.S @@ -65,6 +65,7 @@ SECTIONS { *(SORT_BY_ALIGNMENT(.text*)) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -78,6 +79,7 @@ SECTIONS { RODATA_COMMON + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; diff --git a/bl2u/bl2u.ld.S b/bl2u/bl2u.ld.S index 21c91b493..7b1a10103 100644 --- a/bl2u/bl2u.ld.S +++ b/bl2u/bl2u.ld.S @@ -32,6 +32,7 @@ SECTIONS { *bl2u_entrypoint.o(.text*) *(SORT_BY_ALIGNMENT(.text*)) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -53,6 +54,7 @@ SECTIONS { RODATA_COMMON + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; } >RAM diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S index abcae0cd6..7a8c41ab2 100644 --- a/bl31/bl31.ld.S +++ b/bl31/bl31.ld.S @@ -42,6 +42,7 @@ SECTIONS { *bl31_entrypoint.o(.text*) *(SORT_BY_ALIGNMENT(SORT(.text*))) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -62,6 +63,7 @@ SECTIONS { . = ALIGN(8); # include + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); diff --git a/bl32/sp_min/sp_min.ld.S b/bl32/sp_min/sp_min.ld.S index 0a2bad01e..dd8197332 100644 --- a/bl32/sp_min/sp_min.ld.S +++ b/bl32/sp_min/sp_min.ld.S @@ -34,6 +34,7 @@ SECTIONS { *entrypoint.o(.text*) *(SORT_BY_ALIGNMENT(.text*)) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -58,6 +59,7 @@ SECTIONS { . = ALIGN(8); # include + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); diff --git a/bl32/tsp/tsp.ld.S b/bl32/tsp/tsp.ld.S index b735f45e8..22bf11dad 100644 --- a/bl32/tsp/tsp.ld.S +++ b/bl32/tsp/tsp.ld.S @@ -30,6 +30,7 @@ SECTIONS { *tsp_entrypoint.o(.text*) *(.text*) *(.vectors) + __TEXT_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); @@ -43,6 +44,7 @@ SECTIONS { RODATA_COMMON + __RODATA_END_UNALIGNED__ = .; . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; diff --git a/docs/design/firmware-design.rst b/docs/design/firmware-design.rst index 998824f04..50839bde5 100644 --- a/docs/design/firmware-design.rst +++ b/docs/design/firmware-design.rst @@ -1559,8 +1559,10 @@ The following linker symbols are defined for this purpose: - ``__RO_START__`` - ``__RO_END__`` - ``__TEXT_START__`` +- ``__TEXT_END_UNALIGNED__`` - ``__TEXT_END__`` - ``__RODATA_START__`` +- ``__RODATA_END_UNALIGNED__`` - ``__RODATA_END__`` BL1's linker symbols diff --git a/tools/memory/memory/memmap.py b/tools/memory/memory/memmap.py index dda104a0f..99149b547 100755 --- a/tools/memory/memory/memmap.py +++ b/tools/memory/memory/memmap.py @@ -100,7 +100,7 @@ def main( if symbols: expr = ( r"(.*)(TEXT|BSS|RODATA|STACKS|_OPS|PMF|XLAT|GOT|FCONF" - r"|R.M)(.*)(START|END)__$" + r"|R.M)(.*)(START|UNALIGNED|END)__$" ) printer.print_symbol_table( parser.filter_symbols(parser.symbols, expr), parser.module_names