patches/glibc/ports-2.10.1/350-pre20040117-pt_pax.patch
author "Bryan Hundven" <bryanhundven@gmail.com>
Thu Mar 01 15:23:49 2012 -0800 (2012-03-01)
changeset 2909 28ac8fbd9e6a
permissions -rw-r--r--
libg/eglibc: add updated eglibc 2.15

Includes a patch to remove __builtin_expect test:

In eglibc-2.15, the build breaks in configure while testing
for the existance of __builtin_expect. It fails with newer
versions of gcc.

This patch is a modification of an upstream change in glibc
mainline (to be 2.16) to fix the following error:

[CFG ] checking for __builtin_expect... no
[ERROR] configure: error: support for __builtin_expect needed

http://sourceware.org/git/?p=glibc.git;a=commit;h=3857022a761ea7251f8e5c0e45d382ebc3e34cf9

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: coalesce both patches into a single changeset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 
     2 
     3 diff -durN glibc-2.10.1.orig/elf/elf.h glibc-2.10.1/elf/elf.h
     4 --- glibc-2.10.1.orig/elf/elf.h	2009-04-15 02:15:54.000000000 +0200
     5 +++ glibc-2.10.1/elf/elf.h	2009-11-13 00:50:35.000000000 +0100
     6 @@ -572,6 +572,7 @@
     7  #define PT_GNU_EH_FRAME	0x6474e550	/* GCC .eh_frame_hdr segment */
     8  #define PT_GNU_STACK	0x6474e551	/* Indicates stack executability */
     9  #define PT_GNU_RELRO	0x6474e552	/* Read-only after relocation */
    10 +#define PT_PAX_FLAGS	0x65041580	/* Indicates PaX flag markings */
    11  #define PT_LOSUNW	0x6ffffffa
    12  #define PT_SUNWBSS	0x6ffffffa	/* Sun Specific segment */
    13  #define PT_SUNWSTACK	0x6ffffffb	/* Stack segment */
    14 @@ -585,6 +586,18 @@
    15  #define PF_X		(1 << 0)	/* Segment is executable */
    16  #define PF_W		(1 << 1)	/* Segment is writable */
    17  #define PF_R		(1 << 2)	/* Segment is readable */
    18 +#define PF_PAGEEXEC	(1 << 4)	/* Enable  PAGEEXEC */
    19 +#define PF_NOPAGEEXEC	(1 << 5)	/* Disable PAGEEXEC */
    20 +#define PF_SEGMEXEC	(1 << 6)	/* Enable  SEGMEXEC */
    21 +#define PF_NOSEGMEXEC	(1 << 7)	/* Disable SEGMEXEC */
    22 +#define PF_MPROTECT	(1 << 8)	/* Enable  MPROTECT */
    23 +#define PF_NOMPROTECT	(1 << 9)	/* Disable MPROTECT */
    24 +#define PF_RANDEXEC	(1 << 10)	/* Enable  RANDEXEC */
    25 +#define PF_NORANDEXEC	(1 << 11)	/* Disable RANDEXEC */
    26 +#define PF_EMUTRAMP	(1 << 12)	/* Enable  EMUTRAMP */
    27 +#define PF_NOEMUTRAMP	(1 << 13)	/* Disable EMUTRAMP */
    28 +#define PF_RANDMMAP	(1 << 14)	/* Enable  RANDMMAP */
    29 +#define PF_NORANDMMAP	(1 << 15)	/* Disable RANDMMAP */
    30  #define PF_MASKOS	0x0ff00000	/* OS-specific */
    31  #define PF_MASKPROC	0xf0000000	/* Processor-specific */
    32