mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
Revert "build: add way to keep unused symbols when linking NetworkManager"
This approach does not seem to work with clang 3.4 (rhel-7). Instead,
make sure we actually use the symbol in NetworkManager so that it gets
preserved for the OVS device plugin.
This reverts commit 684f2acffe
.
This commit is contained in:
parent
6bd506dfb8
commit
a8929bbfc3
10
Makefile.am
10
Makefile.am
|
@ -2662,14 +2662,6 @@ $(src_core_libNetworkManagerTest_la_OBJECTS): $(src_libnm_core_public_mkenums_h)
|
|||
|
||||
###############################################################################
|
||||
|
||||
# NetworkManager binary also must contain symbols that are not used by the binary
|
||||
# itself, but by the plugins (that are dlopened). We need to explicitly include
|
||||
# them during linking.
|
||||
networkmanager_undefined_symbols = \
|
||||
nm_sudo_call_get_fd \
|
||||
nm_sudo_utils_open_fd \
|
||||
$(NULL)
|
||||
|
||||
noinst_PROGRAMS += src/core/NetworkManager-all-sym
|
||||
|
||||
src_core_NetworkManager_all_sym_CPPFLAGS = $(src_core_cppflags)
|
||||
|
@ -2684,7 +2676,6 @@ src_core_NetworkManager_all_sym_LDADD = \
|
|||
|
||||
src_core_NetworkManager_all_sym_LDFLAGS = \
|
||||
-rdynamic \
|
||||
$(networkmanager_undefined_symbols:%=-u %) \
|
||||
$(SANITIZER_EXEC_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
|
@ -2711,7 +2702,6 @@ src_core_NetworkManager_LDADD = \
|
|||
src_core_NetworkManager_LDFLAGS = \
|
||||
-rdynamic \
|
||||
-Wl,--version-script="src/core/NetworkManager.ver" \
|
||||
$(networkmanager_undefined_symbols:%=-u %) \
|
||||
$(SANITIZER_EXEC_LDFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -271,17 +271,6 @@ endif
|
|||
subdir('devices')
|
||||
subdir('settings/plugins')
|
||||
|
||||
# NetworkManager binary also must contain symbols that are not used by the binary
|
||||
# itself, but by the plugins (that are dlopened). We need to explicitly include
|
||||
# them during linking.
|
||||
networkmanager_undefined_symbols_args = []
|
||||
foreach s: [
|
||||
'nm_sudo_call_get_fd',
|
||||
'nm_sudo_utils_open_fd',
|
||||
]
|
||||
networkmanager_undefined_symbols_args += ['-u', s]
|
||||
endforeach
|
||||
|
||||
# NetworkManager binary
|
||||
|
||||
# libNetworkManager.a, as built by meson doesn't contain all symbols
|
||||
|
@ -296,9 +285,7 @@ NetworkManager_all_sym = executable(
|
|||
nm_deps,
|
||||
libudev_dep,
|
||||
],
|
||||
link_args: [
|
||||
'-Wl,--no-gc-sections',
|
||||
] + networkmanager_undefined_symbols_args,
|
||||
link_args: '-Wl,--no-gc-sections',
|
||||
link_whole: [
|
||||
libNetworkManager,
|
||||
libNetworkManagerBase,
|
||||
|
@ -359,7 +346,7 @@ NetworkManager = executable(
|
|||
link_args: [
|
||||
'-rdynamic',
|
||||
'-Wl,--version-script,@0@'.format(ver_script.full_path()),
|
||||
] + networkmanager_undefined_symbols_args,
|
||||
],
|
||||
link_depends: ver_script,
|
||||
install: true,
|
||||
install_dir: nm_sbindir,
|
||||
|
|
Loading…
Reference in a new issue