Search code examples
assemblyportable-executablesegmentreadonly-variable

What is the difference between .rodata and .rdata


I've seen both .rodata and .rdata being used as segments. Which one should I use and what are the differences between them?


Solution

  • RODATA is used in ELF and RDATA is used in COFF. The closest equivalent in Mach-O would be __TEXT,__const.