summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-11-04 13:38:20 +0100
committerMax Kellermann <max@musicpd.org>2020-11-04 13:43:21 +0100
commit4f40b9f7cfd1e83f043077da51541546d6c9708a (patch)
tree04fbfd053c3180bf70271da1980018fe92b6e95d /meson.build
parentbb009daf66372ffa102d432df2643502891cbe6c (diff)
meson.build: disable ld.so lazy binding and enable relro
Since MPD is a long-running daemon, it doesn't make sense to use dynamic binding. That allows the relocations to be read-only ("relro"), which a hardening feature.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index d70c9bf10..a98271484 100644
--- a/meson.build
+++ b/meson.build
@@ -96,6 +96,11 @@ test_cflags = test_common_flags + [
]
test_ldflags = [
+ # make relocations read-only (hardening)
+ '-Wl,-z,relro',
+
+ # no lazy binding, please - not worth it for a daemon
+ '-Wl,-z,now',
]
if get_option('buildtype') != 'debug'