mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
meson: link NSS modules with -z nodelete (#7607)
We might end up allocating mempools, and when we are unloaded we might orphan them, thus leaking them. Hence, let's just stick around for good, so the mempools remain referenced continously and for good, and thus no memory is leaked (though the memory isn't cleaned up either). Fixes: #7596
This commit is contained in:
parent
cb9eeb062c
commit
b4b36f4405
@ -1333,7 +1333,9 @@ foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'],
|
||||
'src/nss-@0@/nss-@0@.c'.format(module),
|
||||
version : '2',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
|
||||
link_args : ['-Wl,-z,nodelete',
|
||||
'-shared',
|
||||
'-Wl,--version-script=' + version_script_arg,
|
||||
'-Wl,--undefined'],
|
||||
link_with : [libsystemd_internal,
|
||||
|
Loading…
Reference in New Issue
Block a user