From 4f40b9f7cfd1e83f043077da51541546d6c9708a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Nov 2020 13:38:20 +0100 Subject: [PATCH] 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. --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) 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'