Go to the first, previous, next, last section, table of contents.


Join Data and Text Sections: -R

-R tells 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 section Sections and Relocation.)

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 . In future, -R may work this way.


Go to the first, previous, next, last section, table of contents.