diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-02-11 07:34:14 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-02-11 11:41:13 +0100 |
commit | eec706e2bf41a9a166aa5e744d041171015214ea (patch) | |
tree | 3ff2b448ccde61efdbb87f1486a624ecf4fa94b5 /bsps/powerpc/shared | |
parent | libdl: Add powerpc large memory and small data support. (diff) | |
download | rtems-eec706e2bf41a9a166aa5e744d041171015214ea.tar.bz2 |
bsps/powerpc: Fix small data area section
Fix small data area in case no fixed size is desired. Rename
bsp_section_set_sdata_sbss_size into bsp_section_small_data_area_size
since this symbol reflects the overall small data area size (including
space for libdl). Do not use bsp_section_sbss_size before definition in
linker command file. Add new symbols to <bsp/linker-symbols.h>.
Update #3687.
Diffstat (limited to 'bsps/powerpc/shared')
-rw-r--r-- | bsps/powerpc/shared/start/linkcmds.base | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bsps/powerpc/shared/start/linkcmds.base b/bsps/powerpc/shared/start/linkcmds.base index 642f0bf7e1..65ee046b95 100644 --- a/bsps/powerpc/shared/start/linkcmds.base +++ b/bsps/powerpc/shared/start/linkcmds.base @@ -24,6 +24,15 @@ ENTRY (_start) STARTUP (start.o) /* + * The upper layer linker command file may optionally define the symbol + * bsp_section_small_data_area_size. By default, the small data area is + * defined by the .sdata and .sbss input sections. Define + * bsp_section_small_data_area_size, if you want to make space available for + * dynamically loaded libraries (libdl). Small memory targets which do not use + * libdl, should not define this symbol. + */ + +/* * Global symbols that may be defined externally */ @@ -304,13 +313,6 @@ SECTIONS { 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) @@ -318,10 +320,12 @@ SECTIONS { *(.scommon) bsp_section_sbss_end = .; bsp_section_sdata_libdl_begin = .; - . += bsp_section_sdata_sbss_size - (bsp_section_sdata_size + bsp_section_sbss_size); + . = DEFINED(bsp_section_small_data_area_size) ? + bsp_section_sdata_begin + bsp_section_small_data_area_size : .; bsp_section_sdata_libdl_end = .; } > REGION_DATA AT > REGION_DATA bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin; + bsp_section_sdata_libdl_size = bsp_section_sdata_libdl_end - bsp_section_sdata_libdl_begin; .bss : ALIGN_WITH_INPUT { bsp_section_bss_begin = .; |