summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2020-05-04 16:07:01 +1000
committerDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2020-12-19 12:39:35 +1100
commitd23b3fddd62cf5310c7f8869663ddb1c54c192dc (patch)
tree44143559a81b4d5ed7c6c93bb6826989b93e4243
parent6f7f010b69326eac4e8ee6e0ea7275aaf3232c80 (diff)
downloaddconf-d23b3fddd62cf5310c7f8869663ddb1c54c192dc.tar.gz
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.
-rw-r--r--client/meson.build5
-rw-r--r--client/symbol.map14
2 files changed, 19 insertions, 0 deletions
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:
+ *;
+};