Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
In Beginner Mistakes, it's mentioned that the .rodata section is supposed to be located within the .text section. My linker script places it in its own section, like so:
Is there any reason .rodata must/should be in .text?
Everything compiles and runs, I'm just wondering why the page is so specific.
EDIT: I reread the page, and it mentions some problems, but it's not clear if they occur if .rodata is not included in the link script, or if it's not in the .text section.
.rodata contains any strings you might be using, so your linker script must add it to the output binary.
Typical for output binaries is to have a division between read-only data and read-write data. Both code and string constants qualifies for the first, and reducing the total amount of section correspondingly reduces memory overhead.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]