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.
This commit is contained in:
Max Kellermann 2020-11-04 13:38:20 +01:00
parent bb009daf66
commit 4f40b9f7cf
1 changed files with 5 additions and 0 deletions

View File

@ -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'