[PATCH] PT_GNU_STACK
Andrew Cagney
ac131313@redhat.com
Sun Jun 1 21:34:00 GMT 2003
> Hi Andrew,
>
>
>> Wouldn't two note sections work better:
>>
>> if (.note.GNU-stack.rwx)
>> stack read-write-executable
>> else if (.note.GNU-stack.rw)
>> stack read-write
Having empty sections would let binutils ignore the problem entirely.
Instead it could just pass the sections through.
>> else
>> stack $KERNEL_CONFIG_VARIABLE
>>
>> gcc generating one or the other (all empty).
>
>
> What benefit does this have over having just one note section and
> checking the section's attributes ?
The other advantage is that BINUTILS would not have the policy /
contents of the .note section hard wired. Such defaults should be
comming from something outside of BINUTILS (eg crt0.o, crt0begin.o,
kernel option, et.al.). Not matter how much people tell you otherwize,
you can bet on there being a request to change the default - arrrrggghghg!
You could have code merging existing note sections (although that really
strikes me as weird) (and something that will slow down the link??).
Andrew
More information about the Binutils
mailing list