[PATCH] PT_GNU_STACK

H. J. Lu hjl@lucon.org
Sun May 25 18:36:00 GMT 2003


On Sun, May 25, 2003 at 07:22:47AM -0700, H. J. Lu wrote:
> On Sat, May 24, 2003 at 05:14:33PM -0700, Ian Lance Taylor wrote:
> > Jakub Jelinek <jakub@redhat.com> writes:
> > 
> > > This patch introduces PT_GNU_STACK segment header, which tells the kernel or
> > > dynamic linker whether the binary or library needs executable stack or not.
> > 
> 
> Please make it a generic solution for a generic problem. I have cases
> that each psABI may want to do things differrently. I suggest a generic
> node section:
> 
>         .section       .note,".note-ABI-tag"
>         .align          2
>         data4           .L1 - .L0
>         data4           .L3 - .L2
>         data4           1
> .L0:
>         stringz         "Compiler vendor"
> .L1:
>         .align          2
> .L2:
>         data4           ABI flags
> .L3:
>         .align          2
> 
> 
> The linker provides a generic routine to process it. Each psABI can add
> additional bits to ABI flags and decide how to process them.
> 

Also, I'd like to see a generic segment, something like PT_GNU_PROPERTY,
instead of PT_GNU_STACK.


H.J.



More information about the Binutils mailing list