From d23b3fddd62cf5310c7f8869663ddb1c54c192dc Mon Sep 17 00:00:00 2001 From: Daniel Playfair Cal Date: Mon, 4 May 2020 16:07:01 +1000 Subject: client: add symbol map This is similar to what is done in in libdconfsettings to prevent symbols not part of the API from being available in the compiled binaries. In practice, this makes it possible to include more code in the common directory without creating new symbols in libdconf. --- client/meson.build | 5 +++++ client/symbol.map | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 client/symbol.map diff --git a/client/meson.build b/client/meson.build index e9672b8..0308dc2 100644 --- a/client/meson.build +++ b/client/meson.build @@ -32,6 +32,9 @@ client_deps = [ libdconf_gdbus_thread_dep, ] +symbol_map = join_paths(meson.current_source_dir(), 'symbol.map') +ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map)) + libdconf = shared_library( 'dconf', sources: sources, @@ -40,6 +43,8 @@ libdconf = shared_library( include_directories: top_inc, dependencies: client_deps, c_args: dconf_c_args, + link_args: ldflags, + link_depends: symbol_map, install: true, ) diff --git a/client/symbol.map b/client/symbol.map new file mode 100644 index 0000000..2fc9983 --- /dev/null +++ b/client/symbol.map @@ -0,0 +1,14 @@ +{ +global: + dconf_client_*; + dconf_changeset_*; + dconf_error_quark; + dconf_is_path; + dconf_is_key; + dconf_is_dir; + dconf_is_rel_path; + dconf_is_rel_key; + dconf_is_rel_dir; +local: + *; +}; -- cgit v1.2.1