Preventing .text and .rodata being merged

Paul Koning pkoning@equallogic.com
Fri Nov 30 15:28:00 GMT 2007


>>>>> "Will" == Will Newton <will.newton@gmail.com> writes:

 Will> Hello all, I would like to be able to stop the .text and
 Will> .rodata sections being merged into the same ELF segment. Is
 Will> there an easy way to do this?  From looking at
 Will> map_sections_to_segments it looks like it isn't. More generally
 Will> I would like to make sure that executable read-only sections
 Will> and non-executable read-only sections are kept separate in the
 Will> output.

You should be able to do that with a linker script.

    paul



More information about the Binutils mailing list