From 6c9f0176a916cdbe88e04417e7aa1405d80c500f Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 2 Feb 2019 15:09:53 +1100 Subject: libdl: Add powerpc large memory and small data support. - Add support for architecure sections that can be handled by the architecture back end. - Add trampoline/fixup support for PowerPC. This means the PowerPC now supports large memory loading of applications. - Add a bit allocator to manage small block based regions of memory. - Add small data (sdata/sbss) support for the PowerPC. The support makes the linker allocated small data region of memory a global resource available to libdl loaded object files. Updates #3687 Updates #3685 --- bsps/powerpc/shared/start/linkcmds.base | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bsps/powerpc/shared') diff --git a/bsps/powerpc/shared/start/linkcmds.base b/bsps/powerpc/shared/start/linkcmds.base index 4ad302e86b..642f0bf7e1 100644 --- a/bsps/powerpc/shared/start/linkcmds.base +++ b/bsps/powerpc/shared/start/linkcmds.base @@ -293,20 +293,33 @@ SECTIONS { KEEP (*(SORT(.rtemsrwset.*))) } > REGION_DATA AT > REGION_DATA_LOAD .sdata : ALIGN_WITH_INPUT { + bsp_section_sdata_begin = .; PROVIDE (_SDA_BASE_ = 32768); *(.sdata .sdata.* .gnu.linkonce.s.*) + bsp_section_sdata_end = .; bsp_section_data_end = .; } > REGION_DATA AT > REGION_DATA_LOAD + bsp_section_sdata_size = bsp_section_sdata_end - bsp_section_sdata_begin; bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin; bsp_section_data_load_begin = LOADADDR (.data); bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size; + /* + * Set bsp_section_set_sdata_bss_size to the system's sdata and bss data size, eg: + * + * bsp_section_set_sdata_sbss_size = 65536; + */ + bsp_section_sdata_sbss_size = DEFINED(bsp_section_set_sdata_sbss_size) ? + bsp_section_set_sdata_sbss_size : 0; .sbss : ALIGN_WITH_INPUT { bsp_section_sbss_begin = .; *(.dynsbss) *(.sbss .sbss.* .gnu.linkonce.sb.*) *(.scommon) bsp_section_sbss_end = .; + bsp_section_sdata_libdl_begin = .; + . += bsp_section_sdata_sbss_size - (bsp_section_sdata_size + bsp_section_sbss_size); + bsp_section_sdata_libdl_end = .; } > REGION_DATA AT > REGION_DATA bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin; -- cgit v1.2.3