diff --git a/node.gypi b/node.gypi index 0d66a842ad4..fd7c70a12b1 100644 --- a/node.gypi +++ b/node.gypi @@ -291,7 +291,10 @@ [ 'OS=="sunos"', { 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], }], - + [ 'OS in "freebsd linux"', { + 'ldflags': [ '-Wl,-z,relro', + '-Wl,-z,now' ] + }], [ 'node_use_openssl=="true"', { 'defines': [ 'HAVE_OPENSSL=1' ], 'conditions': [