They’re both stored at the end of .text
. What that section is called vary by linker script and by compiler. Typically only const ends up in rodata
, and initialized variables are in .data
which is both in ROM (init values) and in RAM (working memory).