support: Add support_stack_alloc
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 10 Mar 2021 15:26:29 +0000 (12:26 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 8 Jul 2021 16:48:06 +0000 (13:48 -0300)
commitae8c243d2473bdfc3c0f9c6b46e6dffb5a28725c
tree1c038848c39b2480fe61c8bf03c565e782e813f3
parent79969f41a7caf9a503a04b78653db971918afa26
support: Add support_stack_alloc

The code to allocate a stack from xsigstack is refactored so it can
be more generic.  The new support_stack_alloc() also set PROT_EXEC
if DEFAULT_STACK_PERMS has PF_X.  This is required on some
 architectures (hppa for instance) and trying to access the rtld
global from testsuite will require more intrusive refactoring
in the ldsodefs.h header.

Checked on x86_64-linux-gnu and i686-linux-gnu.  I also ran
tst-xsigstack on both hppa and ia64.
support/Makefile
support/support.h
support/support_stack_alloc.c [new file with mode: 0644]
support/xsigstack.c