This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH] make PowerPC64 default to nonexecutable stack
On Tue, 2010-11-02 at 23:36 -0400, Ulrich Drepper wrote:
> Putting a definition in a common header only really makes sense if the
> value will be changed at some point or you can make a change in one
> place only. Neither is the case here. Just add the definition in
> each header. It's not going to change and it is a machine-specific
> value.
Ok, this makes sense.
> Also, no reason to use a symbol in the reserved namespace.
> stackinfo.h is not installed. Use DEFAULT_STACK_PERMS or something
> like that.
I'll make this change.
> And why that configure override? If you say it's not needed and gcc
> doesn't generate it, why should this change? Seems to be completely
> unnecessary.
The configure fragment is there to select the correct test-case based on
the default of the compiler used to build GLIBC. The testcase
elf/check-execstack.c assumes PT_GNU_STACK will be present and will
report an error if it finds otherwise. The testcase
sysdeps/powerpc/powerpc64/check-execstack.c assumes PT_GNU_STACK will
not be present and the test binary's stack permissions are checked to
see if the stack is nonexecutable.
I realize that this may select the wrong testcase if --build != --host,
whereby BUILD_CC might default to emitting PT_GNU_STACK when CC doesn't.
I'll try to get AC_TRY_COMMAND to use BUILD_CC instead of CC. I'm not
sure how to move this selection mechanism outside of config.h.in
cleanly.
Ryan