aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2012-02-17 15:56:28 -0500
committerGerrit <chrome-bot@google.com>2012-06-26 09:49:15 -0700
commit1fc8100de99064d7a383d0bff8d9aac40567b788 (patch)
tree29741be398f6b4f19334e470f2cfd7ca0e2985bc
parent8c5ef97fffd6e69d5759ad4ad9ab0bce1049b806 (diff)
downloadlibbrillo-1fc8100de99064d7a383d0bff8d9aac40567b788.tar.gz
libpolicy: only export symbols we want to
Only the policy namespace is exported in the policy headers, so make sure we hide all other symbols. Otherwise we end up exporting symbols that we imported from libbase. BUG=chromium-os:26654 TEST=`emerge-x86-alex libchromeos update_manager metrics` still works TEST=`libpolicy_unittest` passes TEST=`cbuildbot arm-generic-full` passes Change-Id: I9023e9adb9846f9da6c7a04fddd0d60212d18fc0 Reviewed-on: https://gerrit.chromium.org/gerrit/16288 Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org>
-rw-r--r--SConstruct3
-rw-r--r--libpolicy.ver18
2 files changed, 20 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index ee96e61..a9fdefd 100644
--- a/SConstruct
+++ b/SConstruct
@@ -171,7 +171,8 @@ env.Append(
LIBS = [libchromeos, 'protobuf-lite', 'pthread', 'rt'],
LIBPATH = ['.', '../third_party/chrome'],
LINKFLAGS = ['-Wl,--as-needed', '-Wl,-z,defs',
- '-Wl,-soname,lib%s.so' % libpolicy],
+ '-Wl,-soname,lib%s.so' % libpolicy,
+ '-Wl,--version-script,libpolicy.ver'],
)
# Build the protobuf definitions.
diff --git a/libpolicy.ver b/libpolicy.ver
new file mode 100644
index 0000000..8c01cdf
--- /dev/null
+++ b/libpolicy.ver
@@ -0,0 +1,18 @@
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ global:
+ extern "C++" {
+ enterprise_management::*;
+ typeinfo*for*enterprise_management::*;
+ vtable*for*enterprise_management*;
+
+ policy::*;
+ typeinfo*for*policy::*;
+ vtable*for*policy*;
+ };
+
+ local: *;
+};