1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

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

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.
This commit is contained in:
Florian Weimer
2020-03-02 14:24:27 +01:00
parent b5b7fb76e1
commit 0499a353a6
4 changed files with 108 additions and 2 deletions

View File

@ -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