This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Enable -zexecstack on Solaris


Ping?

-- David

On Sat, May 2, 2009 at 10:55 PM, David Bartley
<dtbartle@csclub.uwaterloo.ca> wrote:
> On Sat, May 2, 2009 at 8:10 PM, Alan Modra <amodra@bigpond.net.au> wrote:
>> On Sat, May 02, 2009 at 04:11:28PM -0700, David Bartley wrote:
>>> The attached patch enabled executable stacks on Solaris (via
>>> -zexecstack). On Solaris, this is achieved by setting the final
>>> PT_LOAD section to be executable.
>> [snip]
>>> + ? ? * bfd/elf.c: Enable -zexecstack on Solaris.
>>> + ? ? * bfd/configure.in: Likewise.
>>> + ? ? * bfd/configure: Regenerate.
>>> + ? ? * bfd/config.in: Likewise.
>>
>> I think bfd is the wrong place to implement this feature. ?Instead,
>> you should arrange for ld to set SEC_CODE on .bss, which I think will
>> result in PF_X on the PT_LOAD header covering .bss. ?Do this in a new
>> .em file for solaris (grep for EXTRA_EM_FILE examples), probably best
>> done in ldemul_before_allocation so that you have the option of
>> turning off link_info.execstack and noexecstack to not emit
>> PT_GNU_STACK, which I imagine isn't much use to you.
>
> Thanks for the suggestion. How does this patch look?
>
> -- David
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]