[PATCH] ELF section to segment mapping adjustments

Jan Beulich JBeulich@novell.com
Tue May 10 15:32:00 GMT 2005


>>> Ian Lance Taylor <ian@airs.com> 10.05.05 17:12:55 >>>
>"Jan Beulich" <JBeulich@novell.com> writes:
>
>> Shouldn't the executable permission be handled like the writeable one, i.e.
>> attempting to not merge sections with different permissions into one
>> segment?
>
>If we break a segment to avoid merging a non-executable section with
>an executable section, then we will wind up putting .text and .rodata
>into different segments.  We don't want to do that in the normal case.

I understand that's been the traditional behavior, but I don't know why exactly this is happening (except for space saving reasons). With attempts in various places to close holes where one can execute stuff in memory that shouldn't really be executed, it'd seem to me that more enforcement in this area would be quite reasonable to expect...

Jan



More information about the Binutils mailing list