Browse Source

include: arch: rx: Change data symbol name

The RX linker is using the name "data" for .data region start
which caused the application cannot use "data" for variable
naming globally.
This commit change the name to "__data_region_start" as expected
in the linker_defs.h file

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
pull/92244/head
Duy Nguyen 4 weeks ago committed by Benjamin Cabé
parent
commit
d18f879566
  1. 8
      arch/rx/core/reset.S
  2. 11
      include/zephyr/arch/rx/linker.ld

8
arch/rx/core/reset.S

@ -29,10 +29,10 @@ __start : @@ -29,10 +29,10 @@ __start :
/* load data section from ROM to RAM */
mov #_mdata,r2 /* src ROM address of data section in R2 */
mov #_data,r1 /* dest start RAM address of data section in R1 */
mov #_edata,r3 /* end RAM address of data section in R3 */
sub r1,r3 /* size of data section in R3 (R3=R3-R1) */
mov #_image_ram_start,r2 /* src ROM address of data section in R2 */
mov #__data_start,r1 /* dest start RAM address of data section in R1 */
mov #__data_region_end,r3 /* end RAM address of data section in R3 */
sub r1,r3 /* size of data section in R3 (R3=R3-R1) */
#ifdef __RX_ALLOW_STRING_INSNS__
smovf /* block copy R3 bytes from R2 to R1 */
#else

11
include/zephyr/arch/rx/linker.ld

@ -175,7 +175,6 @@ SECTIONS @@ -175,7 +175,6 @@ SECTIONS
} GROUP_LINK_IN(ROMABLE_REGION)
PLACE_SYMBOL_HERE(__rodata_region_end);
_mdata = .;
GROUP_END(ROMABLE_REGION)
GROUP_START(RAMABLE_REGION)
@ -212,7 +211,8 @@ SECTIONS @@ -212,7 +211,8 @@ SECTIONS
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
{
_data = .;
__data_region_start = .;
__data_start = .;
*(.data)
*(.data.*)
*(D)
@ -234,17 +234,22 @@ SECTIONS @@ -234,17 +234,22 @@ SECTIONS
*/
#include <snippets-data-sections.ld>
_edata = .;
__data_region_end = .;
SECTION_PROLOGUE(_BSS_SECTION_NAME,,)
{
_bss = .;
__bss_start = .;
*(.bss)
*(.bss.**)
*(COMMON)
*(B)
*(B_1)
*(B_2)
_ebss = .;
__bss_end = .;
. = ALIGN(128);
_end = .;
} GROUP_LINK_IN(RAMABLE_REGION)
_ebss = . ;

Loading…
Cancel
Save