diff options
author | 2022-09-26 22:11:34 +0900 | |
---|---|---|
committer | 2022-09-28 01:22:40 +0000 | |
commit | e6e6bee183bf69cf313a3b942a84cd18cbaae31c (patch) | |
tree | eb9205c1b7ef1915919d0a943ec3d9699a81e9b3 | |
parent | e0a1db95519ae4d930fbfbd6ae59961b1fbee88e (diff) |
Annotate symbols correctly
Currently, tagging a symbol with #apex (# systemapi or # llndk) is not
required when the symbol is in a non-NDK library. However, this is
considered dangerous because such a symbol will automatically be
promoted to NDK APIs when the library is promoted to an NDK library.
When that happens, the native API council won't be able to notice the
promotion because promoting a non-NDK library into an NDK library
doesn't require an update of the map.txt file, but Android.bp only.
To prevent that, we should mandate those tags for Mainline APIs
regardless of whether the library the API belongs to is an NDK library
or not.
Upcoming changes in build/soong will enforce this. This change is to
prepare for the enforcement.
Note that this is a build-time only change. There's no behavior change
at runtime.
Bug: 184712170
Test: m
Change-Id: I18d9722177cd440b939d090b9b653405409a8b57
-rw-r--r-- | libnativeloader/libnativeloader.map.txt | 14 | ||||
-rw-r--r-- | sigchainlib/libsigchain.map.txt | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libnativeloader/libnativeloader.map.txt b/libnativeloader/libnativeloader.map.txt index 59f457c04c..8c0fbddb4e 100644 --- a/libnativeloader/libnativeloader.map.txt +++ b/libnativeloader/libnativeloader.map.txt @@ -20,13 +20,13 @@ # that defines the exported interface. Please keep in sync with this list. LIBNATIVELOADER_1 { global: - OpenNativeLibrary; - CloseNativeLibrary; - OpenNativeLibraryInNamespace; - FindNamespaceByClassLoader; - FindNativeLoaderNamespaceByClassLoader; - CreateClassLoaderNamespace; - NativeLoaderFreeErrorMessage; + OpenNativeLibrary; # apex + CloseNativeLibrary; # apex + OpenNativeLibraryInNamespace; # apex + FindNamespaceByClassLoader; # apex + FindNativeLoaderNamespaceByClassLoader; # apex + CreateClassLoaderNamespace; # apex + NativeLoaderFreeErrorMessage; # apex local: *; }; diff --git a/sigchainlib/libsigchain.map.txt b/sigchainlib/libsigchain.map.txt index 02c20c717d..377662a89b 100644 --- a/sigchainlib/libsigchain.map.txt +++ b/sigchainlib/libsigchain.map.txt @@ -19,7 +19,7 @@ LIBSIGCHAIN_1 { # Export no symbols - the only external entry points are libc overrides. # Since this section cannot be empty for APEX stubs generation we provide a # phony entry. - LibsigchainNonexistentFunction; + LibsigchainNonexistentFunction; # apex local: *; }; |