In the course of learning, I learned that const data is placed in the .rodata segment, but does the .rodata segment belong to the code segment or the data segment? Or is there something wrong with the way I understand it?
When learning the memory segmentation of C++, I have some doubts about whether the constant data should be placed in the data segment or the code segment. After searching for relevant information on the Internet, I found out that the constant data is actually placed in the .rodata section, but there is no unified answer as to whether the .rodata section belongs to the data section or the code section, so I hope to get a clear answer when I ask this question.