security: data relocation and protection(RELRO)

RELRO rearranges the data sections inside an ELF
executable. It also marks certain areas as 'read-only'
so that these data structures cannot be overwritten while
the process is running.

Tracked-On: 224003
Signed-off-by: wenshelx <wenshengx.wang@intel.com>
This commit is contained in:
wenshelx 2018-02-11 16:35:15 +08:00 committed by Jack Ren
parent 927b1edc19
commit 7408fda58e

View File

@ -40,6 +40,7 @@ endif
endif endif
LDFLAGS += -Wl,-z,noexecstack LDFLAGS += -Wl,-z,noexecstack
LDFLAGS += -Wl,-z,relro,-z,now
LIBS = -lrt LIBS = -lrt
LIBS += -lpthread LIBS += -lpthread