Generate libdl.so per-architecture version script
Bug: http://b/24767418 Change-Id: I3d5775ba44d4c8e7fc5f2fbebae10e022100f1e2
This commit is contained in:
parent
e75453d5dd
commit
bc75047a1b
9 changed files with 145 additions and 5 deletions
|
@ -12,8 +12,10 @@ import tempfile
|
|||
all_arches = ["arm", "arm64", "mips", "mips64", "x86", "x86_64"]
|
||||
bionic_libc_root = os.path.join(os.environ["ANDROID_BUILD_TOP"], "bionic/libc")
|
||||
bionic_libm_root = os.path.join(os.environ["ANDROID_BUILD_TOP"], "bionic/libm")
|
||||
bionic_libdl_root = os.path.join(os.environ["ANDROID_BUILD_TOP"], "bionic/libdl")
|
||||
libc_script = os.path.join(bionic_libc_root, "libc.map.txt")
|
||||
libm_script = os.path.join(bionic_libm_root, "libm.map.txt")
|
||||
libdl_script = os.path.join(bionic_libdl_root, "libdl.map.txt")
|
||||
|
||||
# TODO (dimity): generate architecture-specific version scripts as part of build
|
||||
|
||||
|
@ -30,7 +32,7 @@ warning = "Generated by genversionscripts.py. Do not edit."
|
|||
class VersionScriptGenerator(object):
|
||||
|
||||
def run(self):
|
||||
for script in [libc_script, libm_script]:
|
||||
for script in [libc_script, libm_script, libdl_script]:
|
||||
basename = os.path.basename(script)
|
||||
dirname = os.path.dirname(script)
|
||||
for arch in all_arches:
|
||||
|
|
|
@ -15,12 +15,19 @@ include $(CLEAR_VARS)
|
|||
#
|
||||
# DO NOT REMOVE --exclude-libs!
|
||||
|
||||
LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a -Wl,--version-script=$(LOCAL_PATH)/libdl.map
|
||||
LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a
|
||||
|
||||
# for x86, exclude libgcc_eh.a for the same reasons as above
|
||||
LOCAL_LDFLAGS_x86 := -Wl,--exclude-libs=libgcc_eh.a
|
||||
LOCAL_LDFLAGS_x86_64 := $(LOCAL_LDFLAGS_x86)
|
||||
|
||||
LOCAL_LDFLAGS_arm += -Wl,--version-script=$(LOCAL_PATH)/libdl.arm.map
|
||||
LOCAL_LDFLAGS_arm64 += -Wl,--version-script=$(LOCAL_PATH)/libdl.arm64.map
|
||||
LOCAL_LDFLAGS_mips += -Wl,--version-script=$(LOCAL_PATH)/libdl.mips.map
|
||||
LOCAL_LDFLAGS_mips64 += -Wl,--version-script=$(LOCAL_PATH)/libdl.mips64.map
|
||||
LOCAL_LDFLAGS_x86 += -Wl,--version-script=$(LOCAL_PATH)/libdl.x86.map
|
||||
LOCAL_LDFLAGS_x86_64 += -Wl,--version-script=$(LOCAL_PATH)/libdl.x86_64.map
|
||||
|
||||
LOCAL_SRC_FILES:= libdl.c
|
||||
LOCAL_CFLAGS := -Wall -Wextra -Wunused -Werror
|
||||
LOCAL_CXX_STL := none
|
||||
|
|
23
libdl/libdl.arm.map
Normal file
23
libdl/libdl.arm.map
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dl_unwind_find_exidx; # arm
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
22
libdl/libdl.arm64.map
Normal file
22
libdl/libdl.arm64.map
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
|
@ -18,9 +18,7 @@ LIBC {
|
|||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
# begin arm-only
|
||||
dl_unwind_find_exidx;
|
||||
# end arm-only
|
||||
dl_unwind_find_exidx; # arm
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
22
libdl/libdl.mips.map
Normal file
22
libdl/libdl.mips.map
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
22
libdl/libdl.mips64.map
Normal file
22
libdl/libdl.mips64.map
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
22
libdl/libdl.x86.map
Normal file
22
libdl/libdl.x86.map
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
22
libdl/libdl.x86_64.map
Normal file
22
libdl/libdl.x86_64.map
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by genversionscripts.py. Do not edit.
|
||||
|
||||
LIBC {
|
||||
global:
|
||||
android_dlopen_ext;
|
||||
dl_iterate_phdr;
|
||||
dladdr;
|
||||
dlclose;
|
||||
dlerror;
|
||||
dlopen;
|
||||
dlsym;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
LIBC_PRIVATE {
|
||||
global:
|
||||
android_get_application_target_sdk_version;
|
||||
android_set_application_target_sdk_version;
|
||||
android_get_LD_LIBRARY_PATH;
|
||||
android_update_LD_LIBRARY_PATH;
|
||||
} LIBC;
|
Loading…
Reference in a new issue