Project

General

Profile

Actions

Feature #1700

closed

enable "relro" and "now" in compile options for 3.0

Added by JP Pozzi almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

Hello,

I compile the 3.0 version and wants to compile it with "-z relro -z now", but, even if some options are in the Makefiles I didn't succeed. On my Debian the "hardening check" says always :

-------------------------------------------------------------------
 Position Independent Executable: yes
 Stack protected: yes
 Fortify Source functions: yes (some protected functions found)
 Read-only relocations: no
 Immediate binding: no
--------------------------------------------------------------------

I had to modify the Makefile in "src" adding :
-Wl,-z,relro -Wl,-z,now
at the end of the line :
SECCFLAGS = -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
I get now :
-------------------------------------------------------------------
 Position Independent Executable: yes
 Stack protected: yes
 Fortify Source functions: yes (some protected functions found)
 Read-only relocations: yes
 Immediate binding: yes
-------------------------------------------------------------------

Regards

JP P

Actions

Also available in: Atom PDF