diff options
author | Chris Johns <chrisj@rtems.org> | 2019-02-02 15:09:53 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-02-09 10:06:34 +1100 |
commit | 6c9f0176a916cdbe88e04417e7aa1405d80c500f (patch) | |
tree | 1846dd800a123e682f15e49a893426a9a6a064c4 /bsps/powerpc | |
parent | libdl: Add support for large memory programs (diff) | |
download | rtems-6c9f0176a916cdbe88e04417e7aa1405d80c500f.tar.bz2 |
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
Diffstat (limited to 'bsps/powerpc')
-rw-r--r-- | bsps/powerpc/psim/start/linkcmds | 4 | ||||
-rw-r--r-- | bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 | 5 | ||||
-rw-r--r-- | bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 | 5 | ||||
-rw-r--r-- | bsps/powerpc/shared/start/linkcmds.base | 13 |
4 files changed, 25 insertions, 2 deletions
diff --git a/bsps/powerpc/psim/start/linkcmds b/bsps/powerpc/psim/start/linkcmds index d5e61f9425..a34f4a2bcd 100644 --- a/bsps/powerpc/psim/start/linkcmds +++ b/bsps/powerpc/psim/start/linkcmds @@ -38,8 +38,8 @@ PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 10000); PSIM = 0x0c000000; /* - * Allocate the maximum memory to the sdata/sbss section. + * Allocate the maximum size to the small data sdata/sbss section. */ -bsp_section_sdata_bss_maximum_size = 1; +bsp_section_set_sdata_sbss_size = 65536; INCLUDE linkcmds.base diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 index 5328e73c5b..266e21b934 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e500 @@ -35,4 +35,9 @@ bsp_section_robarrier_align = 0x1000000; bsp_section_rwbarrier_align = 0x1000000; qoriq = 0xffe00000; +/* + * Allocate the maximum size to the small data sdata/sbss section. + */ +bsp_section_set_sdata_sbss_size = 65536; + INCLUDE linkcmds.base diff --git a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 index 4f8bbdfdbc..34a4eee9f4 100644 --- a/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 +++ b/bsps/powerpc/qoriq/start/linkcmds.qoriq_e6500_32 @@ -38,4 +38,9 @@ qoriq = 0xffe000000; qoriq_bman_portal = 0xff4000000; qoriq_qman_portal = 0xff6000000; +/* + * Allocate the maximum size to the small data sdata/sbss section. + */ +bsp_section_set_sdata_sbss_size = 65536; + INCLUDE linkcmds.base 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; |