summaryrefslogtreecommitdiff
path: root/cmds
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-06-23 23:48:38 +0000
committerDaniel Norman <danielnorman@google.com>2021-06-23 21:36:25 -0700
commit4c3d4ac80fe9f0fb4fbb4fcffcd2ba3f4e6fca6c (patch)
treeb694ee7c10ad78d944edccb1836b2e500cc9cf78 /cmds
parent30de082df40adce4137ff0e9cc24f2dfc16401d5 (diff)
parent4d8fc3bed423eccc15f2b32f534be35018c91f8a (diff)
Merge SP1A.210618.002
Change-Id: I72d03812a8377fc014aebad8db4e68eeded2d531
Diffstat (limited to 'cmds')
-rw-r--r--cmds/app_process/Android.bp11
-rw-r--r--cmds/app_process/version-script.txt4
2 files changed, 14 insertions, 1 deletions
diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp
index 6f37ef3959fd..42f0b3f4813d 100644
--- a/cmds/app_process/Android.bp
+++ b/cmds/app_process/Android.bp
@@ -29,7 +29,16 @@ cc_binary {
},
},
- ldflags: ["-Wl,--export-dynamic"],
+ // Symbols exported from the executable in .dynsym interpose symbols in every
+ // linker namespace, including an app's classloader namespace. Provide this
+ // version script to prevent unwanted interposition.
+ //
+ // By default, the static linker doesn't export most of an executable's symbols,
+ // but it will export a symbol that appears to override a symbol in a needed DSO.
+ // This commonly happens with C++ vaguely-linked entities, such as template
+ // functions or type_info variables. Hence, a version script is needed even for
+ // an executable.
+ version_script: "version-script.txt",
shared_libs: [
"libandroid_runtime",
diff --git a/cmds/app_process/version-script.txt b/cmds/app_process/version-script.txt
new file mode 100644
index 000000000000..a98066a67675
--- /dev/null
+++ b/cmds/app_process/version-script.txt
@@ -0,0 +1,4 @@
+{
+ local:
+ *;
+};