Skip to content

Commit

Permalink
[configure.ac] Enable some extra linker flags for extra security
Browse files Browse the repository at this point in the history
Make some ELF sections readonly with -z relro and -z relro now

See: https://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_RELRO_.28ld_-z_relro.29

Signed-off-by: Philippe De Swert <philippe.deswert@gmail.com>
  • Loading branch information
Philippe De Swert authored and spiiroin committed Nov 2, 2016
1 parent 61b928b commit e7d7bcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -23,6 +23,7 @@ test_gcc_flag() {
# We use gnu99 instead of c99 because many have interpreted the standard
# in a way that int64_t isn't defined on non-64 bit platforms.
CFLAGS="-Os -std=gnu99 -Wall -W -Wextra -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -finline-small-functions -Wno-unused-result -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now -fPIE -fpie -pie"
LDFLAGS="-z relro -z now"

AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[Enable debug @<:@default=false@:>@]),
[case "${enableval}" in
Expand Down

0 comments on commit e7d7bcc

Please sign in to comment.