[HELP,NEEDED] elf: Add elf/check-wx-segment, a test for the presence of WX segments

Message ID 87tv3buirr.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series
  • [HELP,NEEDED] elf: Add elf/check-wx-segment, a test for the presence of WX segments
Related show

Commit Message

Florian Weimer Feb. 28, 2020, 10:07 a.m.
Would you please help me to add proper comments to the xfails for the
hppa and sparc ports?

Currently, both (sets of) targets have an writable and executable load
segment.  Is this because the lack of secure PLT support, like
originally on POWER?

The new test passes everywhere else.

Thanks,
Florian
8<------------------------------------------------------------------8<
Writable, executable segments defeat security hardening.  The
existing check for DT_TEXTREL does not catch this.

-----
 elf/Makefile                          |  7 +++
 scripts/check-wx-segment.py           | 85 +++++++++++++++++++++++++++++++++++
 sysdeps/sparc/Makefile                |  4 ++
 sysdeps/unix/sysv/linux/hppa/Makefile |  7 ++-
 4 files changed, 101 insertions(+), 2 deletions(-)

Comments

Adhemerval Zanella Feb. 28, 2020, 1:29 p.m. | #1
On 28/02/2020 07:07, Florian Weimer wrote:
> Would you please help me to add proper comments to the xfails for the

> hppa and sparc ports?

> 

> Currently, both (sets of) targets have an writable and executable load

> segment.  Is this because the lack of secure PLT support, like

> originally on POWER?

> 

> The new test passes everywhere else.


For sparc it seems to be the case from its documentation [1]. And checking
with a simple programs that calls 'printf' on sparc64, its maps shows:

10000000000-10000002000 r-xp 00000000 fd:00 30858878                     /home/azanella/glibc/build/sparc64-linux-gnu/test
10000100000-10000102000 r--p 00000000 fd:00 30858878                     /home/azanella/glibc/build/sparc64-linux-gnu/test
10000102000-10000104000 rwxp 00002000 fd:00 30858878                     /home/azanella/glibc/build/sparc64-linux-gnu/test
7fefffde000-7ff00000000 rw-p 00000000 00:00 0                            [stack]
fff8000100000000-fff8000100022000 r-xp 00000000 fd:00 131268             /lib/sparc64-linux-gnu/ld-2.29.so
fff8000100022000-fff8000100024000 r--p 00000000 00:00 0                  [vvar]
fff8000100024000-fff8000100026000 r-xp 00000000 00:00 0                  [vdso]
fff8000100026000-fff800010002a000 rw-p 00000000 00:00 0
fff8000100122000-fff8000100124000 r--p 00022000 fd:00 131268             /lib/sparc64-linux-gnu/ld-2.29.so
fff8000100124000-fff8000100126000 rwxp 00024000 fd:00 131268             /lib/sparc64-linux-gnu/ld-2.29.so
fff8000100128000-fff8000100286000 r-xp 00000000 fd:00 131522             /lib/sparc64-linux-gnu/libc-2.29.so
fff8000100286000-fff8000100384000 ---p 0015e000 fd:00 131522             /lib/sparc64-linux-gnu/libc-2.29.so
fff8000100384000-fff8000100388000 r--p 0015c000 fd:00 131522             /lib/sparc64-linux-gnu/libc-2.29.so
fff8000100388000-fff800010038c000 rwxp 00160000 fd:00 131522             /lib/sparc64-linux-gnu/libc-2.29.so
fff800010038c000-fff8000100390000 rwxp 00000000 00:00 0

(gdb) disas
Dump of assembler code for function puts@got.plt:
=> 0x00000100001021a0 <+0>:     sethi  %hi(0x28000), %g1
   0x00000100001021a4 <+4>:     b,a   %xcc, 0x10000102120

It branches to the .PLT101 (as defined in reference documentation):

(gdb) x/20i $pc
=> 0x10000102120:       sethi  %hi(0xfff80000), %g4
   0x10000102124:       sethi  %hi(0x16400), %g5
   0x10000102128:       or  %g4, 1, %g4
   0x1000010212c:       or  %g5, 0x300, %g5
   0x10000102130:       sllx  %g4, 0x20, %g4
   0x10000102134:       add  %g4, %g5, %g5
   0x10000102138:       jmpl  %g5, %g4
   0x1000010213c:       nop 

Then to ld.so:

(gdb) 
_dl_runtime_resolve_1 () at ../sysdeps/sparc/sparc64/dl-trampoline.S:77
(gdb) si
[...]
87      in ../sysdeps/sparc/sparc64/dl-trampoline.S
(gdb) 
_dl_fixup (l=0xfff8000100125470, reloc_arg=24) at dl-runtime.c:66
(gdb) si
[...] 
elf_machine_fixup_plt (value=18444492278192513952, reloc_addr=0x100001021a0 <puts@got.plt>, reloc=<optimized out>, sym=0xfff8000100131e68, refsym=<optimized out>, t=<optimized out>, map=0xfff8000100125470)
(gdb) si
[...]
(gdb) 
sparc64_fixup_plt (t=1, high=0, value=18444492278192513952, reloc_addr=0x100001021a0 <puts@got.plt>, reloc=<optimized out>, map=0xfff8000100125470) at ../sysdeps/sparc/sparc64/dl-plt.h:44

And then it rewrites the expected PLT sequence on the 'puts@got.plt':

sysdeps/sparc/sparc64/dl-plt.h

120           /* sethi      %hh(value), %g1
121              sethi      %lm(value), %g5
122              or         %g1, %hm(value), %g1
123              or         %g5, %lo(value), %g5    
124              sllx       %g1, 32, %g1         
125              jmpl       %g1 + %g5, %g0
126               nop  */
127                                                                    
128           insns[5] = 0x81c04005;
129           __asm __volatile ("flush %0 + 20" : : "r" (insns));         
130                                                           
131           insns[4] = 0x83287020;
132           __asm __volatile ("flush %0 + 16" : : "r" (insns));
133 
134           insns[3] = 0x8a116000 | (low32 & 0x3ff);  
135           __asm __volatile ("flush %0 + 12" : : "r" (insns));
136 
137           insns[2] = 0x82106000 | (high32 & 0x3ff);   

And even -z,now does not really help here, since sparc does not
create a different LOAD segment for program data.  For instance,
making the program RWX segment on the program above just RX,
triggers a segfault at:

Program received signal SIGSEGV, Segmentation fault.
0x00000100000007f0 in __do_global_dtors_aux ()
(gdb) disas
Dump of assembler code for function __do_global_dtors_aux:
   0x0000010000000798 <+0>:     save  %sp, -176, %sp
   0x000001000000079c <+4>:     sethi  %hi(0x101800), %l7
   0x00000100000007a0 <+8>:     call  0x100000006c0 <__sparc_get_pc_thunk.l7>
   0x00000100000007a4 <+12>:    add  %l7, 0, %l7        ! 0x101800
   0x00000100000007a8 <+16>:    sethi  %hi(0), %i5
   0x00000100000007ac <+20>:    xor  %i5, 0x170, %i5
   0x00000100000007b0 <+24>:    add  %l7, %i5, %i5
   0x00000100000007b4 <+28>:    ldub  [ %i5 ], %g1
   0x00000100000007b8 <+32>:    cmp  %g1, 0
   0x00000100000007bc <+36>:    bne,pn   %icc, 0x100000007f4 <__do_global_dtors_aux+92>
   0x00000100000007c0 <+40>:    sethi  %hi(0), %g1
   0x00000100000007c4 <+44>:    xor  %g1, 0x10, %g1
   0x00000100000007c8 <+48>:    ldx  [ %l7 + %g1 ], %g1
   0x00000100000007cc <+52>:    brz,pn   %g1, 0x100000007e4 <__do_global_dtors_aux+76>
   0x00000100000007d0 <+56>:    sethi  %hi(0), %g1
   0x00000100000007d4 <+60>:    xor  %g1, 0x168, %g1
   0x00000100000007d8 <+64>:    add  %l7, %g1, %l7
   0x00000100000007dc <+68>:    call  0x10000102080 <__cxa_finalize@got.plt>
   0x00000100000007e0 <+72>:    ldx  [ %l7 ], %o0
   0x00000100000007e4 <+76>:    call  0x100000006e0 <deregister_tm_clones>
   0x00000100000007e8 <+80>:    nop 
   0x00000100000007ec <+84>:    mov  1, %g1     ! 0x1
=> 0x00000100000007f0 <+88>:    stb  %g1, [ %i5 ]
   0x00000100000007f4 <+92>:    return  %i7 + 8
   0x00000100000007f8 <+96>:    nop 

Since __do_global_dtors_aux sets a 'static _Bool completed' at its 
completion.

[1] https://docs.oracle.com/cd/E19455-01/816-0559/chapter6-1236/index.html


> 

> Thanks,

> Florian

> 8<------------------------------------------------------------------8<

> Writable, executable segments defeat security hardening.  The

> existing check for DT_TEXTREL does not catch this.

> 

> -----

>  elf/Makefile                          |  7 +++

>  scripts/check-wx-segment.py           | 85 +++++++++++++++++++++++++++++++++++

>  sysdeps/sparc/Makefile                |  4 ++

>  sysdeps/unix/sysv/linux/hppa/Makefile |  7 ++-

>  4 files changed, 101 insertions(+), 2 deletions(-)

> 

> diff --git a/elf/Makefile b/elf/Makefile

> index a137143db7..da689a2c7b 100644

> --- a/elf/Makefile

> +++ b/elf/Makefile

> @@ -402,6 +402,7 @@ tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \

>  		 $(objpfx)tst-rtld-preload.out

>  endif

>  tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \

> +		 $(objpfx)check-wx-segment.out \

>  		 $(objpfx)check-localplt.out $(objpfx)check-initfini.out

>  endif

>  

> @@ -1180,6 +1181,12 @@ $(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \

>  	$(evaluate-test)

>  generated += check-execstack.out

>  

> +$(objpfx)check-wx-segment.out: $(..)scripts/check-wx-segment.py \

> +			      $(all-built-dso:=.phdr)

> +	$(PYTHON) $^ --xfail="$(check-wx-segment-xfail)" > $@; \

> +	$(evaluate-test)

> +generated += check-wx-segment.out

> +

>  $(objpfx)tst-dlmodcount: $(libdl)

>  $(objpfx)tst-dlmodcount.out: $(test-modules)

>  

> diff --git a/scripts/check-wx-segment.py b/scripts/check-wx-segment.py

> new file mode 100644

> index 0000000000..c3553eeef9

> --- /dev/null

> +++ b/scripts/check-wx-segment.py

> @@ -0,0 +1,85 @@

> +#!/usr/bin/python3

> +# Check ELF program headers for WX segments.

> +# Copyright (C) 2020 Free Software Foundation, Inc.

> +# This file is part of the GNU C Library.

> +#

> +# The GNU C Library is free software; you can redistribute it and/or

> +# modify it under the terms of the GNU Lesser General Public

> +# License as published by the Free Software Foundation; either

> +# version 2.1 of the License, or (at your option) any later version.

> +#

> +# The GNU C Library is distributed in the hope that it will be useful,

> +# but WITHOUT ANY WARRANTY; without even the implied warranty of

> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU

> +# Lesser General Public License for more details.

> +#

> +# You should have received a copy of the GNU Lesser General Public

> +# License along with the GNU C Library; if not, see

> +# <https://www.gnu.org/licenses/>.

> +

> +"""Check that the program headers do not contain write-exec segments."""

> +

> +import argparse

> +import os.path

> +import re

> +import sys

> +

> +# Regular expression to extract the RWE flags field.  The

> +# address/offset columns have varying width.

> +RE_LOAD = re.compile(

> +    r'^  LOAD +(?:0x[0-9a-fA-F]+ +){5}([R ][W ][ E]) +0x[0-9a-fA-F]+\n\Z')

> +

> +def process_file(path, inp, xfail):

> +    """Analyze one input file."""

> +

> +    errors = 0

> +    for line in inp:

> +        error = None

> +        if line.startswith('  LOAD '):

> +            match = RE_LOAD.match(line)

> +            if match is None:

> +                error = 'Invalid LOAD line'

> +            else:

> +                flags, = match.groups()

> +                if 'W' in flags and 'E' in flags:

> +                    if xfail:

> +                        print('{}: warning: WX segment (as expected)'.format(

> +                            path))

> +                    else:

> +                        error = 'WX segment'

> +

> +        if error is not None:

> +            print('{}: error: {}: {!r}'.format(path, error, line.strip()))

> +            errors += 1

> +

> +    if xfail and errors == 0:

> +        print('{}: warning: missing expected WX segment'.format(path))

> +    return errors

> +

> +

> +def main():

> +    """The main entry point."""

> +    parser = argparse.ArgumentParser(description=__doc__)

> +    parser.add_argument('--xfail',

> +                        help='Run this number of jobs in parallel',

> +                        type=str, default='')

> +    parser.add_argument('phdrs',

> +                        help='Files containing readelf -Wl output',

> +                        nargs='*')

> +    opts = parser.parse_args(sys.argv)

> +

> +    xfails = set(opts.xfail.split(' '))

> +    xfails_all = opts.xfail.strip() == '*'

> +

> +    errors = 0

> +    for path in opts.phdrs:

> +        xfail = ((os.path.basename(path) + '.phdrs') in xfails

> +                 or xfails_all)

> +        with open(path) as inp:

> +            errors += process_file(path, inp, xfail)

> +    if errors > 0:

> +        sys.exit(1)

> +

> +

> +if __name__ == '__main__':

> +    main()

> diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile

> index 38b33af6e0..3ceb8d0298 100644

> --- a/sysdeps/sparc/Makefile

> +++ b/sysdeps/sparc/Makefile

> @@ -16,6 +16,10 @@ CPPFLAGS-crti.S += -fPIC

>  CPPFLAGS-crtn.S += -fPIC

>  endif

>  

> +ifeq ($(subdir),elf)

> +test-xfail-check-wx-segment = *

> +endif # $(subdir) == elf

> +

>  # nscd uses atomic_spin_nop which in turn requires cpu_relax

>  ifeq ($(subdir),nscd)

>  routines += cpu_relax

> diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile

> index e1637f54f5..1e7340418b 100644

> --- a/sysdeps/unix/sysv/linux/hppa/Makefile

> +++ b/sysdeps/unix/sysv/linux/hppa/Makefile

> @@ -3,9 +3,12 @@ ifeq ($(subdir),stdlib)

>  gen-as-const-headers += ucontext_i.sym

>  endif

>  

> +ifeq ($(subdir),elf)

>  # Supporting non-executable stacks on HPPA requires changes to both

>  # the Linux kernel and glibc. The kernel currently needs an executable

>  # stack for syscall restarts and signal returns.

> -ifeq ($(subdir),elf)

>  test-xfail-check-execstack = yes

> -endif

> +

> +test-xfail-check-wx-segment = *

> +

> +endif # $(subdir) == elf

>
John David Anglin March 2, 2020, 2:20 a.m. | #2
On 2020-02-28 5:07 a.m., Florian Weimer wrote:
> Would you please help me to add proper comments to the xfails for the

> hppa and sparc ports?

>

> Currently, both (sets of) targets have an writable and executable load

> segment.  Is this because the lack of secure PLT support, like

> originally on POWER?

Currently, the PLT is executable on hppa because it contains an executable trampoline
used during lazy binding.
> The new test passes everywhere else.

>

Attached are test results without your change and with your change, respectively.  Also attached
is the output from the new test.  The test results were:

XFAIL: elf/check-wx-segment
original exit status 1

Dave

-- 
John David Anglin  dave.anglin@bell.net
XPASS: conform/UNIX98/ndbm.h/linknamespace
XPASS: conform/XOPEN2K/ndbm.h/linknamespace
XPASS: conform/XOPEN2K8/ndbm.h/linknamespace
XPASS: conform/XPG42/ndbm.h/linknamespace
FAIL: elf/tst-audit2
UNSUPPORTED: misc/tst-pkey
FAIL: nptl/tst-cleanupx4
FAIL: nptl/tst-cond24
FAIL: nptl/tst-cond25
FAIL: nptl/tst-robustpi8
FAIL: nss/tst-nss-files-hosts-long
FAIL: signal/tst-minsigstksz-1
UNSUPPORTED: stdlib/test-bz22786
FAIL: stdlib/tst-setcontext2
FAIL: stdlib/tst-setcontext7
UNSUPPORTED: stdlib/tst-strtod-overflow
FAIL: support/tst-xsigstack
UNSUPPORTED: time/tst-y2039
Summary of test results:
     10 FAIL
   4539 PASS
      4 UNSUPPORTED
     16 XFAIL
      4 XPASS
XPASS: conform/UNIX98/ndbm.h/linknamespace
XPASS: conform/XOPEN2K/ndbm.h/linknamespace
XPASS: conform/XOPEN2K8/ndbm.h/linknamespace
XPASS: conform/XPG42/ndbm.h/linknamespace
FAIL: elf/tst-audit2
UNSUPPORTED: misc/tst-pkey
FAIL: nptl/tst-cleanupx4
FAIL: nptl/tst-cond24
FAIL: nptl/tst-cond25
FAIL: nss/tst-nss-files-hosts-long
FAIL: signal/tst-minsigstksz-1
UNSUPPORTED: stdlib/test-bz22786
FAIL: stdlib/tst-setcontext2
FAIL: stdlib/tst-setcontext7
UNSUPPORTED: stdlib/tst-strtod-overflow
FAIL: support/tst-xsigstack
UNSUPPORTED: time/tst-y2039
Summary of test results:
      9 FAIL
   4540 PASS
      4 UNSUPPORTED
     17 XFAIL
      4 XPASS
/home/dave/gnu/glibc/objdir/elf/ld.so.phdr: error: WX segment: 'LOAD           0x029928 0x00029928 0x00029928 0x03d08 0x03ed0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/libc.so.phdr: error: WX segment: 'LOAD           0x17b730 0x0017b730 0x0017b730 0x0636c 0x0886c RWE 0x1000'
/home/dave/gnu/glibc/objdir/crypt/libcrypt.so.phdr: error: WX segment: 'LOAD           0x009edc 0x00009edc 0x00009edc 0x00328 0x27444 RWE 0x1000'
/home/dave/gnu/glibc/objdir/debug/libSegFault.so.phdr: error: WX segment: 'LOAD           0x002ef4 0x00002ef4 0x00002ef4 0x00294 0x002a8 RWE 0x1000'
/home/dave/gnu/glibc/objdir/debug/libpcprofile.so.phdr: error: WX segment: 'LOAD           0x001ee4 0x00001ee4 0x00001ee4 0x001ec 0x00204 RWE 0x1000'
/home/dave/gnu/glibc/objdir/dlfcn/libdl.so.phdr: error: WX segment: 'LOAD           0x003e6c 0x00003e6c 0x00003e6c 0x003c4 0x00400 RWE 0x1000'
/home/dave/gnu/glibc/objdir/hesiod/libnss_hesiod.so.phdr: error: WX segment: 'LOAD           0x004ed4 0x00004ed4 0x00004ed4 0x002f8 0x00308 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ANSI_X3.110.so.phdr: error: WX segment: 'LOAD           0x005f00 0x00005f00 0x00005f00 0x00228 0x00238 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ARMSCII-8.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ASMO_449.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/BIG5.so.phdr: error: WX segment: 'LOAD           0x015f00 0x00015f00 0x00015f00 0x00260 0x00270 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/BIG5HKSCS.so.phdr: error: WX segment: 'LOAD           0x039f00 0x00039f00 0x00039f00 0x00200 0x00210 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/BRF.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP10007.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1125.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1250.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1251.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1252.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1253.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1254.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1255.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1256.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1257.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP1258.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP737.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP770.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP771.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP772.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP773.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP774.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP775.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CP932.so.phdr: error: WX segment: 'LOAD           0x017f04 0x00017f04 0x00017f04 0x00218 0x00228 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CSN_369103.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/CWI.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/DEC-MCS.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-AT-DE-A.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-AT-DE.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-CA-FR.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-DK-NO-A.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-DK-NO.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-ES-A.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-ES-S.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-ES.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-FI-SE-A.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-FI-SE.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-FR.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-IS-FRISS.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-IT.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-PT.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-UK.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EBCDIC-US.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ECMA-CYRILLIC.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-CN.so.phdr: error: WX segment: 'LOAD           0x004ef0 0x00004ef0 0x00004ef0 0x002bc 0x002cc RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-JISX0213.so.phdr: error: WX segment: 'LOAD           0x003ef0 0x00003ef0 0x00003ef0 0x00224 0x00234 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-JP-MS.so.phdr: error: WX segment: 'LOAD           0x015ef4 0x00015ef4 0x00015ef4 0x00228 0x00238 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-JP.so.phdr: error: WX segment: 'LOAD           0x003ef0 0x00003ef0 0x00003ef0 0x00238 0x00248 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-KR.so.phdr: error: WX segment: 'LOAD           0x003ef0 0x00003ef0 0x00003ef0 0x0021c 0x0022c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/EUC-TW.so.phdr: error: WX segment: 'LOAD           0x005ef0 0x00005ef0 0x00005ef0 0x00294 0x002a4 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GB18030.so.phdr: error: WX segment: 'LOAD           0x02bf00 0x0002bf00 0x0002bf00 0x00224 0x00234 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GBBIG5.so.phdr: error: WX segment: 'LOAD           0x00df04 0x0000df04 0x0000df04 0x001e4 0x001f4 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GBGBK.so.phdr: error: WX segment: 'LOAD           0x002f04 0x00002f04 0x00002f04 0x001e4 0x001f4 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GBK.so.phdr: error: WX segment: 'LOAD           0x01cf00 0x0001cf00 0x0001cf00 0x00308 0x00318 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GEORGIAN-ACADEMY.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GEORGIAN-PS.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GOST_19768-74.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GREEK-CCITT.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GREEK7-OLD.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/GREEK7.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/HP-GREEK8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/HP-ROMAN8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/HP-ROMAN9.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/HP-THAI8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/HP-TURKISH8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM037.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM038.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1004.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1008.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1008_420.so.phdr: error: WX segment: 'LOAD           0x002f04 0x00002f04 0x00002f04 0x001c0 0x001d0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1025.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1026.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1046.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1047.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1097.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1112.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1122.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1123.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1124.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1129.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1130.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1132.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1133.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1137.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1140.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1141.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1142.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1143.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1144.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1145.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1146.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1147.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1148.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1149.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1153.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1154.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1155.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1156.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1157.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1158.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1160.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1161.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1162.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1163.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1164.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1166.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1167.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM12712.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1364.so.phdr: error: WX segment: 'LOAD           0x024f04 0x00024f04 0x00024f04 0x00200 0x00210 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1371.so.phdr: error: WX segment: 'LOAD           0x01ff04 0x0001ff04 0x0001ff04 0x00200 0x00210 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1388.so.phdr: error: WX segment: 'LOAD           0x02af04 0x0002af04 0x0002af04 0x00200 0x00210 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1390.so.phdr: error: WX segment: 'LOAD           0x038f04 0x00038f04 0x00038f04 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM1399.so.phdr: error: WX segment: 'LOAD           0x038f04 0x00038f04 0x00038f04 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM16804.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM256.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM273.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM274.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM275.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM277.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM278.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM280.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM281.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM284.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM285.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM290.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM297.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM420.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM423.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM424.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM437.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM4517.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM4899.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM4909.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM4971.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM500.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM5347.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM803.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM850.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM851.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM852.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM855.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM856.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM857.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM858.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM860.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM861.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM862.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM863.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM864.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM865.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM866.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM866NAV.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM868.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM869.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM870.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM871.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM874.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM875.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM880.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM891.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM901.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM902.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM903.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM9030.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM904.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM905.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM9066.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM918.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM921.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM922.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM930.so.phdr: error: WX segment: 'LOAD           0x017f04 0x00017f04 0x00017f04 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM932.so.phdr: error: WX segment: 'LOAD           0x011f00 0x00011f00 0x00011f00 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM933.so.phdr: error: WX segment: 'LOAD           0x01cf04 0x0001cf04 0x0001cf04 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM935.so.phdr: error: WX segment: 'LOAD           0x014f04 0x00014f04 0x00014f04 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM937.so.phdr: error: WX segment: 'LOAD           0x01bf04 0x0001bf04 0x0001bf04 0x00204 0x00214 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM939.so.phdr: error: WX segment: 'LOAD           0x017f04 0x00017f04 0x00017f04 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM943.so.phdr: error: WX segment: 'LOAD           0x011f00 0x00011f00 0x00011f00 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IBM9448.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/IEC_P27-1.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/INIS-8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/INIS-CYRILLIC.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/INIS.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISIRI-3342.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-2022-CN-EXT.so.phdr: error: WX segment: 'LOAD           0x009ee4 0x00009ee4 0x00009ee4 0x00364 0x00374 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-2022-CN.so.phdr: error: WX segment: 'LOAD           0x007eec 0x00007eec 0x00007eec 0x00328 0x00338 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-2022-JP-3.so.phdr: error: WX segment: 'LOAD           0x005eec 0x00005eec 0x00005eec 0x0023c 0x0024c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-2022-JP.so.phdr: error: WX segment: 'LOAD           0x00aee4 0x0000aee4 0x0000aee4 0x00340 0x00350 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-2022-KR.so.phdr: error: WX segment: 'LOAD           0x003ef4 0x00003ef4 0x00003ef4 0x00214 0x00224 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-IR-197.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO-IR-209.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO646.so.phdr: error: WX segment: 'LOAD           0x006f04 0x00006f04 0x00006f04 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-1.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f0 0x00200 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-10.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-11.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-13.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-14.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-15.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-16.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-2.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-3.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-4.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-5.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-6.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-7.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-9.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO8859-9E.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_10367-BOX.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_11548-1.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001f0 0x00200 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_2033.so.phdr: error: WX segment: 'LOAD           0x002f00 0x00002f00 0x00002f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_5427-EXT.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_5427.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_5428.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_6937-2.so.phdr: error: WX segment: 'LOAD           0x005f00 0x00005f00 0x00005f00 0x00228 0x00238 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/ISO_6937.so.phdr: error: WX segment: 'LOAD           0x005f00 0x00005f00 0x00005f00 0x00228 0x00238 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/JOHAB.so.phdr: error: WX segment: 'LOAD           0x004ef0 0x00004ef0 0x00004ef0 0x00248 0x00258 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/KOI-8.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001f8 0x00208 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/KOI8-R.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/KOI8-RU.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/KOI8-T.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/KOI8-U.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/LATIN-GREEK-1.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/LATIN-GREEK.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MAC-CENTRALEUROPE.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MAC-IS.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MAC-SAMI.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MAC-UK.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MACINTOSH.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/MIK.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/NATS-DANO.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/NATS-SEFI.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/PT154.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/RK1048.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/SAMI-WS2.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/SHIFT_JISX0213.so.phdr: error: WX segment: 'LOAD           0x003ef0 0x00003ef0 0x00003ef0 0x00224 0x00234 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/SJIS.so.phdr: error: WX segment: 'LOAD           0x017f00 0x00017f00 0x00017f00 0x00214 0x00224 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/T.61.so.phdr: error: WX segment: 'LOAD           0x004f00 0x00004f00 0x00004f00 0x00208 0x00218 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/TCVN5712-1.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x0020c 0x0021c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/TIS-620.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/TSCII.so.phdr: error: WX segment: 'LOAD           0x004f04 0x00004f04 0x00004f04 0x00204 0x00214 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/UHC.so.phdr: error: WX segment: 'LOAD           0x011ef0 0x00011ef0 0x00011ef0 0x00220 0x00230 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/UNICODE.so.phdr: error: WX segment: 'LOAD           0x003f04 0x00003f04 0x00003f04 0x001f4 0x00204 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/UTF-16.so.phdr: error: WX segment: 'LOAD           0x004f04 0x00004f04 0x00004f04 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/UTF-32.so.phdr: error: WX segment: 'LOAD           0x003f04 0x00003f04 0x00003f04 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/UTF-7.so.phdr: error: WX segment: 'LOAD           0x004f04 0x00004f04 0x00004f04 0x00204 0x00214 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/VISCII.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x001fc 0x0020c RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libCNS.so.phdr: error: WX segment: 'LOAD           0x072efc 0x00072efc 0x00072efc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libGB.so.phdr: error: WX segment: 'LOAD           0x010efc 0x00010efc 0x00010efc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libISOIR165.so.phdr: error: WX segment: 'LOAD           0x00eefc 0x0000eefc 0x0000eefc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libJIS.so.phdr: error: WX segment: 'LOAD           0x018efc 0x00018efc 0x00018efc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libJISX0213.so.phdr: error: WX segment: 'LOAD           0x01defc 0x0001defc 0x0001defc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/iconvdata/libKSC.so.phdr: error: WX segment: 'LOAD           0x00befc 0x0000befc 0x0000befc 0x00190 0x001a0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/locale/libBrokenLocale.so.phdr: error: WX segment: 'LOAD           0x001eec 0x00001eec 0x00001eec 0x001ac 0x001bc RWE 0x1000'
/home/dave/gnu/glibc/objdir/login/libutil.so.phdr: error: WX segment: 'LOAD           0x002ee4 0x00002ee4 0x00002ee4 0x002c4 0x002d4 RWE 0x1000'
/home/dave/gnu/glibc/objdir/malloc/libmemusage.so.phdr: error: WX segment: 'LOAD           0x005ed0 0x00005ed0 0x00005ed0 0x00370 0x184470 RWE 0x1000'
/home/dave/gnu/glibc/objdir/math/libm.so.phdr: error: WX segment: 'LOAD           0x075ee0 0x00075ee0 0x00075ee0 0x02760 0x02774 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nis/libnsl.so.phdr: error: WX segment: 'LOAD           0x016d28 0x00016d28 0x00016d28 0x00d00 0x032e0 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nptl/libpthread.so.phdr: error: WX segment: 'LOAD           0x021e00 0x00021e00 0x00021e00 0x00974 0x02a1c RWE 0x1000'
/home/dave/gnu/glibc/objdir/nptl_db/libthread_db.so.phdr: error: WX segment: 'LOAD           0x008ee8 0x00008ee8 0x00008ee8 0x00474 0x00490 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nss/libnss_compat.so.phdr: error: WX segment: 'LOAD           0x008e64 0x00008e64 0x00008e64 0x005a0 0x00b34 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nss/libnss_db.so.phdr: error: WX segment: 'LOAD           0x008e1c 0x00008e1c 0x00008e1c 0x004fc 0x03820 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nss/libnss_files.so.phdr: error: WX segment: 'LOAD           0x00cddc 0x0000cddc 0x0000cddc 0x00664 0x06a24 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nss/libnss_test1.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x002fc 0x00398 RWE 0x1000'
/home/dave/gnu/glibc/objdir/nss/libnss_test2.so.phdr: error: WX segment: 'LOAD           0x003f00 0x00003f00 0x00003f00 0x002fc 0x00398 RWE 0x1000'
/home/dave/gnu/glibc/objdir/resolv/libanl.so.phdr: error: WX segment: 'LOAD           0x003ed0 0x00003ed0 0x00003ed0 0x00364 0x003d8 RWE 0x1000'
/home/dave/gnu/glibc/objdir/resolv/libnss_dns.so.phdr: error: WX segment: 'LOAD           0x005ed4 0x00005ed4 0x00005ed4 0x002b8 0x002c8 RWE 0x1000'
/home/dave/gnu/glibc/objdir/resolv/libresolv.so.phdr: error: WX segment: 'LOAD           0x016b24 0x00016b24 0x00016b24 0x00a2c 0x03078 RWE 0x1000'
/home/dave/gnu/glibc/objdir/rt/librt.so.phdr: error: WX segment: 'LOAD           0x008ea8 0x00008ea8 0x00008ea8 0x00598 0x00684 RWE 0x1000'
Florian Weimer March 2, 2020, 9:13 a.m. | #3
* John David Anglin:

> On 2020-02-28 5:07 a.m., Florian Weimer wrote:

>> Would you please help me to add proper comments to the xfails for the

>> hppa and sparc ports?

>>

>> Currently, both (sets of) targets have an writable and executable load

>> segment.  Is this because the lack of secure PLT support, like

>> originally on POWER?


> Currently, the PLT is executable on hppa because it contains an

> executable trampoline used during lazy binding.


Thanks, I've updated the patch.

>> The new test passes everywhere else.

>>

> Attached are test results without your change and with your change,

> respectively.  Also attached is the output from the new test.  The

> test results were:

>

> XFAIL: elf/check-wx-segment

> original exit status 1


It's a cross-test, so it runs during build-many-glibcs.py, too.

Adhemerval, I've incorporated your comments as well.

Okay for master?

Thanks,
Florian
8<------------------------------------------------------------------8<
Writable, executable segments defeat security hardening.  The
existing check for DT_TEXTREL does not catch this.

hppa and SPARC currently keep the PLT in an RWX load segment.

-----
 elf/Makefile                          |  7 +++
 scripts/check-wx-segment.py           | 85 +++++++++++++++++++++++++++++++++++
 sysdeps/sparc/Makefile                |  9 ++++
 sysdeps/unix/sysv/linux/hppa/Makefile |  9 +++-
 4 files changed, 108 insertions(+), 2 deletions(-)

diff --git a/elf/Makefile b/elf/Makefile
index a137143db7..da689a2c7b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -402,6 +402,7 @@ tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \
 		 $(objpfx)tst-rtld-preload.out
 endif
 tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \
+		 $(objpfx)check-wx-segment.out \
 		 $(objpfx)check-localplt.out $(objpfx)check-initfini.out
 endif
 
@@ -1180,6 +1181,12 @@ $(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \
 	$(evaluate-test)
 generated += check-execstack.out
 
+$(objpfx)check-wx-segment.out: $(..)scripts/check-wx-segment.py \
+			      $(all-built-dso:=.phdr)
+	$(PYTHON) $^ --xfail="$(check-wx-segment-xfail)" > $@; \
+	$(evaluate-test)
+generated += check-wx-segment.out
+
 $(objpfx)tst-dlmodcount: $(libdl)
 $(objpfx)tst-dlmodcount.out: $(test-modules)
 
diff --git a/scripts/check-wx-segment.py b/scripts/check-wx-segment.py
new file mode 100644
index 0000000000..e1fa79387c
--- /dev/null
+++ b/scripts/check-wx-segment.py
@@ -0,0 +1,85 @@
+#!/usr/bin/python3
+# Check ELF program headers for WX segments.
+# Copyright (C) 2020 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+"""Check that the program headers do not contain write-exec segments."""
+
+import argparse
+import os.path
+import re
+import sys
+
+# Regular expression to extract the RWE flags field.  The
+# address/offset columns have varying width.
+RE_LOAD = re.compile(
+    r'^  LOAD +(?:0x[0-9a-fA-F]+ +){5}([R ][W ][ E]) +0x[0-9a-fA-F]+\n\Z')
+
+def process_file(path, inp, xfail):
+    """Analyze one input file."""
+
+    errors = 0
+    for line in inp:
+        error = None
+        if line.startswith('  LOAD '):
+            match = RE_LOAD.match(line)
+            if match is None:
+                error = 'Invalid LOAD line'
+            else:
+                flags, = match.groups()
+                if 'W' in flags and 'E' in flags:
+                    if xfail:
+                        print('{}: warning: WX segment (as expected)'.format(
+                            path))
+                    else:
+                        error = 'WX segment'
+
+        if error is not None:
+            print('{}: error: {}: {!r}'.format(path, error, line.strip()))
+            errors += 1
+
+    if xfail and errors == 0:
+        print('{}: warning: missing expected WX segment'.format(path))
+    return errors
+
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_argument('--xfail',
+                        help='Mark input files as XFAILed ("*" for all)',
+                        type=str, default='')
+    parser.add_argument('phdrs',
+                        help='Files containing readelf -Wl output',
+                        nargs='*')
+    opts = parser.parse_args(sys.argv)
+
+    xfails = set(opts.xfail.split(' '))
+    xfails_all = opts.xfail.strip() == '*'
+
+    errors = 0
+    for path in opts.phdrs:
+        xfail = ((os.path.basename(path) + '.phdrs') in xfails
+                 or xfails_all)
+        with open(path) as inp:
+            errors += process_file(path, inp, xfail)
+    if errors > 0:
+        sys.exit(1)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile
index 38b33af6e0..c123b527b5 100644
--- a/sysdeps/sparc/Makefile
+++ b/sysdeps/sparc/Makefile
@@ -16,6 +16,15 @@ CPPFLAGS-crti.S += -fPIC
 CPPFLAGS-crtn.S += -fPIC
 endif
 
+ifeq ($(subdir),elf)
+
+# Lazy binding on SPARC rewrites the PLT sequence.  See the Solaris
+# Linker and Libraries Guide, section SPARC: Procedure Linkage Table.
+# <https://docs.oracle.com/cd/E19455-01/816-0559/chapter6-1236/index.html>
+test-xfail-check-wx-segment = *
+
+endif # $(subdir) == elf
+
 # nscd uses atomic_spin_nop which in turn requires cpu_relax
 ifeq ($(subdir),nscd)
 routines += cpu_relax
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
index e1637f54f5..c89ec83182 100644
--- a/sysdeps/unix/sysv/linux/hppa/Makefile
+++ b/sysdeps/unix/sysv/linux/hppa/Makefile
@@ -3,9 +3,14 @@ ifeq ($(subdir),stdlib)
 gen-as-const-headers += ucontext_i.sym
 endif
 
+ifeq ($(subdir),elf)
 # Supporting non-executable stacks on HPPA requires changes to both
 # the Linux kernel and glibc. The kernel currently needs an executable
 # stack for syscall restarts and signal returns.
-ifeq ($(subdir),elf)
 test-xfail-check-execstack = yes
-endif
+
+# On hppa, the PLT is executable because it contains an executable
+# trampoline used during lazy binding.
+test-xfail-check-wx-segment = *
+
+endif # $(subdir) == elf
Adhemerval Zanella March 2, 2020, 12:08 p.m. | #4
On 02/03/2020 06:13, Florian Weimer wrote:
> * John David Anglin:

> 

>> On 2020-02-28 5:07 a.m., Florian Weimer wrote:

>>> Would you please help me to add proper comments to the xfails for the

>>> hppa and sparc ports?

>>>

>>> Currently, both (sets of) targets have an writable and executable load

>>> segment.  Is this because the lack of secure PLT support, like

>>> originally on POWER?

> 

>> Currently, the PLT is executable on hppa because it contains an

>> executable trampoline used during lazy binding.

> 

> Thanks, I've updated the patch.

> 

>>> The new test passes everywhere else.

>>>

>> Attached are test results without your change and with your change,

>> respectively.  Also attached is the output from the new test.  The

>> test results were:

>>

>> XFAIL: elf/check-wx-segment

>> original exit status 1

> 

> It's a cross-test, so it runs during build-many-glibcs.py, too.

> 

> Adhemerval, I've incorporated your comments as well.

> 

> Okay for master?


LGTM, thanks.

> 

> Thanks,

> Florian

> 8<------------------------------------------------------------------8<

> Writable, executable segments defeat security hardening.  The

> existing check for DT_TEXTREL does not catch this.

> 

> hppa and SPARC currently keep the PLT in an RWX load segment.

> 

> -----

>  elf/Makefile                          |  7 +++

>  scripts/check-wx-segment.py           | 85 +++++++++++++++++++++++++++++++++++

>  sysdeps/sparc/Makefile                |  9 ++++

>  sysdeps/unix/sysv/linux/hppa/Makefile |  9 +++-

>  4 files changed, 108 insertions(+), 2 deletions(-)

> 

> diff --git a/elf/Makefile b/elf/Makefile

> index a137143db7..da689a2c7b 100644

> --- a/elf/Makefile

> +++ b/elf/Makefile

> @@ -402,6 +402,7 @@ tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \

>  		 $(objpfx)tst-rtld-preload.out

>  endif

>  tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \

> +		 $(objpfx)check-wx-segment.out \

>  		 $(objpfx)check-localplt.out $(objpfx)check-initfini.out

>  endif

>  

> @@ -1180,6 +1181,12 @@ $(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \

>  	$(evaluate-test)

>  generated += check-execstack.out

>  

> +$(objpfx)check-wx-segment.out: $(..)scripts/check-wx-segment.py \

> +			      $(all-built-dso:=.phdr)

> +	$(PYTHON) $^ --xfail="$(check-wx-segment-xfail)" > $@; \

> +	$(evaluate-test)

> +generated += check-wx-segment.out

> +

>  $(objpfx)tst-dlmodcount: $(libdl)

>  $(objpfx)tst-dlmodcount.out: $(test-modules)

>  

> diff --git a/scripts/check-wx-segment.py b/scripts/check-wx-segment.py

> new file mode 100644

> index 0000000000..e1fa79387c

> --- /dev/null

> +++ b/scripts/check-wx-segment.py

> @@ -0,0 +1,85 @@

> +#!/usr/bin/python3

> +# Check ELF program headers for WX segments.

> +# Copyright (C) 2020 Free Software Foundation, Inc.

> +# This file is part of the GNU C Library.

> +#

> +# The GNU C Library is free software; you can redistribute it and/or

> +# modify it under the terms of the GNU Lesser General Public

> +# License as published by the Free Software Foundation; either

> +# version 2.1 of the License, or (at your option) any later version.

> +#

> +# The GNU C Library is distributed in the hope that it will be useful,

> +# but WITHOUT ANY WARRANTY; without even the implied warranty of

> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU

> +# Lesser General Public License for more details.

> +#

> +# You should have received a copy of the GNU Lesser General Public

> +# License along with the GNU C Library; if not, see

> +# <https://www.gnu.org/licenses/>.

> +

> +"""Check that the program headers do not contain write-exec segments."""

> +

> +import argparse

> +import os.path

> +import re

> +import sys

> +

> +# Regular expression to extract the RWE flags field.  The

> +# address/offset columns have varying width.

> +RE_LOAD = re.compile(

> +    r'^  LOAD +(?:0x[0-9a-fA-F]+ +){5}([R ][W ][ E]) +0x[0-9a-fA-F]+\n\Z')

> +

> +def process_file(path, inp, xfail):

> +    """Analyze one input file."""

> +

> +    errors = 0

> +    for line in inp:

> +        error = None

> +        if line.startswith('  LOAD '):

> +            match = RE_LOAD.match(line)

> +            if match is None:

> +                error = 'Invalid LOAD line'

> +            else:

> +                flags, = match.groups()

> +                if 'W' in flags and 'E' in flags:

> +                    if xfail:

> +                        print('{}: warning: WX segment (as expected)'.format(

> +                            path))

> +                    else:

> +                        error = 'WX segment'

> +

> +        if error is not None:

> +            print('{}: error: {}: {!r}'.format(path, error, line.strip()))

> +            errors += 1

> +

> +    if xfail and errors == 0:

> +        print('{}: warning: missing expected WX segment'.format(path))

> +    return errors

> +

> +

> +def main():

> +    """The main entry point."""

> +    parser = argparse.ArgumentParser(description=__doc__)

> +    parser.add_argument('--xfail',

> +                        help='Mark input files as XFAILed ("*" for all)',

> +                        type=str, default='')

> +    parser.add_argument('phdrs',

> +                        help='Files containing readelf -Wl output',

> +                        nargs='*')

> +    opts = parser.parse_args(sys.argv)

> +

> +    xfails = set(opts.xfail.split(' '))

> +    xfails_all = opts.xfail.strip() == '*'

> +

> +    errors = 0

> +    for path in opts.phdrs:

> +        xfail = ((os.path.basename(path) + '.phdrs') in xfails

> +                 or xfails_all)

> +        with open(path) as inp:

> +            errors += process_file(path, inp, xfail)

> +    if errors > 0:

> +        sys.exit(1)

> +

> +

> +if __name__ == '__main__':

> +    main()

> diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile

> index 38b33af6e0..c123b527b5 100644

> --- a/sysdeps/sparc/Makefile

> +++ b/sysdeps/sparc/Makefile

> @@ -16,6 +16,15 @@ CPPFLAGS-crti.S += -fPIC

>  CPPFLAGS-crtn.S += -fPIC

>  endif

>  

> +ifeq ($(subdir),elf)

> +

> +# Lazy binding on SPARC rewrites the PLT sequence.  See the Solaris

> +# Linker and Libraries Guide, section SPARC: Procedure Linkage Table.

> +# <https://docs.oracle.com/cd/E19455-01/816-0559/chapter6-1236/index.html>

> +test-xfail-check-wx-segment = *

> +

> +endif # $(subdir) == elf

> +

>  # nscd uses atomic_spin_nop which in turn requires cpu_relax

>  ifeq ($(subdir),nscd)

>  routines += cpu_relax

> diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile

> index e1637f54f5..c89ec83182 100644

> --- a/sysdeps/unix/sysv/linux/hppa/Makefile

> +++ b/sysdeps/unix/sysv/linux/hppa/Makefile

> @@ -3,9 +3,14 @@ ifeq ($(subdir),stdlib)

>  gen-as-const-headers += ucontext_i.sym

>  endif

>  

> +ifeq ($(subdir),elf)

>  # Supporting non-executable stacks on HPPA requires changes to both

>  # the Linux kernel and glibc. The kernel currently needs an executable

>  # stack for syscall restarts and signal returns.

> -ifeq ($(subdir),elf)

>  test-xfail-check-execstack = yes

> -endif

> +

> +# On hppa, the PLT is executable because it contains an executable

> +# trampoline used during lazy binding.

> +test-xfail-check-wx-segment = *

> +

> +endif # $(subdir) == elf

>

Patch

diff --git a/elf/Makefile b/elf/Makefile
index a137143db7..da689a2c7b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -402,6 +402,7 @@  tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \
 		 $(objpfx)tst-rtld-preload.out
 endif
 tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \
+		 $(objpfx)check-wx-segment.out \
 		 $(objpfx)check-localplt.out $(objpfx)check-initfini.out
 endif
 
@@ -1180,6 +1181,12 @@  $(objpfx)check-execstack.out: $(..)scripts/check-execstack.awk \
 	$(evaluate-test)
 generated += check-execstack.out
 
+$(objpfx)check-wx-segment.out: $(..)scripts/check-wx-segment.py \
+			      $(all-built-dso:=.phdr)
+	$(PYTHON) $^ --xfail="$(check-wx-segment-xfail)" > $@; \
+	$(evaluate-test)
+generated += check-wx-segment.out
+
 $(objpfx)tst-dlmodcount: $(libdl)
 $(objpfx)tst-dlmodcount.out: $(test-modules)
 
diff --git a/scripts/check-wx-segment.py b/scripts/check-wx-segment.py
new file mode 100644
index 0000000000..c3553eeef9
--- /dev/null
+++ b/scripts/check-wx-segment.py
@@ -0,0 +1,85 @@ 
+#!/usr/bin/python3
+# Check ELF program headers for WX segments.
+# Copyright (C) 2020 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+"""Check that the program headers do not contain write-exec segments."""
+
+import argparse
+import os.path
+import re
+import sys
+
+# Regular expression to extract the RWE flags field.  The
+# address/offset columns have varying width.
+RE_LOAD = re.compile(
+    r'^  LOAD +(?:0x[0-9a-fA-F]+ +){5}([R ][W ][ E]) +0x[0-9a-fA-F]+\n\Z')
+
+def process_file(path, inp, xfail):
+    """Analyze one input file."""
+
+    errors = 0
+    for line in inp:
+        error = None
+        if line.startswith('  LOAD '):
+            match = RE_LOAD.match(line)
+            if match is None:
+                error = 'Invalid LOAD line'
+            else:
+                flags, = match.groups()
+                if 'W' in flags and 'E' in flags:
+                    if xfail:
+                        print('{}: warning: WX segment (as expected)'.format(
+                            path))
+                    else:
+                        error = 'WX segment'
+
+        if error is not None:
+            print('{}: error: {}: {!r}'.format(path, error, line.strip()))
+            errors += 1
+
+    if xfail and errors == 0:
+        print('{}: warning: missing expected WX segment'.format(path))
+    return errors
+
+
+def main():
+    """The main entry point."""
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_argument('--xfail',
+                        help='Run this number of jobs in parallel',
+                        type=str, default='')
+    parser.add_argument('phdrs',
+                        help='Files containing readelf -Wl output',
+                        nargs='*')
+    opts = parser.parse_args(sys.argv)
+
+    xfails = set(opts.xfail.split(' '))
+    xfails_all = opts.xfail.strip() == '*'
+
+    errors = 0
+    for path in opts.phdrs:
+        xfail = ((os.path.basename(path) + '.phdrs') in xfails
+                 or xfails_all)
+        with open(path) as inp:
+            errors += process_file(path, inp, xfail)
+    if errors > 0:
+        sys.exit(1)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile
index 38b33af6e0..3ceb8d0298 100644
--- a/sysdeps/sparc/Makefile
+++ b/sysdeps/sparc/Makefile
@@ -16,6 +16,10 @@  CPPFLAGS-crti.S += -fPIC
 CPPFLAGS-crtn.S += -fPIC
 endif
 
+ifeq ($(subdir),elf)
+test-xfail-check-wx-segment = *
+endif # $(subdir) == elf
+
 # nscd uses atomic_spin_nop which in turn requires cpu_relax
 ifeq ($(subdir),nscd)
 routines += cpu_relax
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
index e1637f54f5..1e7340418b 100644
--- a/sysdeps/unix/sysv/linux/hppa/Makefile
+++ b/sysdeps/unix/sysv/linux/hppa/Makefile
@@ -3,9 +3,12 @@  ifeq ($(subdir),stdlib)
 gen-as-const-headers += ucontext_i.sym
 endif
 
+ifeq ($(subdir),elf)
 # Supporting non-executable stacks on HPPA requires changes to both
 # the Linux kernel and glibc. The kernel currently needs an executable
 # stack for syscall restarts and signal returns.
-ifeq ($(subdir),elf)
 test-xfail-check-execstack = yes
-endif
+
+test-xfail-check-wx-segment = *
+
+endif # $(subdir) == elf