[RFC PATCH] avoid intermingling executable and nonexecutable sections in a segment

H.J. Lu hjl.tools@gmail.com
Tue Nov 20 23:53:00 GMT 2012


On Tue, Nov 20, 2012 at 3:41 PM, Roland McGrath <mcgrathr@google.com> wrote:
> On Tue, Nov 20, 2012 at 3:01 PM, Alan Modra <amodra@gmail.com> wrote:
>> Seems like you could do this much easier with a change to
>> ldlang_override_segment_assignment controlled by a new global set from
>> $SEPARATE_CODE.
>
> OK, that's arguably much less kludgey.  I'm not clear on where a less
> kludgey place to set that global might be.  How's this?
>
>
> Thanks,
> Roland
>
>
> ld/
> 2012-11-20  Roland McGrath  <mcgrathr@google.com>
>
>         * ldlang.c (lang_segments_separate_code): New global variable.
>         (ldlang_override_segment_assignment): If that's true, then
>         always return TRUE when SEC_CODE differs between the sections.
>         * ldlang.h (lang_segments_separate_code): Declare it.
>         * emultempl/elf32.em
>         (gld${EMULATION_NAME}_after_open) [$SEPARATE_CODE = yes]: Set it.
>

Shouldn't lang_segments_separate_code the part of
config, like other options?


-- 
H.J.



More information about the Binutils mailing list