[PATCH] Don't run personality syscall at configure time; don't check it at all

Tom Tromey tromey@adacore.com
Wed May 12 18:24:31 GMT 2021


>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

Pedro> "man 2 personality" says:

Pedro>        This system call first appeared in Linux 1.1.20 (and thus first
Pedro>        in a stable kernel release with Linux 1.2.0); library support
Pedro>        was added in glibc 2.3.

Pedro> ...

Pedro>        ADDR_NO_RANDOMIZE (since Linux 2.6.12)
Pedro>               With this flag set, disable address-space-layout randomization.

Pedro> glibc 2.3 was released in 2002.
Pedro> Linux 2.6.12 was released in 2005.

It turns out that this caused the build to fail on RH ES5.

Address space randomization works fine there, and 'personality' exists
-- but ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not
<sys/personality.h>.

I have a patch to work around this by restoring this check:

Pedro> -  AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])

... and the corresponding define in nat/linux-personality.c.

(I tried just including the linux/ header but it doesn't declare
'personality'.)

I don't know if anybody else cares about this old system.  If so, let me
know and I can send the patch.  Otherwise I may not bother.

thanks,
Tom


More information about the Gdb-patches mailing list