forked from Imagelibrary/rtems
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user