Skip to content

Commit b23784b

Browse files
dcpleungcarlescufi
authored andcommitted
nios2: add _image_rodata_start/end to linker script
This adds the _image_rodata_start and _image_rodata_end symbols to NIOS2's linker script. Signed-off-by: Daniel Leung <[email protected]>
1 parent bf7a396 commit b23784b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/arch/nios2/linker.ld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ SECTIONS
133133
PROVIDE(gp = _gp);
134134
#endif
135135

136+
_image_rodata_start = .;
137+
136138
#include <linker/common-rom.ld>
137139

138140
SECTION_PROLOGUE(_RODATA_SECTION_NAME,,)
@@ -153,6 +155,9 @@ SECTIONS
153155

154156
#include <linker/cplusplus-rom.ld>
155157

158+
_image_rodata_end = .;
159+
_image_rodata_size = _image_rodata_end - _image_rodata_start;
160+
156161
_image_rom_end = .;
157162
__data_rom_start = ALIGN(4); /* XIP imaged DATA ROM start addr */
158163

0 commit comments

Comments
 (0)