diff --git a/bl1/bl1.ld.S b/bl1/bl1.ld.S index 87f1ae82f305ab63bcb55f3e90a6340859f15423..e706ce2866e78512af16740f8c7d7426a82c714a 100644 --- a/bl1/bl1.ld.S +++ b/bl1/bl1.ld.S @@ -45,8 +45,7 @@ SECTIONS __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) - PARSER_LIB_DESCS - CPU_OPS + RODATA_COMMON /* * No need to pad out the .rodata section to a page boundary. Next is @@ -67,8 +66,7 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) - PARSER_LIB_DESCS - CPU_OPS + RODATA_COMMON *(.vectors) __RO_END__ = .; diff --git a/bl2/bl2.ld.S b/bl2/bl2.ld.S index afb01339002ea079cf52f5c6b5adc07c1b6d933b..dc5165280d009cd5d0797542e74b76b940e93f10 100644 --- a/bl2/bl2.ld.S +++ b/bl2/bl2.ld.S @@ -45,8 +45,7 @@ SECTIONS __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) - FCONF_POPULATOR - PARSER_LIB_DESCS + RODATA_COMMON . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; @@ -58,8 +57,7 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) - FCONF_POPULATOR - PARSER_LIB_DESCS + RODATA_COMMON *(.vectors) __RO_END_UNALIGNED__ = .; diff --git a/bl2/bl2_el3.ld.S b/bl2/bl2_el3.ld.S index d2379902916613e8b812913f3fb16c2b96d717dc..3c27443694f1461a45406b7929d78385f34cdf3c 100644 --- a/bl2/bl2_el3.ld.S +++ b/bl2/bl2_el3.ld.S @@ -53,9 +53,7 @@ SECTIONS __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) - PARSER_LIB_DESCS - CPU_OPS - GOT + RODATA_COMMON . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; @@ -73,9 +71,7 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) - CPU_OPS - PARSER_LIB_DESCS - GOT + RODATA_COMMON *(.vectors) __RO_END_UNALIGNED__ = .; diff --git a/bl2u/bl2u.ld.S b/bl2u/bl2u.ld.S index 96545a3abad92c14b8fd31df8442d5a66da51d38..37e658ad346db76a02cb7e92234bda849b90e704 100644 --- a/bl2u/bl2u.ld.S +++ b/bl2u/bl2u.ld.S @@ -46,6 +46,9 @@ SECTIONS .rodata . : { __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) + + RODATA_COMMON + . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; } >RAM @@ -56,6 +59,8 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) + RODATA_COMMON + *(.vectors) __RO_END_UNALIGNED__ = .; /* diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S index 6b7f9157a34c5676014e2a4353db75765d778fc2..ac99a7de4a6f07b1e318efdb80489dba0e7e69ad 100644 --- a/bl31/bl31.ld.S +++ b/bl31/bl31.ld.S @@ -47,11 +47,7 @@ SECTIONS __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) - RT_SVC_DESCS - FCONF_POPULATOR - PMF_SVC_DESCS - CPU_OPS - GOT + RODATA_COMMON /* Place pubsub sections for events */ . = ALIGN(8); @@ -67,11 +63,7 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) - RT_SVC_DESCS - FCONF_POPULATOR - PMF_SVC_DESCS - CPU_OPS - GOT + RODATA_COMMON /* Place pubsub sections for events */ . = ALIGN(8); diff --git a/bl32/sp_min/sp_min.ld.S b/bl32/sp_min/sp_min.ld.S index d83b4e0183e7028906f55a6af080c731f3dd6351..f652f17e262428184f2aa875f90a955c32e0830e 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 b1ec423502c4f58f14208680bdc6cee9a62ddb6b..b071e82fd6bbbb768e6b4ecd2a91c87f63e024da 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) diff --git a/include/common/bl_common.ld.h b/include/common/bl_common.ld.h index d9e2e015f54df100fb38806db865718201142368..5c5fe5b15e7f470a341e24284a51525d953803f0 100644 --- a/include/common/bl_common.ld.h +++ b/include/common/bl_common.ld.h @@ -56,6 +56,14 @@ *(.got) \ __GOT_END__ = .; +#define RODATA_COMMON \ + RT_SVC_DESCS \ + FCONF_POPULATOR \ + PMF_SVC_DESCS \ + PARSER_LIB_DESCS \ + CPU_OPS \ + GOT + #define STACK_SECTION \ stacks (NOLOAD) : { \ __STACKS_START__ = .; \ diff --git a/plat/mediatek/mt6795/bl31.ld.S b/plat/mediatek/mt6795/bl31.ld.S index 03a737f69752a7d4547e6774b6856432ffde956a..02d79af38b0317b2ced36deeff4bd6b0410c5dbe 100644 --- a/plat/mediatek/mt6795/bl31.ld.S +++ b/plat/mediatek/mt6795/bl31.ld.S @@ -38,8 +38,7 @@ SECTIONS *(.text*) *(.rodata*) - RT_SVC_DESCS - CPU_OPS + RODATA_COMMON __RO_END_UNALIGNED__ = .; /*