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:
@ -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
|
||||
|
Reference in New Issue
Block a user