mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
libsystemd: link with '-z nodelete'
We want to avoid reinitialization of our global variables with static storage duration in case we get dlopened multiple times by the same application. This will avoid potential resource leaks that could have happened otherwise (e.g. leaking journal socket fd).
This commit is contained in:
parent
9fb2db89e3
commit
9d8533b715
@ -2069,6 +2069,8 @@ libsystemd = shared_library(
|
||||
version : libsystemd_version,
|
||||
include_directories : libsystemd_includes,
|
||||
link_args : ['-shared',
|
||||
# Make sure our library is never deleted from memory, so that our open logging fds don't leak on dlopen/dlclose cycles.
|
||||
'-z', 'nodelete',
|
||||
'-Wl,--version-script=' + libsystemd_sym_path],
|
||||
link_with : [libbasic],
|
||||
link_whole : [libsystemd_static],
|
||||
|
Loading…
Reference in New Issue
Block a user