platform_bionic/libdl/libdl.map.txt
Jiyong Park c45fe9f7bd Add stubs variants for bionic libs
Bionic libs are part of the runtime APEX (com.android.runtime). In order
to be able to update the runtime APEX independetly from the platform, we
have to prevent things outside of the APEX from using bionic symbols
that are not guaranteed to be stable. Otherwise, platform could break
when a symbol is removed from the libs via the APEX update.

To achive this goal, this change adds stubs variant to the bionic libs.
With this, things outside of the runtime APEX (i.e. other APEXes and the
platform) are built with the stubs variants that provide only the
symbols that are guaranteed to be stable.

The set of symbols are basically the same as the symbols available to
NDK clients. However, there are a few additional symbols that are not
available for NDK but should be made available for platform components.
They are marked with "# apex" tag. Symbols with that tag are not exposed
to apps (via NDK stubs) or vendors (via LLNDK stubs).

Note that the stubs is a build-time only artifact. It is used just to
break the build when private symbols are used outside of the runtime
APEX. At runtime, the real library in the APEX is used.

Bug: 120266448
Test: m
Test: m bionic-unit-tests
Change-Id: I7b8d75830c81d7d7d54e2fca21a85b3417531b47
2019-01-04 22:29:36 +09:00

59 lines
1.5 KiB
Text

#
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LIBC {
global:
android_dlopen_ext; # introduced=21
dl_iterate_phdr; # introduced-arm=21
dl_unwind_find_exidx; # arm
dladdr;
dlclose;
dlerror;
dlopen;
dlsym;
local:
*;
};
LIBC_N {
global:
android_get_application_target_sdk_version; # introduced=24 versioned=29
dlvsym; # introduced=24
} LIBC;
LIBC_OMR1 { # introduced=27
global:
__cfi_shadow_size;
__cfi_slowpath;
__cfi_slowpath_diag;
} LIBC_N;
LIBC_Q { # introduced=29
global:
android_create_namespace; # apex
android_dlwarning; # apex
android_get_LD_LIBRARY_PATH; # apex
android_get_exported_namespace; # apex
android_init_anonymous_namespace; # apex
android_link_namespaces; # apex
android_set_application_target_sdk_version; # apex
} LIBC_OMR1;
LIBC_PLATFORM {
global:
__cfi_init;
android_update_LD_LIBRARY_PATH;
} LIBC_Q;