Skip to content

Commit 9724438

Browse files
committed
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>
1 parent daccad7 commit 9724438

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

arch/rx/core/reset.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ __start :
2929

3030
/* load data section from ROM to RAM */
3131

32-
mov #_mdata,r2 /* src ROM address of data section in R2 */
33-
mov #_data,r1 /* dest start RAM address of data section in R1 */
34-
mov #_edata,r3 /* end RAM address of data section in R3 */
35-
sub r1,r3 /* size of data section in R3 (R3=R3-R1) */
32+
mov #_image_ram_start,r2 /* src ROM address of data section in R2 */
33+
mov #__data_start,r1 /* dest start RAM address of data section in R1 */
34+
mov #__data_region_end,r3 /* end RAM address of data section in R3 */
35+
sub r1,r3 /* size of data section in R3 (R3=R3-R1) */
3636
#ifdef __RX_ALLOW_STRING_INSNS__
3737
smovf /* block copy R3 bytes from R2 to R1 */
3838
#else

include/zephyr/arch/rx/linker.ld

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ SECTIONS
175175
} GROUP_LINK_IN(ROMABLE_REGION)
176176

177177
PLACE_SYMBOL_HERE(__rodata_region_end);
178-
_mdata = .;
179178
GROUP_END(ROMABLE_REGION)
180179

181180
GROUP_START(RAMABLE_REGION)
@@ -212,7 +211,8 @@ SECTIONS
212211

213212
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
214213
{
215-
_data = .;
214+
__data_region_start = .;
215+
__data_start = .;
216216
*(.data)
217217
*(.data.*)
218218
*(D)
@@ -234,17 +234,22 @@ SECTIONS
234234
*/
235235
#include <snippets-data-sections.ld>
236236

237-
_edata = .;
237+
__data_region_end = .;
238238

239239
SECTION_PROLOGUE(_BSS_SECTION_NAME,,)
240240
{
241241
_bss = .;
242+
__bss_start = .;
242243
*(.bss)
243244
*(.bss.**)
244245
*(COMMON)
245246
*(B)
246247
*(B_1)
247248
*(B_2)
249+
_ebss = .;
250+
__bss_end = .;
251+
. = ALIGN(128);
252+
_end = .;
248253
} GROUP_LINK_IN(RAMABLE_REGION)
249254

250255
_ebss = . ;

0 commit comments

Comments
 (0)