Skip to content

Commit 6fd0a0a

Browse files
committed
lib/os: cbprintf_packaged: simplify rodata check
NIOS2 is using _image_rodata_start/_end in its linker script to mark the boundaries of rodata. So they no loner need special treatment. Signed-off-by: Daniel Leung <[email protected]>
1 parent 217e604 commit 6fd0a0a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/os/cbprintf_packaged.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ static inline bool ptr_in_rodata(const char *addr)
3030
#define RO_START 0
3131
#define RO_END 0
3232
#elif defined(CONFIG_ARC) || defined(CONFIG_ARM) || defined(CONFIG_X86) \
33-
|| defined(CONFIG_RISCV) || defined(CONFIG_ARM64)
33+
|| defined(CONFIG_RISCV) || defined(CONFIG_ARM64) \
34+
|| defined(CONFIG_NIOS2)
3435
extern char _image_rodata_start[];
3536
extern char _image_rodata_end[];
3637
#define RO_START _image_rodata_start
3738
#define RO_END _image_rodata_end
38-
#elif defined(CONFIG_NIOS2) || defined(CONFIG_RISCV)
39-
extern char _image_rom_start[];
40-
extern char _image_rom_end[];
41-
#define RO_START _image_rom_start
42-
#define RO_END _image_rom_end
4339
#elif defined(CONFIG_XTENSA)
4440
extern char _rodata_start[];
4541
extern char _rodata_end[];

0 commit comments

Comments
 (0)