24.8. Join Data and Text Sections: -R

-R tells the assembler to write the object file as if all data-section data lives in the text section. This is only done at the very last moment: your binary data are the same, but data section parts are relocated differently. The data section part of your object file is zero bytes long because all its bytes are appended to the text section. (See Chapter 26.)

When you specify -R it would be possible to generate shorter address displacements (because we do not have to cross between text and data section). We refrain from doing this simply for compatibility with older versions of the assembler. In future, -R may work this way.

When the assembler is configured for COFF output, this option is only useful if you use sections named ".text" and ".data".