Compare commits

..

No commits in common. "main" and "brillo-m8-dev" have entirely different histories.

62 changed files with 4467 additions and 1806 deletions

View File

@ -169,10 +169,9 @@ As mentioned above, this is currently a two-step process:
Updating tzdata Updating tzdata
--------------- ---------------
This is fully automated (and these days handled by the libcore team, because This is fully automated:
they own icu, and that needs to be updated in sync with bionic):
1. Run update-tzdata.py in external/icu/tools/. 1. Run update-tzdata.py.
Verifying changes Verifying changes
@ -269,22 +268,18 @@ However, this also makes it difficult to run the tests under GDB. To prevent
each test from being forked, run the tests with the flag `--no-isolate`. each test from being forked, run the tests with the flag `--no-isolate`.
32-bit ABI bugs LP32 ABI bugs
--------------- -------------
This probably belongs in the NDK documentation rather than here, but these This probably belongs in the NDK documentation rather than here, but these
are the known ABI bugs in the 32-bit ABI: are the known ABI bugs in LP32:
* `time_t` is 32-bit. <http://b/5819737>. In the 64-bit ABI, time_t is * `time_t` is 32-bit. <http://b/5819737>
64-bit.
* `off_t` is 32-bit. There is `off64_t`, and in newer releases there is * `off_t` is 32-bit. There is `off64_t`, but no `_FILE_OFFSET_BITS` support.
almost-complete support for `_FILE_OFFSET_BITS`. Unfortunately our stdio Many of the `off64_t` functions are missing in older releases, and
implementation uses 32-bit offsets and -- worse -- function pointers to stdio uses 32-bit offsets, so there's no way to fully implement
functions that use 32-bit offsets, so there's no good way to implement `_FILE_OFFSET_BITS`.
the last few pieces <http://b/24807045>. In the 64-bit ABI, off_t is
off64_t.
* `sigset_t` is too small on ARM and x86 (but correct on MIPS), so support * `sigset_t` is too small on ARM and x86 (but correct on MIPS), so support
for real-time signals is broken. <http://b/5828899> In the 64-bit ABI, for real-time signals is broken. <http://b/5828899>
`sigset_t` is the correct size for every architecture.

View File

@ -112,6 +112,11 @@ cc_defaults {
device_uses_dlmalloc: { device_uses_dlmalloc: {
cflags: ["-DUSE_DLMALLOC"], cflags: ["-DUSE_DLMALLOC"],
}, },
// To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
// the appropriate BoardConfig.mk file.
dlmalloc_alignment: {
cflags: ["-DMALLOC_ALIGNMENT=%d"],
},
}, },
// Clang/llvm has incompatible long double (fp128) for x86_64. // Clang/llvm has incompatible long double (fp128) for x86_64.
// https://llvm.org/bugs/show_bug.cgi?id=23897 // https://llvm.org/bugs/show_bug.cgi?id=23897
@ -1343,7 +1348,6 @@ cc_library_static {
"bionic/getpid.cpp", "bionic/getpid.cpp",
"bionic/gettid.cpp", "bionic/gettid.cpp",
"bionic/__gnu_basename.cpp", "bionic/__gnu_basename.cpp",
"bionic/ifaddrs.cpp",
"bionic/inotify_init.cpp", "bionic/inotify_init.cpp",
"bionic/ioctl.cpp", "bionic/ioctl.cpp",
"bionic/lchown.cpp", "bionic/lchown.cpp",
@ -1762,6 +1766,7 @@ cc_library {
nocrt: true, nocrt: true,
// special for arm
arch: { arch: {
arm: { arm: {
//TODO: This is to work around b/24465209. Remove after root cause is fixed //TODO: This is to work around b/24465209. Remove after root cause is fixed
@ -1769,11 +1774,6 @@ cc_library {
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.arm.map", version_script: "libc.arm.map",
product_variables: {
brillo: {
version_script: "libc.arm.brillo.map",
},
},
shared: { shared: {
srcs: ["arch-arm/bionic/exidx_dynamic.c"], srcs: ["arch-arm/bionic/exidx_dynamic.c"],
@ -1781,8 +1781,6 @@ cc_library {
static: { static: {
srcs: ["arch-arm/bionic/exidx_static.c"], srcs: ["arch-arm/bionic/exidx_static.c"],
}, },
// special for arm
cflags: ["-DCRT_LEGACY_WORKAROUND"], cflags: ["-DCRT_LEGACY_WORKAROUND"],
srcs: [ srcs: [
"arch-arm/bionic/atexit_legacy.c", "arch-arm/bionic/atexit_legacy.c",
@ -1795,11 +1793,6 @@ cc_library {
mips: { mips: {
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.mips.map", version_script: "libc.mips.map",
product_variables: {
brillo: {
version_script: "libc.mips.brillo.map",
},
},
}, },
mips64: { mips64: {
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
@ -1811,11 +1804,6 @@ cc_library {
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.x86.map", version_script: "libc.x86.map",
product_variables: {
brillo: {
version_script: "libc.x86.brillo.map",
},
},
}, },
x86_64: { x86_64: {
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.

View File

@ -149,7 +149,6 @@ libc_bionic_ndk_src_files := \
bionic/getpid.cpp \ bionic/getpid.cpp \
bionic/gettid.cpp \ bionic/gettid.cpp \
bionic/__gnu_basename.cpp \ bionic/__gnu_basename.cpp \
bionic/ifaddrs.cpp \
bionic/inotify_init.cpp \ bionic/inotify_init.cpp \
bionic/ioctl.cpp \ bionic/ioctl.cpp \
bionic/lchown.cpp \ bionic/lchown.cpp \
@ -645,7 +644,7 @@ ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
libc_common_cflags += -DDEBUG libc_common_cflags += -DDEBUG
endif endif
ifeq ($(MALLOC_SVELTE),true) ifeq ($(MALLOC_IMPL),dlmalloc)
libc_common_cflags += -DUSE_DLMALLOC libc_common_cflags += -DUSE_DLMALLOC
libc_malloc_src := bionic/dlmalloc.c libc_malloc_src := bionic/dlmalloc.c
else else
@ -654,6 +653,13 @@ else
libc_common_c_includes += external/jemalloc/include libc_common_c_includes += external/jemalloc/include
endif endif
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
# the appropriate BoardConfig.mk file.
#
ifneq ($(BOARD_MALLOC_ALIGNMENT),)
libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
endif
# Define some common conlyflags # Define some common conlyflags
libc_common_conlyflags := \ libc_common_conlyflags := \
-std=gnu99 -std=gnu99
@ -684,21 +690,16 @@ endef
# libc_stack_protector.a - stack protector code # libc_stack_protector.a - stack protector code
# ======================================================== # ========================================================
# #
# Code that implements the stack protector (or that runs # The stack protector code needs to be compiled
# before TLS has been set up) needs to be compiled with # with -fno-stack-protector, since it modifies the
# -fno-stack-protector, since it accesses the stack canary # stack canary.
# TLS slot.
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
bionic/__libc_init_main_thread.cpp \ # On x86, the __set_tls implementation is complex enough that
bionic/__stack_chk_fail.cpp \ # -fstack-protector-strong inserts a check.
LOCAL_SRC_FILES_arm64 := arch-arm64/bionic/__set_tls.c
LOCAL_SRC_FILES_x86 := arch-x86/bionic/__set_tls.c LOCAL_SRC_FILES_x86 := arch-x86/bionic/__set_tls.c
LOCAL_SRC_FILES_x86_64 := arch-x86_64/bionic/__set_tls.c
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
LOCAL_CONLYFLAGS := $(libc_common_conlyflags) LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags) LOCAL_CPPFLAGS := $(libc_common_cppflags)
@ -715,30 +716,6 @@ $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)
# libc_init_static.cpp also needs to be built without stack protector,
# because it's responsible for setting up TLS for static executables.
# This isn't the case for dynamic executables because the dynamic linker
# has already set up the main thread's TLS.
include $(CLEAR_VARS)
LOCAL_SRC_FILES := bionic/libc_init_static.cpp
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libc_init_static
LOCAL_CLANG := $(use_clang)
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
LOCAL_CXX_STL := none
LOCAL_SYSTEM_SHARED_LIBRARIES :=
LOCAL_SANITIZE := never
LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
include $(BUILD_STATIC_LIBRARY)
# ======================================================== # ========================================================
# libc_tzcode.a - upstream 'tzcode' code # libc_tzcode.a - upstream 'tzcode' code
# ======================================================== # ========================================================
@ -1228,7 +1205,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
LOCAL_CXX_STL := none LOCAL_CXX_STL := none
ifneq ($(MALLOC_SVELTE),true) ifneq ($(MALLOC_IMPL),dlmalloc)
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
endif endif
@ -1300,6 +1277,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
$(libc_arch_static_src_files) \ $(libc_arch_static_src_files) \
bionic/libc_init_static.cpp
LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_CFLAGS := $(libc_common_cflags) \ LOCAL_CFLAGS := $(libc_common_cflags) \
@ -1311,7 +1289,7 @@ LOCAL_CPPFLAGS := $(libc_common_cppflags)
LOCAL_MODULE := libc_nomalloc LOCAL_MODULE := libc_nomalloc
LOCAL_CLANG := $(use_clang) LOCAL_CLANG := $(use_clang)
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common libc_init_static LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
LOCAL_CXX_STL := none LOCAL_CXX_STL := none
LOCAL_SYSTEM_SHARED_LIBRARIES := LOCAL_SYSTEM_SHARED_LIBRARIES :=
LOCAL_SANITIZE := never LOCAL_SANITIZE := never
@ -1351,6 +1329,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \ LOCAL_SRC_FILES := \
$(libc_arch_static_src_files) \ $(libc_arch_static_src_files) \
bionic/malloc_debug_common.cpp \ bionic/malloc_debug_common.cpp \
bionic/libc_init_static.cpp \
LOCAL_CFLAGS := $(libc_common_cflags) \ LOCAL_CFLAGS := $(libc_common_cflags) \
-DLIBC_STATIC \ -DLIBC_STATIC \
@ -1361,9 +1340,9 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libc LOCAL_MODULE := libc
LOCAL_CLANG := $(use_clang) LOCAL_CLANG := $(use_clang)
LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common libc_init_static LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
ifneq ($(MALLOC_SVELTE),true) ifneq ($(MALLOC_IMPL),dlmalloc)
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
endif endif
@ -1408,8 +1387,11 @@ LOCAL_ADDITIONAL_DEPENDENCIES := \
$(LOCAL_PATH)/libc.x86.map \ $(LOCAL_PATH)/libc.x86.map \
$(LOCAL_PATH)/libc.x86_64.map \ $(LOCAL_PATH)/libc.x86_64.map \
$(LOCAL_PATH)/libc.arm.brillo.map \ $(LOCAL_PATH)/libc.arm.brillo.map \
$(LOCAL_PATH)/libc.arm64.brillo.map \
$(LOCAL_PATH)/libc.mips.brillo.map \ $(LOCAL_PATH)/libc.mips.brillo.map \
$(LOCAL_PATH)/libc.mips64.brillo.map \
$(LOCAL_PATH)/libc.x86.brillo.map \ $(LOCAL_PATH)/libc.x86.brillo.map \
$(LOCAL_PATH)/libc.x86_64.brillo.map \
# Leave the symbols in the shared library so that stack unwinders can produce # Leave the symbols in the shared library so that stack unwinders can produce
# meaningful name resolution. # meaningful name resolution.
@ -1429,7 +1411,7 @@ LOCAL_PACK_MODULE_RELOCATIONS := false
LOCAL_SHARED_LIBRARIES := libdl LOCAL_SHARED_LIBRARIES := libdl
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
ifneq ($(MALLOC_SVELTE),true) ifneq ($(MALLOC_IMPL),dlmalloc)
LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
endif endif
@ -1445,15 +1427,17 @@ ifdef BRILLO
LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.brillo.map LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.brillo.map
LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.brillo.map LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.brillo.map
LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.brillo.map LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.brillo.map
LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.brillo.map
LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.brillo.map
LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.brillo.map
else else
LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map
LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map
LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map
endif
LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map
LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map
LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map
endif
# We'd really like to do this for all architectures, but since this wasn't done # We'd really like to do this for all architectures, but since this wasn't done
# before, these symbols must continue to be exported on LP32 for binary # before, these symbols must continue to be exported on LP32 for binary

View File

@ -51,62 +51,34 @@ extern int __cxa_atexit(void (*)(void*), void*, void*);
*/ */
int __attribute__((weak)) int __attribute__((weak))
__aeabi_atexit_impl(void *object, void (*destructor) (void *), void *dso_handle) { __aeabi_atexit(void *object, void (*destructor) (void *), void *dso_handle) {
return __cxa_atexit(destructor, object, dso_handle);
}
int __attribute__((weak))
__aeabi_atexit_impl2(void *object, void (*destructor) (void *), void *dso_handle) {
return __cxa_atexit(destructor, object, dso_handle); return __cxa_atexit(destructor, object, dso_handle);
} }
void __attribute__((weak)) __aeabi_memcpy8_impl(void *dest, const void *src, size_t n) { void __attribute__((weak))
__aeabi_memcpy8(void *dest, const void *src, size_t n) {
memcpy(dest, src, n); memcpy(dest, src, n);
} }
void __attribute__((weak)) __aeabi_memcpy4_impl(void *dest, const void *src, size_t n) { void __attribute__((weak)) __aeabi_memcpy4(void *dest, const void *src, size_t n) {
memcpy(dest, src, n); memcpy(dest, src, n);
} }
void __attribute__((weak)) __aeabi_memcpy_impl(void *dest, const void *src, size_t n) { void __attribute__((weak)) __aeabi_memcpy(void *dest, const void *src, size_t n) {
memcpy(dest, src, n);
}
void __attribute__((weak)) __aeabi_memcpy8_impl2(void *dest, const void *src, size_t n) {
memcpy(dest, src, n);
}
void __attribute__((weak)) __aeabi_memcpy4_impl2(void *dest, const void *src, size_t n) {
memcpy(dest, src, n);
}
void __attribute__((weak)) __aeabi_memcpy_impl2(void *dest, const void *src, size_t n) {
memcpy(dest, src, n); memcpy(dest, src, n);
} }
void __attribute__((weak)) __aeabi_memmove8_impl(void *dest, const void *src, size_t n) { void __attribute__((weak)) __aeabi_memmove8(void *dest, const void *src, size_t n) {
memmove(dest, src, n); memmove(dest, src, n);
} }
void __attribute__((weak)) __aeabi_memmove4_impl(void *dest, const void *src, size_t n) { void __attribute__((weak)) __aeabi_memmove4(void *dest, const void *src, size_t n) {
memmove(dest, src, n); memmove(dest, src, n);
} }
void __attribute__((weak)) __aeabi_memmove_impl(void *dest, const void *src, size_t n) { void __attribute__((weak)) __aeabi_memmove(void *dest, const void *src, size_t n) {
memmove(dest, src, n);
}
void __attribute__((weak)) __aeabi_memmove8_impl2(void *dest, const void *src, size_t n) {
memmove(dest, src, n);
}
void __attribute__((weak)) __aeabi_memmove4_impl2(void *dest, const void *src, size_t n) {
memmove(dest, src, n);
}
void __attribute__((weak)) __aeabi_memmove_impl2(void *dest, const void *src, size_t n) {
memmove(dest, src, n); memmove(dest, src, n);
} }
@ -115,71 +87,27 @@ void __attribute__((weak)) __aeabi_memmove_impl2(void *dest, const void *src, si
* This allows __aeabi_memclr to tail-call __aeabi_memset * This allows __aeabi_memclr to tail-call __aeabi_memset
*/ */
void __attribute__((weak)) __aeabi_memset8_impl(void *dest, size_t n, int c) { void __attribute__((weak)) __aeabi_memset8(void *dest, size_t n, int c) {
memset(dest, c, n); memset(dest, c, n);
} }
void __attribute__((weak)) __aeabi_memset4_impl(void *dest, size_t n, int c) { void __attribute__((weak)) __aeabi_memset4(void *dest, size_t n, int c) {
memset(dest, c, n); memset(dest, c, n);
} }
void __attribute__((weak)) __aeabi_memset_impl(void *dest, size_t n, int c) { void __attribute__((weak)) __aeabi_memset(void *dest, size_t n, int c) {
memset(dest, c, n);
}
void __attribute__((weak)) __aeabi_memset8_impl2(void *dest, size_t n, int c) {
memset(dest, c, n);
}
void __attribute__((weak)) __aeabi_memset4_impl2(void *dest, size_t n, int c) {
memset(dest, c, n);
}
void __attribute__((weak)) __aeabi_memset_impl2(void *dest, size_t n, int c) {
memset(dest, c, n); memset(dest, c, n);
} }
void __attribute__((weak)) __aeabi_memclr8_impl(void *dest, size_t n) { void __attribute__((weak)) __aeabi_memclr8(void *dest, size_t n) {
__aeabi_memset8_impl(dest, n, 0); __aeabi_memset8(dest, n, 0);
} }
void __attribute__((weak)) __aeabi_memclr4_impl(void *dest, size_t n) { void __attribute__((weak)) __aeabi_memclr4(void *dest, size_t n) {
__aeabi_memset4_impl(dest, n, 0); __aeabi_memset4(dest, n, 0);
} }
void __attribute__((weak)) __aeabi_memclr_impl(void *dest, size_t n) { void __attribute__((weak)) __aeabi_memclr(void *dest, size_t n) {
__aeabi_memset_impl(dest, n, 0); __aeabi_memset(dest, n, 0);
} }
void __attribute__((weak)) __aeabi_memclr8_impl2(void *dest, size_t n) {
__aeabi_memset8_impl(dest, n, 0);
}
void __attribute__((weak)) __aeabi_memclr4_impl2(void *dest, size_t n) {
__aeabi_memset4_impl(dest, n, 0);
}
void __attribute__((weak)) __aeabi_memclr_impl2(void *dest, size_t n) {
__aeabi_memset_impl(dest, n, 0);
}
#define __AEABI_SYMVERS(fn_name) \
__asm__(".symver " #fn_name "_impl, " #fn_name "@@LIBC_N"); \
__asm__(".symver " #fn_name "_impl2, " #fn_name "@LIBC_PRIVATE")
__AEABI_SYMVERS(__aeabi_atexit);
__AEABI_SYMVERS(__aeabi_memcpy8);
__AEABI_SYMVERS(__aeabi_memcpy4);
__AEABI_SYMVERS(__aeabi_memcpy);
__AEABI_SYMVERS(__aeabi_memmove8);
__AEABI_SYMVERS(__aeabi_memmove4);
__AEABI_SYMVERS(__aeabi_memmove);
__AEABI_SYMVERS(__aeabi_memset8);
__AEABI_SYMVERS(__aeabi_memset4);
__AEABI_SYMVERS(__aeabi_memset);
__AEABI_SYMVERS(__aeabi_memclr8);
__AEABI_SYMVERS(__aeabi_memclr4);
__AEABI_SYMVERS(__aeabi_memclr);
#undef __AEABI_SYMVERS

View File

@ -37,13 +37,7 @@
* the expectation that libc will define it and call through to * the expectation that libc will define it and call through to
* a differently-named function in the dynamic linker. * a differently-named function in the dynamic linker.
*/ */
_Unwind_Ptr __gnu_Unwind_Find_exidx_impl(_Unwind_Ptr pc, int *pcount) { _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr pc, int *pcount)
{
return dl_unwind_find_exidx(pc, pcount); return dl_unwind_find_exidx(pc, pcount);
} }
_Unwind_Ptr __gnu_Unwind_Find_exidx_impl2(_Unwind_Ptr pc, int *pcount) {
return dl_unwind_find_exidx(pc, pcount);
}
__asm__(".symver __gnu_Unwind_Find_exidx_impl,__gnu_Unwind_Find_exidx@LIBC_PRIVATE");
__asm__(".symver __gnu_Unwind_Find_exidx_impl2,__gnu_Unwind_Find_exidx@@LIBC_N");

View File

@ -42,6 +42,7 @@ libc_bionic_src_files_arm64 += \
arch-arm64/bionic/__bionic_clone.S \ arch-arm64/bionic/__bionic_clone.S \
arch-arm64/bionic/_exit_with_stack_teardown.S \ arch-arm64/bionic/_exit_with_stack_teardown.S \
arch-arm64/bionic/setjmp.S \ arch-arm64/bionic/setjmp.S \
arch-arm64/bionic/__set_tls.c \
arch-arm64/bionic/syscall.S \ arch-arm64/bionic/syscall.S \
arch-arm64/bionic/vfork.S \ arch-arm64/bionic/vfork.S \

View File

@ -25,6 +25,7 @@ libc_bionic_src_files_x86_64 += \
arch-x86_64/bionic/_exit_with_stack_teardown.S \ arch-x86_64/bionic/_exit_with_stack_teardown.S \
arch-x86_64/bionic/__restore_rt.S \ arch-x86_64/bionic/__restore_rt.S \
arch-x86_64/bionic/setjmp.S \ arch-x86_64/bionic/setjmp.S \
arch-x86_64/bionic/__set_tls.c \
arch-x86_64/bionic/syscall.S \ arch-x86_64/bionic/syscall.S \
arch-x86_64/bionic/vfork.S \ arch-x86_64/bionic/vfork.S \

View File

@ -17,8 +17,7 @@
#include "pthread_internal.h" #include "pthread_internal.h"
class thread_local_dtor { struct thread_local_dtor {
public:
void (*func) (void *); void (*func) (void *);
void *arg; void *arg;
void *dso_handle; // unused... void *dso_handle; // unused...

View File

@ -1,85 +0,0 @@
/*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "libc_init_common.h"
#include "private/bionic_auxv.h"
#include "private/bionic_globals.h"
#include "private/KernelArgumentBlock.h"
#include "pthread_internal.h"
extern "C" int __set_tls(void* ptr);
extern "C" int __set_tid_address(int* tid_address);
// Setup for the main thread. For dynamic executables, this is called by the
// linker _before_ libc is mapped in memory. This means that all writes to
// globals from this function will apply to linker-private copies and will not
// be visible from libc later on.
//
// Note: this function creates a pthread_internal_t for the initial thread and
// stores the pointer in TLS, but does not add it to pthread's thread list. This
// has to be done later from libc itself (see __libc_init_common).
//
// This is in a file by itself because it needs to be built with
// -fno-stack-protector because it's responsible for setting up the main
// thread's TLS (which stack protector relies on).
void __libc_init_main_thread(KernelArgumentBlock& args) {
__libc_auxv = args.auxv;
static pthread_internal_t main_thread;
// The -fstack-protector implementation uses TLS, so make sure that's
// set up before we call any function that might get a stack check inserted.
__set_tls(main_thread.tls);
// Tell the kernel to clear our tid field when we exit, so we're like any other pthread.
// As a side-effect, this tells us our pid (which is the same as the main thread's tid).
main_thread.tid = __set_tid_address(&main_thread.tid);
main_thread.set_cached_pid(main_thread.tid);
// We don't want to free the main thread's stack even when the main thread exits
// because things like environment variables with global scope live on it.
// We also can't free the pthread_internal_t itself, since that lives on the main
// thread's stack rather than on the heap.
// The main thread has no mmap allocated space for stack or pthread_internal_t.
main_thread.mmap_size = 0;
pthread_attr_init(&main_thread.attr);
main_thread.attr.guard_size = 0; // The main thread has no guard page.
main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked.
// TODO: the main thread's sched_policy and sched_priority need to be queried.
__init_thread(&main_thread);
__init_tls(&main_thread);
// Store a pointer to the kernel argument block in a TLS slot to be
// picked up by the libc constructor.
main_thread.tls[TLS_SLOT_BIONIC_PREINIT] = &args;
__init_alternate_signal_stack(&main_thread);
}

View File

@ -1,241 +0,0 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <ifaddrs.h>
#include <errno.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <net/if.h>
#include <netinet/in.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
// The public ifaddrs struct is full of pointers. Rather than track several
// different allocations, we use a maximally-sized structure with the public
// part at offset 0, and pointers into its hidden tail.
struct ifaddrs_storage {
// Must come first, so that `ifaddrs_storage` is-a `ifaddrs`.
ifaddrs ifa;
// The interface index, so we can match RTM_NEWADDR messages with
// earlier RTM_NEWLINK messages (to copy the interface flags).
int interface_index;
// Storage for the pointers in `ifa`.
sockaddr_storage addr;
sockaddr_storage netmask;
sockaddr_storage ifa_ifu;
char name[IFNAMSIZ + 1];
ifaddrs_storage(ifaddrs** list) {
memset(this, 0, sizeof(*this));
// push_front onto `list`.
ifa.ifa_next = *list;
*list = reinterpret_cast<ifaddrs*>(this);
}
// Netlink gives us the address family in the header, and the
// sockaddr_in or sockaddr_in6 bytes as the payload. We need to
// stitch the two bits together into the sockaddr that's part of
// our portable interface.
void SetAddress(int family, const void* data, size_t byteCount) {
addr.ss_family = family;
memcpy(SockaddrBytes(family, &addr), data, byteCount);
ifa.ifa_addr = reinterpret_cast<sockaddr*>(&addr);
}
void SetBroadcastAddress(int family, const void* data, size_t byteCount) {
ifa_ifu.ss_family = family;
memcpy(SockaddrBytes(family, &ifa_ifu), data, byteCount);
ifa.ifa_dstaddr = reinterpret_cast<sockaddr*>(&ifa_ifu);
}
// Netlink gives us the prefix length as a bit count. We need to turn
// that into a BSD-compatible netmask represented by a sockaddr*.
void SetNetmask(int family, size_t prefix_length) {
// ...and work out the netmask from the prefix length.
netmask.ss_family = family;
uint8_t* dst = SockaddrBytes(family, &netmask);
memset(dst, 0xff, prefix_length / 8);
if ((prefix_length % 8) != 0) {
dst[prefix_length/8] = (0xff << (8 - (prefix_length % 8)));
}
ifa.ifa_netmask = reinterpret_cast<sockaddr*>(&netmask);
}
private:
// Returns a pointer to the first byte in the address data (which is
// stored in network byte order).
uint8_t* SockaddrBytes(int family, sockaddr_storage* ss) {
if (family == AF_INET) {
sockaddr_in* ss4 = reinterpret_cast<sockaddr_in*>(ss);
return reinterpret_cast<uint8_t*>(&ss4->sin_addr);
} else if (family == AF_INET6) {
sockaddr_in6* ss6 = reinterpret_cast<sockaddr_in6*>(ss);
return reinterpret_cast<uint8_t*>(&ss6->sin6_addr);
}
return nullptr;
}
};
#if !defined(__clang__)
// GCC gets confused by NLMSG_DATA and doesn't realize that the old-style
// cast is from a system header and should be ignored.
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
static void __handle_netlink_response(ifaddrs** out, nlmsghdr* hdr) {
if (hdr->nlmsg_type == RTM_NEWLINK) {
ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));
// Create a new ifaddr entry, and set the interface index and flags.
ifaddrs_storage* new_addr = new ifaddrs_storage(out);
new_addr->interface_index = ifi->ifi_index;
new_addr->ifa.ifa_flags = ifi->ifi_flags;
// Go through the various bits of information and find the name.
rtattr* rta = IFLA_RTA(ifi);
size_t rta_len = IFLA_PAYLOAD(hdr);
while (RTA_OK(rta, rta_len)) {
if (rta->rta_type == IFLA_IFNAME) {
if (RTA_PAYLOAD(rta) < sizeof(new_addr->name)) {
memcpy(new_addr->name, RTA_DATA(rta), RTA_PAYLOAD(rta));
new_addr->ifa.ifa_name = new_addr->name;
}
}
rta = RTA_NEXT(rta, rta_len);
}
} else if (hdr->nlmsg_type == RTM_NEWADDR) {
ifaddrmsg* msg = reinterpret_cast<ifaddrmsg*>(NLMSG_DATA(hdr));
// We should already know about this from an RTM_NEWLINK message.
ifaddrs_storage* addr = reinterpret_cast<ifaddrs_storage*>(*out);
while (addr != nullptr && addr->interface_index != static_cast<int>(msg->ifa_index)) {
addr = reinterpret_cast<ifaddrs_storage*>(addr->ifa.ifa_next);
}
// If this is an unknown interface, ignore whatever we're being told about it.
if (addr == nullptr) return;
// Create a new ifaddr entry and copy what we already know.
ifaddrs_storage* new_addr = new ifaddrs_storage(out);
// We can just copy the name rather than look for IFA_LABEL.
strcpy(new_addr->name, addr->name);
new_addr->ifa.ifa_name = new_addr->name;
new_addr->ifa.ifa_flags = addr->ifa.ifa_flags;
new_addr->interface_index = addr->interface_index;
// Go through the various bits of information and find the address
// and any broadcast/destination address.
rtattr* rta = IFA_RTA(msg);
size_t rta_len = IFA_PAYLOAD(hdr);
while (RTA_OK(rta, rta_len)) {
if (rta->rta_type == IFA_ADDRESS) {
if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) {
addr->SetAddress(msg->ifa_family, RTA_DATA(rta), RTA_PAYLOAD(rta));
addr->SetNetmask(msg->ifa_family, msg->ifa_prefixlen);
}
} else if (rta->rta_type == IFA_BROADCAST) {
if (msg->ifa_family == AF_INET || msg->ifa_family == AF_INET6) {
addr->SetBroadcastAddress(msg->ifa_family, RTA_DATA(rta), RTA_PAYLOAD(rta));
}
}
rta = RTA_NEXT(rta, rta_len);
}
}
}
static bool __send_netlink_request(int fd, int type) {
struct NetlinkMessage {
nlmsghdr hdr;
rtgenmsg msg;
} request;
memset(&request, 0, sizeof(request));
request.hdr.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST;
request.hdr.nlmsg_type = type;
request.hdr.nlmsg_len = sizeof(request);
request.msg.rtgen_family = AF_UNSPEC; // All families.
return (TEMP_FAILURE_RETRY(send(fd, &request, sizeof(request), 0)) == sizeof(request));
}
static bool __read_netlink_responses(int fd, ifaddrs** out, char* buf, size_t buf_len) {
ssize_t bytes_read;
// Read through all the responses, handing interesting ones to __handle_netlink_response.
while ((bytes_read = TEMP_FAILURE_RETRY(recv(fd, buf, buf_len, 0))) > 0) {
nlmsghdr* hdr = reinterpret_cast<nlmsghdr*>(buf);
for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) {
if (hdr->nlmsg_type == NLMSG_DONE) return true;
if (hdr->nlmsg_type == NLMSG_ERROR) return false;
__handle_netlink_response(out, hdr);
}
}
// We only get here if recv fails before we see a NLMSG_DONE.
return false;
}
int getifaddrs(ifaddrs** out) {
// Make cleanup easy.
*out = nullptr;
// The kernel keeps packets under 8KiB (NLMSG_GOODSIZE),
// but that's a bit too large to go on the stack.
size_t buf_len = 8192;
char* buf = new char[buf_len];
if (buf == nullptr) return -1;
// Open the netlink socket and ask for all the links and addresses.
int fd = socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE);
bool okay = fd != -1 &&
__send_netlink_request(fd, RTM_GETLINK) && __read_netlink_responses(fd, out, buf, buf_len) &&
__send_netlink_request(fd, RTM_GETADDR) && __read_netlink_responses(fd, out, buf, buf_len);
if (!okay) {
freeifaddrs(*out);
// Ensure that callers crash if they forget to check for success.
*out = nullptr;
}
{
int saved_errno = errno;
close(fd);
delete[] buf;
errno = saved_errno;
}
return okay ? 0 : -1;
}
void freeifaddrs(ifaddrs* list) {
while (list != nullptr) {
ifaddrs* current = list;
list = list->ifa_next;
free(current);
}
}

View File

@ -52,6 +52,8 @@
extern "C" abort_msg_t** __abort_message_ptr; extern "C" abort_msg_t** __abort_message_ptr;
extern "C" int __system_properties_init(void); extern "C" int __system_properties_init(void);
extern "C" int __set_tls(void* ptr);
extern "C" int __set_tid_address(int* tid_address);
__LIBC_HIDDEN__ WriteProtected<libc_globals> __libc_globals; __LIBC_HIDDEN__ WriteProtected<libc_globals> __libc_globals;
@ -64,6 +66,49 @@ char** environ;
// Declared in "private/bionic_ssp.h". // Declared in "private/bionic_ssp.h".
uintptr_t __stack_chk_guard = 0; uintptr_t __stack_chk_guard = 0;
// Setup for the main thread. For dynamic executables, this is called by the
// linker _before_ libc is mapped in memory. This means that all writes to
// globals from this function will apply to linker-private copies and will not
// be visible from libc later on.
//
// Note: this function creates a pthread_internal_t for the initial thread and
// stores the pointer in TLS, but does not add it to pthread's thread list. This
// has to be done later from libc itself (see __libc_init_common).
void __libc_init_main_thread(KernelArgumentBlock& args) {
__libc_auxv = args.auxv;
static pthread_internal_t main_thread;
// The x86 -fstack-protector implementation uses TLS, so make sure that's
// set up before we call any function that might get a stack check inserted.
__set_tls(main_thread.tls);
// Tell the kernel to clear our tid field when we exit, so we're like any other pthread.
// As a side-effect, this tells us our pid (which is the same as the main thread's tid).
main_thread.tid = __set_tid_address(&main_thread.tid);
main_thread.set_cached_pid(main_thread.tid);
// We don't want to free the main thread's stack even when the main thread exits
// because things like environment variables with global scope live on it.
// We also can't free the pthread_internal_t itself, since that lives on the main
// thread's stack rather than on the heap.
// The main thread has no mmap allocated space for stack or pthread_internal_t.
main_thread.mmap_size = 0;
pthread_attr_init(&main_thread.attr);
main_thread.attr.guard_size = 0; // The main thread has no guard page.
main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked.
// TODO: the main thread's sched_policy and sched_priority need to be queried.
__init_thread(&main_thread);
__init_tls(&main_thread);
// Store a pointer to the kernel argument block in a TLS slot to be
// picked up by the libc constructor.
main_thread.tls[TLS_SLOT_BIONIC_PREINIT] = &args;
__init_alternate_signal_stack(&main_thread);
}
void __libc_init_globals(KernelArgumentBlock& args) { void __libc_init_globals(KernelArgumentBlock& args) {
// Initialize libc globals that are needed in both the linker and in libc. // Initialize libc globals that are needed in both the linker and in libc.
// In dynamic binaries, this is run at least twice for different copies of the // In dynamic binaries, this is run at least twice for different copies of the
@ -291,7 +336,7 @@ void __libc_init_AT_SECURE(KernelArgumentBlock& args) {
if (getauxval(AT_SECURE)) { if (getauxval(AT_SECURE)) {
// If this is a setuid/setgid program, close the security hole described in // If this is a setuid/setgid program, close the security hole described in
// https://www.freebsd.org/security/advisories/FreeBSD-SA-02:23.stdio.asc // ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-02:23.stdio.asc
__nullify_closed_stdio(); __nullify_closed_stdio();
__sanitize_environment_variables(args.envp); __sanitize_environment_variables(args.envp);

View File

@ -25,7 +25,6 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* /*
* libc_init_dynamic.c * libc_init_dynamic.c
* *

View File

@ -25,6 +25,17 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/*
* libc_init_static.c
*
* The program startup function __libc_init() defined here is
* used for static executables only (i.e. those that don't depend
* on shared libraries). It is called from arch-$ARCH/bionic/crtbegin_static.S
* which is directly invoked by the kernel when the program is launched.
*
* The 'structors' parameter contains pointers to various initializer
* arrays that must be run before the program's 'main' routine is launched.
*/
#include <elf.h> #include <elf.h>
#include <errno.h> #include <errno.h>
@ -68,19 +79,12 @@ static void apply_gnu_relro() {
} }
} }
// The program startup function __libc_init() defined here is
// used for static executables only (i.e. those that don't depend
// on shared libraries). It is called from arch-$ARCH/bionic/crtbegin_static.S
// which is directly invoked by the kernel when the program is launched.
//
// The 'structors' parameter contains pointers to various initializer
// arrays that must be run before the program's 'main' routine is launched.
__noreturn void __libc_init(void* raw_args, __noreturn void __libc_init(void* raw_args,
void (*onexit)(void) __unused, void (*onexit)(void) __unused,
int (*slingshot)(int, char**, char**), int (*slingshot)(int, char**, char**),
structors_array_t const * const structors) { structors_array_t const * const structors) {
KernelArgumentBlock args(raw_args); KernelArgumentBlock args(raw_args);
__libc_init_main_thread(args); __libc_init_main_thread(args);
// Initializing the globals requires TLS to be available for errno. // Initializing the globals requires TLS to be available for errno.

View File

@ -49,8 +49,11 @@
extern "C" { extern "C" {
// Brillo and LP64 don't need to support any legacy cruft. // Brillo doesn't need to support any legacy cruft.
#if !defined(__BRILLO__) && !defined(__LP64__) #if !defined(__BRILLO__)
// Most of the cruft is only for 32-bit Android targets.
#if !defined(__LP64__)
// These were accidentally declared in <unistd.h> because we stupidly used to inline // These were accidentally declared in <unistd.h> because we stupidly used to inline
// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps. // getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
@ -340,17 +343,10 @@ size_t dlmalloc_usable_size(void* ptr) {
} }
// In L we added a public pthread_gettid_np, but some apps were using the private API. // In L we added a public pthread_gettid_np, but some apps were using the private API.
pid_t __pthread_gettid_libc(pthread_t t) { pid_t __pthread_gettid(pthread_t t) {
return pthread_gettid_np(t); return pthread_gettid_np(t);
} }
pid_t __pthread_gettid_libc_private(pthread_t t) {
return pthread_gettid_np(t);
}
__asm__(".symver __pthread_gettid_libc,__pthread_gettid@LIBC");
__asm__(".symver __pthread_gettid_libc_private,__pthread_gettid@@LIBC_PRIVATE");
// Older versions of apportable used dlmalloc directly instead of malloc, // Older versions of apportable used dlmalloc directly instead of malloc,
// so export this compatibility shim that simply calls malloc. // so export this compatibility shim that simply calls malloc.
void* dlmalloc(size_t size) { void* dlmalloc(size_t size) {
@ -371,6 +367,8 @@ long __set_errno(int n) {
return __set_errno_internal(n); return __set_errno_internal(n);
} }
#endif // !defined(__LP64__)
// This was never implemented in bionic, only needed for ABI compatibility with the NDK. // This was never implemented in bionic, only needed for ABI compatibility with the NDK.
// In the M time frame, over 1000 apps have a reference to this! // In the M time frame, over 1000 apps have a reference to this!
void endpwent() { } void endpwent() { }
@ -394,6 +392,6 @@ int dlmalloc_trim(size_t pad) {
} }
#endif #endif
#endif // !defined(__BRILLO__) && !defined (__LP64__) #endif // !defined(__BRILLO__)
} // extern "C" } // extern "C"

View File

@ -172,7 +172,7 @@ static int __pthread_cond_pulse(pthread_cond_internal_t* cond, int thread_count)
static int __pthread_cond_timedwait(pthread_cond_internal_t* cond, pthread_mutex_t* mutex, static int __pthread_cond_timedwait(pthread_cond_internal_t* cond, pthread_mutex_t* mutex,
bool use_realtime_clock, const timespec* abs_timeout_or_null) { bool use_realtime_clock, const timespec* abs_timeout_or_null) {
int result = check_timespec(abs_timeout_or_null, true); int result = check_timespec(abs_timeout_or_null);
if (result != 0) { if (result != 0) {
return result; return result;
} }

View File

@ -40,8 +40,7 @@
/* Has the thread been joined by another thread? */ /* Has the thread been joined by another thread? */
#define PTHREAD_ATTR_FLAG_JOINED 0x00000002 #define PTHREAD_ATTR_FLAG_JOINED 0x00000002
class pthread_key_data_t { struct pthread_key_data_t {
public:
uintptr_t seq; // Use uintptr_t just for alignment, as we use pointer below. uintptr_t seq; // Use uintptr_t just for alignment, as we use pointer below.
void* data; void* data;
}; };
@ -53,12 +52,11 @@ enum ThreadJoinState {
THREAD_DETACHED THREAD_DETACHED
}; };
class thread_local_dtor; struct thread_local_dtor;
class pthread_internal_t { struct pthread_internal_t {
public: struct pthread_internal_t* next;
class pthread_internal_t* next; struct pthread_internal_t* prev;
class pthread_internal_t* prev;
pid_t tid; pid_t tid;

View File

@ -304,7 +304,7 @@ static inline __always_inline int __pthread_normal_mutex_lock(pthread_mutex_inte
if (__predict_true(__pthread_normal_mutex_trylock(mutex, shared) == 0)) { if (__predict_true(__pthread_normal_mutex_trylock(mutex, shared) == 0)) {
return 0; return 0;
} }
int result = check_timespec(abs_timeout_or_null, true); int result = check_timespec(abs_timeout_or_null);
if (result != 0) { if (result != 0) {
return result; return result;
} }
@ -487,7 +487,7 @@ static int __pthread_mutex_lock_with_timeout(pthread_mutex_internal_t* mutex,
old_state = new_state; old_state = new_state;
} }
int result = check_timespec(abs_timeout_or_null, true); int result = check_timespec(abs_timeout_or_null);
if (result != 0) { if (result != 0) {
return result; return result;
} }

View File

@ -298,7 +298,7 @@ static int __pthread_rwlock_timedrdlock(pthread_rwlock_internal_t* rwlock,
if (result == 0 || result == EAGAIN) { if (result == 0 || result == EAGAIN) {
return result; return result;
} }
result = check_timespec(abs_timeout_or_null, true); result = check_timespec(abs_timeout_or_null);
if (result != 0) { if (result != 0) {
return result; return result;
} }
@ -370,7 +370,7 @@ static int __pthread_rwlock_timedwrlock(pthread_rwlock_internal_t* rwlock,
if (result == 0) { if (result == 0) {
return result; return result;
} }
result = check_timespec(abs_timeout_or_null, true); result = check_timespec(abs_timeout_or_null);
if (result != 0) { if (result != 0) {
return result; return result;
} }

View File

@ -235,7 +235,7 @@ int sem_timedwait(sem_t* sem, const timespec* abs_timeout) {
} }
// Check it as per POSIX. // Check it as per POSIX.
int result = check_timespec(abs_timeout, false); int result = check_timespec(abs_timeout);
if (result != 0) { if (result != 0) {
errno = result; errno = result;
return -1; return -1;

View File

@ -200,7 +200,6 @@ static char property_filename[PROP_FILENAME_MAX] = PROP_FILENAME;
static bool compat_mode = false; static bool compat_mode = false;
static size_t pa_data_size; static size_t pa_data_size;
static size_t pa_size; static size_t pa_size;
static bool initialized = false;
// NOTE: This isn't static because system_properties_compat.c // NOTE: This isn't static because system_properties_compat.c
// requires it. // requires it.
@ -643,33 +642,22 @@ bool prop_area::foreach(void (*propfn)(const prop_info* pi, void* cookie), void*
return foreach_property(root_node(), propfn, cookie); return foreach_property(root_node(), propfn, cookie);
} }
class context_node { struct context_node {
public: context_node(struct context_node* next, const char* context, prop_area* pa)
context_node(context_node* next, const char* context, prop_area* pa) : context(strdup(context)), pa(pa), checked_access(false), next(next) {
: next(next), context_(strdup(context)), pa_(pa), no_access_(false) { lock.init(false);
lock_.init(false);
} }
~context_node() { ~context_node() {
unmap(); if (pa) {
free(context_); munmap(pa, pa_size);
}
free(context);
} }
bool open(bool access_rw, bool* fsetxattr_failed); Lock lock;
bool check_access_and_open(); char* context;
void reset_access(); prop_area* pa;
bool checked_access;
const char* context() const { return context_; } struct context_node* next;
prop_area* pa() { return pa_; }
context_node* next;
private:
bool check_access();
void unmap();
Lock lock_;
char* context_;
prop_area* pa_;
bool no_access_;
}; };
struct prefix_node { struct prefix_node {
@ -745,50 +733,32 @@ static context_node* contexts = nullptr;
* allocation of memory for each filename. * allocation of memory for each filename.
*/ */
bool context_node::open(bool access_rw, bool* fsetxattr_failed) { static bool open_prop_file(context_node* cnode, bool access_rw, bool* fsetxattr_failed) {
lock_.lock(); cnode->lock.lock();
if (pa_) { if (cnode->pa) {
lock_.unlock(); cnode->lock.unlock();
return true; return true;
} }
char filename[PROP_FILENAME_MAX]; char filename[PROP_FILENAME_MAX];
int len = snprintf(filename, sizeof(filename), "%s/%s", property_filename, context_); int len = snprintf(filename, sizeof(filename), "%s/%s", property_filename, cnode->context);
if (len < 0 || len > PROP_FILENAME_MAX) { if (len < 0 || len > PROP_FILENAME_MAX) {
lock_.unlock(); cnode->lock.unlock();
return false; return false;
} }
if (access_rw) { if (access_rw) {
pa_ = map_prop_area_rw(filename, context_, fsetxattr_failed); cnode->pa = map_prop_area_rw(filename, cnode->context, fsetxattr_failed);
} else { } else {
pa_ = map_prop_area(filename, false); cnode->pa = map_prop_area(filename, false);
} }
lock_.unlock(); cnode->lock.unlock();
return pa_; return cnode->pa;
} }
bool context_node::check_access_and_open() { static bool check_access(context_node* cnode) {
if (!pa_ && !no_access_) {
if (!check_access() || !open(false, nullptr)) {
no_access_ = true;
}
}
return pa_;
}
void context_node::reset_access() {
if (!check_access()) {
unmap();
no_access_ = true;
} else {
no_access_ = false;
}
}
bool context_node::check_access() {
char filename[PROP_FILENAME_MAX]; char filename[PROP_FILENAME_MAX];
int len = snprintf(filename, sizeof(filename), "%s/%s", property_filename, context_); int len = snprintf(filename, sizeof(filename), "%s/%s", property_filename, cnode->context);
if (len < 0 || len > PROP_FILENAME_MAX) { if (len < 0 || len > PROP_FILENAME_MAX) {
return false; return false;
} }
@ -796,18 +766,6 @@ bool context_node::check_access() {
return access(filename, R_OK) == 0; return access(filename, R_OK) == 0;
} }
void context_node::unmap() {
if (!pa_) {
return;
}
munmap(pa_, pa_size);
if (pa_ == __system_property_area__) {
__system_property_area__ = nullptr;
}
pa_ = nullptr;
}
static bool map_system_property_area(bool access_rw, bool* fsetxattr_failed) { static bool map_system_property_area(bool access_rw, bool* fsetxattr_failed) {
char filename[PROP_FILENAME_MAX]; char filename[PROP_FILENAME_MAX];
int len = snprintf(filename, sizeof(filename), "%s/properties_serial", property_filename); int len = snprintf(filename, sizeof(filename), "%s/properties_serial", property_filename);
@ -834,15 +792,10 @@ static prop_area* get_prop_area_for_name(const char* name) {
} }
auto cnode = entry->context; auto cnode = entry->context;
if (!cnode->pa()) { if (!cnode->pa) {
/* open_prop_file(cnode, false, nullptr);
* We explicitly do not check no_access_ in this case because unlike the
* case of foreach(), we want to generate an selinux audit for each
* non-permitted property access in this function.
*/
cnode->open(false, nullptr);
} }
return cnode->pa(); return cnode->pa;
} }
/* /*
@ -939,6 +892,9 @@ static int read_spec_entries(char *line_buf, int num_args, ...)
} }
static bool initialize_properties() { static bool initialize_properties() {
list_free(&prefixes);
list_free(&contexts);
FILE* file = fopen("/property_contexts", "re"); FILE* file = fopen("/property_contexts", "re");
if (!file) { if (!file) {
@ -971,7 +927,7 @@ static bool initialize_properties() {
} }
auto old_context = list_find( auto old_context = list_find(
contexts, [context](context_node* l) { return !strcmp(l->context(), context); }); contexts, [context](context_node* l) { return !strcmp(l->context, context); });
if (old_context) { if (old_context) {
list_add_after_len(&prefixes, prop_prefix, old_context); list_add_after_len(&prefixes, prop_prefix, old_context);
} else { } else {
@ -995,27 +951,15 @@ static bool is_dir(const char* pathname) {
return S_ISDIR(info.st_mode); return S_ISDIR(info.st_mode);
} }
static void free_and_unmap_contexts() {
list_free(&prefixes);
list_free(&contexts);
if (__system_property_area__) {
munmap(__system_property_area__, pa_size);
__system_property_area__ = nullptr;
}
}
int __system_properties_init() int __system_properties_init()
{ {
if (initialized) {
list_foreach(contexts, [](context_node* l) { l->reset_access(); });
return 0;
}
if (is_dir(property_filename)) { if (is_dir(property_filename)) {
if (!initialize_properties()) { if (!initialize_properties()) {
return -1; return -1;
} }
if (!map_system_property_area(false, nullptr)) { if (!map_system_property_area(false, nullptr)) {
free_and_unmap_contexts(); list_free(&prefixes);
list_free(&contexts);
return -1; return -1;
} }
} else { } else {
@ -1026,7 +970,6 @@ int __system_properties_init()
list_add(&contexts, "legacy_system_prop_area", __system_property_area__); list_add(&contexts, "legacy_system_prop_area", __system_property_area__);
list_add_after_len(&prefixes, "*", contexts); list_add_after_len(&prefixes, "*", contexts);
} }
initialized = true;
return 0; return 0;
} }
@ -1042,23 +985,22 @@ int __system_property_set_filename(const char *filename)
int __system_property_area_init() int __system_property_area_init()
{ {
free_and_unmap_contexts();
mkdir(property_filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); mkdir(property_filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if (!initialize_properties()) { if (!initialize_properties()) {
return -1; return -1;
} }
bool open_failed = false; bool open_prop_file_failed = false;
bool fsetxattr_failed = false; bool fsetxattr_failed = false;
list_foreach(contexts, [&fsetxattr_failed, &open_failed](context_node* l) { list_foreach(contexts, [&fsetxattr_failed, &open_prop_file_failed](context_node* l) {
if (!l->open(true, &fsetxattr_failed)) { if (!open_prop_file(l, true, &fsetxattr_failed)) {
open_failed = true; open_prop_file_failed = true;
} }
}); });
if (open_failed || !map_system_property_area(true, &fsetxattr_failed)) { if (open_prop_file_failed || !map_system_property_area(true, &fsetxattr_failed)) {
free_and_unmap_contexts(); list_free(&prefixes);
list_free(&contexts);
return -1; return -1;
} }
initialized = true;
return fsetxattr_failed ? -2 : 0; return fsetxattr_failed ? -2 : 0;
} }
@ -1284,8 +1226,14 @@ int __system_property_foreach(void (*propfn)(const prop_info *pi, void *cookie),
} }
list_foreach(contexts, [propfn, cookie](context_node* l) { list_foreach(contexts, [propfn, cookie](context_node* l) {
if (l->check_access_and_open()) { if (!l->pa && !l->checked_access) {
l->pa()->foreach(propfn, cookie); if (check_access(l)) {
open_prop_file(l, false, nullptr);
}
l->checked_access = true;
}
if (l->pa) {
l->pa->foreach(propfn, cookie);
} }
}); });
return 0; return 0;

View File

@ -142,33 +142,6 @@ extern void* android_dlopen_ext(const char* filename, int flag, const android_dl
extern bool android_init_namespaces(const char* public_ns_sonames, extern bool android_init_namespaces(const char* public_ns_sonames,
const char* anon_ns_library_path); const char* anon_ns_library_path);
enum {
/* A regular namespace is the namespace with a custom search path that does
* not impose any restrictions on the location of native libraries.
*/
ANDROID_NAMESPACE_TYPE_REGULAR = 0,
/* An isolated namespace requires all the libraries to be on the search path
* or under permitted_when_isolated_path. The search path is the union of
* ld_library_path and default_library_path.
*/
ANDROID_NAMESPACE_TYPE_ISOLATED = 1,
/* The shared namespace clones the list of libraries of the caller namespace upon creation
* which means that they are shared between namespaces - the caller namespace and the new one
* will use the same copy of a library if it was loaded prior to android_create_namespace call.
*
* Note that libraries loaded after the namespace is created will not be shared.
*
* Shared namespaces can be isolated or regular. Note that they do not inherit the search path nor
* permitted_path from the caller's namespace.
*/
ANDROID_NAMESPACE_TYPE_SHARED = 2,
ANDROID_NAMESPACE_TYPE_SHARED_ISOLATED = ANDROID_NAMESPACE_TYPE_SHARED |
ANDROID_NAMESPACE_TYPE_ISOLATED,
};
/* /*
* Creates new linker namespace. * Creates new linker namespace.
* ld_library_path and default_library_path represent the search path * ld_library_path and default_library_path represent the search path
@ -179,19 +152,19 @@ enum {
* 2. In directories specified by DT_RUNPATH of the "needed by" binary. * 2. In directories specified by DT_RUNPATH of the "needed by" binary.
* 3. deault_library_path (This of this as namespace-local default library path) * 3. deault_library_path (This of this as namespace-local default library path)
* *
* When type is ANDROID_NAMESPACE_TYPE_ISOLATED the resulting namespace requires all of * When is_isolated is true the resulting namespace requires all of the libraries
* the libraries to be on the search path or under the permitted_when_isolated_path; * to be on the search path or under the permitted_when_isolated_path; the search_path is
* the search_path is ld_library_path:default_library_path. Note that the * ld_library_path:default_library_path. Note that the permitted_when_isolated_path path
* permitted_when_isolated_path path is not part of the search_path and * is not part of the search_path and does not affect the search order. It is a way
* does not affect the search order. It is a way to allow loading libraries from specific * to allow loading libraries from specific locations when using absolute path.
* locations when using absolute path. *
* If a library or any of its dependencies are outside of the permitted_when_isolated_path * If a library or any of its dependencies are outside of the permitted_when_isolated_path
* and search_path, and it is not part of the public namespace dlopen will fail. * and search_path, and it is not part of the public namespace dlopen will fail.
*/ */
extern struct android_namespace_t* android_create_namespace(const char* name, extern struct android_namespace_t* android_create_namespace(const char* name,
const char* ld_library_path, const char* ld_library_path,
const char* default_library_path, const char* default_library_path,
uint64_t type, bool is_isolated,
const char* permitted_when_isolated_path); const char* permitted_when_isolated_path);
__END_DECLS __END_DECLS

View File

@ -43,12 +43,11 @@ typedef struct {
in dli_sname */ in dli_sname */
} Dl_info; } Dl_info;
extern void* dlopen(const char* filename, int flag); extern void* dlopen(const char* filename, int flag);
extern int dlclose(void* handle); extern int dlclose(void* handle);
extern const char* dlerror(void); extern const char* dlerror(void);
extern void* dlsym(void* handle, const char* symbol) __nonnull((2)); extern void* dlsym(void* handle, const char* symbol);
extern void* dlvsym(void* handle, const char* symbol, const char* version) __nonnull((2, 3)); extern int dladdr(const void* addr, Dl_info *info);
extern int dladdr(const void* addr, Dl_info *info);
enum { enum {
#if defined(__LP64__) #if defined(__LP64__)

View File

@ -10,25 +10,43 @@ LIBC {
__b64_ntop; __b64_ntop;
__b64_pton; __b64_pton;
__brk; # arm x86 mips __brk; # arm x86 mips
__cmpdf2; # arm
__cmsg_nxthdr; __cmsg_nxthdr;
__connect; # arm x86 mips __connect; # arm x86 mips
__ctype_get_mb_cur_max; __ctype_get_mb_cur_max;
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
__epoll_pwait; # arm x86 mips __epoll_pwait; # arm x86 mips
__eqdf2; # arm
__errno; __errno;
__exit; # arm x86 mips __exit; # arm x86 mips
__extendsfdf2; # arm
__fbufsize; __fbufsize;
__fcntl64; # arm x86 mips __fcntl64; # arm x86 mips
__FD_CLR_chk; __FD_CLR_chk;
__FD_ISSET_chk; __FD_ISSET_chk;
__FD_SET_chk; __FD_SET_chk;
__fgets_chk; __fgets_chk;
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__flbf; __flbf;
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__fp_nquery; __fp_nquery;
__fp_query; __fp_query;
__fpclassify; __fpclassify;
@ -41,13 +59,18 @@ LIBC {
__fsetlocking; __fsetlocking;
__fstatfs64; # arm x86 mips __fstatfs64; # arm x86 mips
__fwritable; __fwritable;
__gedf2; # arm
__get_h_errno; __get_h_errno;
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
__gnu_ldivmod_helper; # arm
__gnu_strerror_r; __gnu_strerror_r;
__gnu_uldivmod_helper; # arm
__gtdf2; # arm
__hostalias; __hostalias;
__ioctl; # arm x86 mips __ioctl; # arm x86 mips
__isfinite; __isfinite;
@ -63,18 +86,25 @@ LIBC {
__isnormalf; __isnormalf;
__isnormall; __isnormall;
__isthreaded; __isthreaded;
__ledf2; # arm
__libc_current_sigrtmax; __libc_current_sigrtmax;
__libc_current_sigrtmin; __libc_current_sigrtmin;
__libc_init; __libc_init;
__llseek; # arm x86 mips __llseek; # arm x86 mips
__loc_aton; __loc_aton;
__loc_ntoa; __loc_ntoa;
__lshrdi3; # arm
__ltdf2; # arm
__memchr_chk; __memchr_chk;
__memcpy_chk; __memcpy_chk;
__memmove_chk; __memmove_chk;
__memrchr_chk; __memrchr_chk;
__memset_chk; __memset_chk;
__mmap2; # arm x86 mips __mmap2; # arm x86 mips
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__ns_format_ttl; # arm x86 mips __ns_format_ttl; # arm x86 mips
__ns_get16; # arm x86 mips __ns_get16; # arm x86 mips
__ns_get32; # arm x86 mips __ns_get32; # arm x86 mips
@ -114,6 +144,8 @@ LIBC {
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__poll_chk; __poll_chk;
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -151,6 +183,7 @@ LIBC {
__res_send; __res_send;
__res_send_setqhook; __res_send_setqhook;
__res_send_setrhook; __res_send_setrhook;
__restore_core_regs; # arm
__rt_sigaction; # arm x86 mips __rt_sigaction; # arm x86 mips
__rt_sigpending; # arm x86 mips __rt_sigpending; # arm x86 mips
__rt_sigprocmask; # arm x86 mips __rt_sigprocmask; # arm x86 mips
@ -160,14 +193,24 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__set_tls; # arm mips __set_tls; # arm mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -184,30 +227,40 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__truncdfsf2; # arm
__udivdi3; # arm x86 mips
__udivsi3; # arm
__umask_chk; __umask_chk;
__unorddf2; # arm
__unordsf2; # arm
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__waitid; # arm x86 mips __waitid; # arm x86 mips
@ -215,6 +268,7 @@ LIBC {
_Exit; _Exit;
_exit; _exit;
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -260,6 +314,7 @@ LIBC {
brk; brk;
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
cacheflush; # arm mips cacheflush; # arm mips
@ -389,6 +444,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -429,6 +485,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -674,6 +731,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -867,6 +925,7 @@ LIBC {
res_mkquery; res_mkquery;
res_query; res_query;
res_search; res_search;
restore_core_regs; # arm
rewind; rewind;
rewinddir; rewinddir;
rmdir; rmdir;
@ -1211,31 +1270,15 @@ LIBC {
LIBC_N { LIBC_N {
global: global:
__aeabi_atexit; # arm
__aeabi_memclr; # arm
__aeabi_memclr4; # arm
__aeabi_memclr8; # arm
__aeabi_memcpy; # arm
__aeabi_memcpy4; # arm
__aeabi_memcpy8; # arm
__aeabi_memmove; # arm
__aeabi_memmove4; # arm
__aeabi_memmove8; # arm
__aeabi_memset; # arm
__aeabi_memset4; # arm
__aeabi_memset8; # arm
__fread_chk; __fread_chk;
__fwrite_chk; __fwrite_chk;
__getcwd_chk; __getcwd_chk;
__gnu_Unwind_Find_exidx; # arm
__pwrite_chk; __pwrite_chk;
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1334,29 +1377,7 @@ LIBC_PRIVATE {
__ashrdi3; # arm __ashrdi3; # arm
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__bionic_libgcc_compat_symbols; # arm x86 __bionic_libgcc_compat_symbols; # arm x86
__cmpdf2; # arm
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dso_handle; # arm __dso_handle; # arm
__eqdf2; # arm
__extendsfdf2; # arm
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__gedf2; # arm
__getdents64; # arm x86 mips
__gnu_ldivmod_helper; # arm
__gnu_uldivmod_helper; # arm
__gnu_Unwind_Backtrace; # arm __gnu_Unwind_Backtrace; # arm
__gnu_unwind_execute; # arm __gnu_unwind_execute; # arm
__gnu_Unwind_Find_exidx; # arm __gnu_Unwind_Find_exidx; # arm
@ -1375,38 +1396,6 @@ LIBC_PRIVATE {
__gnu_Unwind_Save_VFP_D_16_to_31; # arm __gnu_Unwind_Save_VFP_D_16_to_31; # arm
__gnu_Unwind_Save_WMMXC; # arm __gnu_Unwind_Save_WMMXC; # arm
__gnu_Unwind_Save_WMMXD; # arm __gnu_Unwind_Save_WMMXD; # arm
__gtdf2; # arm
__ledf2; # arm
__lshrdi3; # arm
__ltdf2; # arm
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__restore_core_regs; # arm
__sclose; # arm x86 mips
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__truncdfsf2; # arm
__udivdi3; # arm mips
__udivsi3; # arm
__unorddf2; # arm
__unordsf2; # arm
_fwalk; # arm x86 mips
_Unwind_Backtrace; # arm _Unwind_Backtrace; # arm
_Unwind_Complete; # arm _Unwind_Complete; # arm
_Unwind_DeleteException; # arm _Unwind_DeleteException; # arm
@ -1423,10 +1412,7 @@ LIBC_PRIVATE {
_Unwind_VRS_Pop; # arm _Unwind_VRS_Pop; # arm
_Unwind_VRS_Set; # arm _Unwind_VRS_Set; # arm
atexit; # arm atexit; # arm
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
restore_core_regs; # arm
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips
SHA1Transform; # arm x86 mips SHA1Transform; # arm x86 mips

View File

@ -10,25 +10,43 @@ LIBC {
__b64_ntop; __b64_ntop;
__b64_pton; __b64_pton;
__brk; # arm x86 mips __brk; # arm x86 mips
__cmpdf2; # arm
__cmsg_nxthdr; __cmsg_nxthdr;
__connect; # arm x86 mips __connect; # arm x86 mips
__ctype_get_mb_cur_max; __ctype_get_mb_cur_max;
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
__epoll_pwait; # arm x86 mips __epoll_pwait; # arm x86 mips
__eqdf2; # arm
__errno; __errno;
__exit; # arm x86 mips __exit; # arm x86 mips
__extendsfdf2; # arm
__fbufsize; __fbufsize;
__fcntl64; # arm x86 mips __fcntl64; # arm x86 mips
__FD_CLR_chk; __FD_CLR_chk;
__FD_ISSET_chk; __FD_ISSET_chk;
__FD_SET_chk; __FD_SET_chk;
__fgets_chk; __fgets_chk;
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__flbf; __flbf;
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__fp_nquery; __fp_nquery;
__fp_query; __fp_query;
__fpclassify; __fpclassify;
@ -40,14 +58,23 @@ LIBC {
__freadable; __freadable;
__fsetlocking; __fsetlocking;
__fstatfs64; # arm x86 mips __fstatfs64; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__fwritable; __fwritable;
__gedf2; # arm
__get_h_errno; __get_h_errno;
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
__gnu_ldivmod_helper; # arm
__gnu_strerror_r; __gnu_strerror_r;
__gnu_uldivmod_helper; # arm
__gtdf2; # arm
__hostalias; __hostalias;
__ioctl; # arm x86 mips __ioctl; # arm x86 mips
__isfinite; __isfinite;
@ -63,18 +90,25 @@ LIBC {
__isnormalf; __isnormalf;
__isnormall; __isnormall;
__isthreaded; __isthreaded;
__ledf2; # arm
__libc_current_sigrtmax; __libc_current_sigrtmax;
__libc_current_sigrtmin; __libc_current_sigrtmin;
__libc_init; __libc_init;
__llseek; # arm x86 mips __llseek; # arm x86 mips
__loc_aton; __loc_aton;
__loc_ntoa; __loc_ntoa;
__lshrdi3; # arm
__ltdf2; # arm
__memchr_chk; __memchr_chk;
__memcpy_chk; __memcpy_chk;
__memmove_chk; __memmove_chk;
__memrchr_chk; __memrchr_chk;
__memset_chk; __memset_chk;
__mmap2; # arm x86 mips __mmap2; # arm x86 mips
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__ns_format_ttl; # arm x86 mips __ns_format_ttl; # arm x86 mips
__ns_get16; # arm x86 mips __ns_get16; # arm x86 mips
__ns_get32; # arm x86 mips __ns_get32; # arm x86 mips
@ -97,6 +131,7 @@ LIBC {
__ns_skiprr; # arm x86 mips __ns_skiprr; # arm x86 mips
__ns_sprintrr; # arm x86 mips __ns_sprintrr; # arm x86 mips
__ns_sprintrrf; # arm x86 mips __ns_sprintrrf; # arm x86 mips
__open; # arm x86 mips nobrillo
__open_2; __open_2;
__openat; # arm x86 mips __openat; # arm x86 mips
__openat_2; __openat_2;
@ -113,7 +148,11 @@ LIBC {
__p_time; __p_time;
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__poll_chk; __poll_chk;
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -152,6 +191,7 @@ LIBC {
__res_send; __res_send;
__res_send_setqhook; __res_send_setqhook;
__res_send_setrhook; __res_send_setrhook;
__restore_core_regs; # arm
__rt_sigaction; # arm x86 mips __rt_sigaction; # arm x86 mips
__rt_sigpending; # arm x86 mips __rt_sigpending; # arm x86 mips
__rt_sigprocmask; # arm x86 mips __rt_sigprocmask; # arm x86 mips
@ -161,14 +201,27 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__set_tls; # arm mips __set_tls; # arm mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -185,37 +238,49 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__truncdfsf2; # arm
__udivdi3; # arm x86 mips
__udivsi3; # arm
__umask_chk; __umask_chk;
__unorddf2; # arm
__unordsf2; # arm
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__wait4; # arm x86 mips nobrillo
__waitid; # arm x86 mips __waitid; # arm x86 mips
_ctype_; _ctype_;
_Exit; _Exit;
_exit; _exit;
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -242,7 +307,9 @@ LIBC {
android_gethostbynamefornet; android_gethostbynamefornet;
android_set_abort_message; android_set_abort_message;
arc4random; arc4random;
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_buf; arc4random_buf;
arc4random_stir; # arm x86 mips nobrillo
arc4random_uniform; arc4random_uniform;
asctime; asctime;
asctime64; # arm x86 mips asctime64; # arm x86 mips
@ -256,11 +323,14 @@ LIBC {
atoll; atoll;
basename; basename;
basename_r; # arm x86 mips basename_r; # arm x86 mips
bcopy; # arm x86 mips nobrillo
bind; bind;
bindresvport; bindresvport;
brk; brk;
bsd_signal; # arm x86 mips nobrillo
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
cacheflush; # arm mips cacheflush; # arm mips
@ -313,6 +383,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -359,6 +430,7 @@ LIBC {
fdatasync; fdatasync;
fdopen; fdopen;
fdopendir; fdopendir;
fdprintf; # arm x86 mips nobrillo
feof; feof;
feof_unlocked; feof_unlocked;
ferror; ferror;
@ -390,6 +462,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -410,6 +483,7 @@ LIBC {
fsync; fsync;
ftell; ftell;
ftello; ftello;
ftime; # arm x86 mips nobrillo
ftok; ftok;
ftruncate; ftruncate;
ftruncate64; ftruncate64;
@ -430,6 +504,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -441,6 +516,8 @@ LIBC {
getchar_unlocked; getchar_unlocked;
getcwd; getcwd;
getdelim; getdelim;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
getegid; getegid;
getenv; getenv;
geteuid; geteuid;
@ -515,6 +592,7 @@ LIBC {
if_nametoindex; if_nametoindex;
imaxabs; imaxabs;
imaxdiv; imaxdiv;
index; # arm x86 mips nobrillo
inet_addr; inet_addr;
inet_aton; inet_aton;
inet_lnaof; inet_lnaof;
@ -567,6 +645,7 @@ LIBC {
isprint_l; isprint_l;
ispunct; ispunct;
ispunct_l; ispunct_l;
issetugid; # arm x86 mips nobrillo
isspace; isspace;
isspace_l; isspace_l;
isupper; isupper;
@ -656,6 +735,7 @@ LIBC {
mempcpy; mempcpy;
memrchr; memrchr;
memset; memset;
memswap; # arm x86 mips nobrillo
mincore; mincore;
mkdir; mkdir;
mkdirat; mkdirat;
@ -675,6 +755,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -745,6 +826,7 @@ LIBC {
pthread_attr_getschedpolicy; pthread_attr_getschedpolicy;
pthread_attr_getscope; pthread_attr_getscope;
pthread_attr_getstack; pthread_attr_getstack;
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_getstacksize; pthread_attr_getstacksize;
pthread_attr_init; pthread_attr_init;
pthread_attr_setdetachstate; pthread_attr_setdetachstate;
@ -753,6 +835,7 @@ LIBC {
pthread_attr_setschedpolicy; pthread_attr_setschedpolicy;
pthread_attr_setscope; pthread_attr_setscope;
pthread_attr_setstack; pthread_attr_setstack;
pthread_attr_setstackaddr; # arm x86 mips nobrillo
pthread_attr_setstacksize; pthread_attr_setstacksize;
pthread_cond_broadcast; pthread_cond_broadcast;
pthread_cond_destroy; pthread_cond_destroy;
@ -868,6 +951,7 @@ LIBC {
res_mkquery; res_mkquery;
res_query; res_query;
res_search; res_search;
restore_core_regs; # arm
rewind; rewind;
rewinddir; rewinddir;
rmdir; rmdir;
@ -1010,6 +1094,8 @@ LIBC {
strncpy; strncpy;
strndup; strndup;
strnlen; strnlen;
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strpbrk; strpbrk;
strptime; strptime;
strrchr; strrchr;
@ -1028,6 +1114,7 @@ LIBC {
strtoll; strtoll;
strtoll_l; strtoll_l;
strtoq; strtoq;
strtotimeval; # arm x86 mips nobrillo
strtoul; strtoul;
strtoull; strtoull;
strtoull_l; strtoull_l;
@ -1049,6 +1136,7 @@ LIBC {
sysinfo; sysinfo;
syslog; syslog;
system; system;
sysv_signal; # arm x86 mips nobrillo
tcdrain; tcdrain;
tcflow; tcflow;
tcflush; tcflush;
@ -1080,6 +1168,7 @@ LIBC {
timerfd_settime; timerfd_settime;
times; times;
timezone; timezone;
tkill; # arm x86 mips nobrillo
tmpfile; tmpfile;
tmpnam; tmpnam;
toascii; toascii;
@ -1121,6 +1210,7 @@ LIBC {
vdprintf; vdprintf;
verr; verr;
verrx; verrx;
vfdprintf; # arm x86 mips nobrillo
vfork; vfork;
vfprintf; vfprintf;
vfscanf; vfscanf;
@ -1140,6 +1230,7 @@ LIBC {
vwprintf; vwprintf;
vwscanf; vwscanf;
wait; wait;
wait3; # arm x86 mips nobrillo
wait4; wait4;
waitid; waitid;
waitpid; waitpid;
@ -1188,6 +1279,7 @@ LIBC {
wcstoull; wcstoull;
wcstoull_l; wcstoull_l;
wcstoumax; wcstoumax;
wcswcs; # arm x86 mips nobrillo
wcswidth; wcswidth;
wcsxfrm; wcsxfrm;
wcsxfrm_l; wcsxfrm_l;
@ -1212,31 +1304,15 @@ LIBC {
LIBC_N { LIBC_N {
global: global:
__aeabi_atexit; # arm
__aeabi_memclr; # arm
__aeabi_memclr4; # arm
__aeabi_memclr8; # arm
__aeabi_memcpy; # arm
__aeabi_memcpy4; # arm
__aeabi_memcpy8; # arm
__aeabi_memmove; # arm
__aeabi_memmove4; # arm
__aeabi_memmove8; # arm
__aeabi_memset; # arm
__aeabi_memset4; # arm
__aeabi_memset8; # arm
__fread_chk; __fread_chk;
__fwrite_chk; __fwrite_chk;
__getcwd_chk; __getcwd_chk;
__gnu_Unwind_Find_exidx; # arm
__pwrite_chk; __pwrite_chk;
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1335,33 +1411,7 @@ LIBC_PRIVATE {
__ashrdi3; # arm __ashrdi3; # arm
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__bionic_libgcc_compat_symbols; # arm x86 __bionic_libgcc_compat_symbols; # arm x86
__cmpdf2; # arm
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dso_handle; # arm __dso_handle; # arm
__eqdf2; # arm
__extendsfdf2; # arm
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__gedf2; # arm
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getdents64; # arm x86 mips
__gnu_ldivmod_helper; # arm
__gnu_uldivmod_helper; # arm
__gnu_Unwind_Backtrace; # arm __gnu_Unwind_Backtrace; # arm
__gnu_unwind_execute; # arm __gnu_unwind_execute; # arm
__gnu_Unwind_Find_exidx; # arm __gnu_Unwind_Find_exidx; # arm
@ -1380,46 +1430,6 @@ LIBC_PRIVATE {
__gnu_Unwind_Save_VFP_D_16_to_31; # arm __gnu_Unwind_Save_VFP_D_16_to_31; # arm
__gnu_Unwind_Save_WMMXC; # arm __gnu_Unwind_Save_WMMXC; # arm
__gnu_Unwind_Save_WMMXD; # arm __gnu_Unwind_Save_WMMXD; # arm
__gtdf2; # arm
__ledf2; # arm
__lshrdi3; # arm
__ltdf2; # arm
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__open; # arm x86 mips nobrillo
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__pthread_gettid; # arm x86 mips nobrillo
__restore_core_regs; # arm
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__truncdfsf2; # arm
__udivdi3; # arm mips
__udivsi3; # arm
__unorddf2; # arm
__unordsf2; # arm
__wait4; # arm x86 mips nobrillo
_fwalk; # arm x86 mips
_Unwind_Backtrace; # arm _Unwind_Backtrace; # arm
_Unwind_Complete; # arm _Unwind_Complete; # arm
_Unwind_DeleteException; # arm _Unwind_DeleteException; # arm
@ -1435,40 +1445,14 @@ LIBC_PRIVATE {
_Unwind_VRS_Get; # arm _Unwind_VRS_Get; # arm
_Unwind_VRS_Pop; # arm _Unwind_VRS_Pop; # arm
_Unwind_VRS_Set; # arm _Unwind_VRS_Set; # arm
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_stir; # arm x86 mips nobrillo
atexit; # arm atexit; # arm
bcopy; # arm x86 mips nobrillo
bzero; # arm x86 mips nobrillo
bsd_signal; # arm x86 mips nobrillo
dlmalloc; # arm x86 mips nobrillo dlmalloc; # arm x86 mips nobrillo
dlmalloc_inspect_all; # arm x86 mips nobrillo dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_trim; # arm x86 mips nobrillo dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_usable_size; # arm x86 mips nobrillo dlmalloc_usable_size; # arm x86 mips nobrillo
endpwent; # arm x86 mips nobrillo
fdprintf; # arm x86 mips nobrillo
free_malloc_leak_info;
ftime; # arm x86 mips nobrillo
get_malloc_leak_info;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
index; # arm x86 mips nobrillo
issetugid; # arm x86 mips nobrillo
memswap; # arm x86 mips nobrillo
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_setstackaddr; # arm x86 mips nobrillo
restore_core_regs; # arm
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips
SHA1Transform; # arm x86 mips SHA1Transform; # arm x86 mips
SHA1Update; # arm x86 mips SHA1Update; # arm x86 mips
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strtotimeval; # arm x86 mips nobrillo
sysv_signal; # arm x86 mips nobrillo
tkill; # arm x86 mips nobrillo
vfdprintf; # arm x86 mips nobrillo
wait3; # arm x86 mips nobrillo
wcswcs; # arm x86 mips nobrillo
} LIBC_N; } LIBC_N;

1185
libc/libc.arm64.brillo.map Normal file

File diff suppressed because it is too large Load Diff

View File

@ -131,6 +131,21 @@ LIBC {
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init;
__system_property_add;
__system_property_area__;
__system_property_area_init;
__system_property_area_serial;
__system_property_find;
__system_property_find_nth;
__system_property_foreach;
__system_property_get;
__system_property_read;
__system_property_serial;
__system_property_set;
__system_property_set_filename;
__system_property_update;
__system_property_wait_any;
__umask_chk; __umask_chk;
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
@ -226,6 +241,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -301,6 +317,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -341,6 +358,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -581,6 +599,7 @@ LIBC {
mkstemps64; mkstemps64;
mktemp; mktemp;
mktime; mktime;
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -1138,10 +1157,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
pthread_barrierattr_destroy; pthread_barrierattr_destroy;
@ -1165,22 +1182,7 @@ LIBC_N {
LIBC_PRIVATE { LIBC_PRIVATE {
global: global:
__system_properties_init; # arm64 x86_64 mips64 dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_add; # arm64 x86_64 mips64 dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_area__; # arm64 x86_64 mips64
__system_property_area_init; # arm64 x86_64 mips64
__system_property_area_serial; # arm64 x86_64 mips64
__system_property_find; # arm64 x86_64 mips64
__system_property_find_nth; # arm64 x86_64 mips64
__system_property_foreach; # arm64 x86_64 mips64
__system_property_get; # arm64 x86_64 mips64
__system_property_read; # arm64 x86_64 mips64
__system_property_serial; # arm64 x86_64 mips64
__system_property_set; # arm64 x86_64 mips64
__system_property_set_filename; # arm64 x86_64 mips64
__system_property_update; # arm64 x86_64 mips64
__system_property_wait_any; # arm64 x86_64 mips64
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
} LIBC_N; } LIBC_N;

View File

@ -9,18 +9,25 @@ LIBC {
__b64_ntop; __b64_ntop;
__b64_pton; __b64_pton;
__brk; # arm x86 mips __brk; # arm x86 mips
__cmpdf2; # arm
__cmsg_nxthdr; __cmsg_nxthdr;
__connect; # arm x86 mips __connect; # arm x86 mips
__ctype_get_mb_cur_max; __ctype_get_mb_cur_max;
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
__epoll_pwait; # arm x86 mips __epoll_pwait; # arm x86 mips
__eqdf2; # arm
__errno; __errno;
__exit; # arm x86 mips __exit; # arm x86 mips
__extendsfdf2; # arm
__fadvise64; # x86 mips __fadvise64; # x86 mips
__fbufsize; __fbufsize;
__fcntl64; # arm x86 mips __fcntl64; # arm x86 mips
@ -28,7 +35,18 @@ LIBC {
__FD_ISSET_chk; __FD_ISSET_chk;
__FD_SET_chk; __FD_SET_chk;
__fgets_chk; __fgets_chk;
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__flbf; __flbf;
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__fp_nquery; __fp_nquery;
__fp_query; __fp_query;
__fpclassify; __fpclassify;
@ -40,14 +58,23 @@ LIBC {
__freadable; __freadable;
__fsetlocking; __fsetlocking;
__fstatfs64; # arm x86 mips __fstatfs64; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__fwritable; __fwritable;
__gedf2; # arm
__get_h_errno; __get_h_errno;
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
__gnu_ldivmod_helper; # arm
__gnu_strerror_r; __gnu_strerror_r;
__gnu_uldivmod_helper; # arm
__gtdf2; # arm
__hostalias; __hostalias;
__ioctl; # arm x86 mips __ioctl; # arm x86 mips
__isfinite; __isfinite;
@ -63,12 +90,15 @@ LIBC {
__isnormalf; __isnormalf;
__isnormall; __isnormall;
__isthreaded; __isthreaded;
__ledf2; # arm
__libc_current_sigrtmax; __libc_current_sigrtmax;
__libc_current_sigrtmin; __libc_current_sigrtmin;
__libc_init; __libc_init;
__llseek; # arm x86 mips __llseek; # arm x86 mips
__loc_aton; __loc_aton;
__loc_ntoa; __loc_ntoa;
__lshrdi3; # arm
__ltdf2; # arm
__memchr_chk; __memchr_chk;
__memcpy_chk; __memcpy_chk;
__memmove_chk; __memmove_chk;
@ -76,6 +106,10 @@ LIBC {
__memset_chk; __memset_chk;
__mmap2; # arm x86 mips __mmap2; # arm x86 mips
__moddi3; # x86 mips __moddi3; # x86 mips
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__ns_format_ttl; # arm x86 mips __ns_format_ttl; # arm x86 mips
__ns_get16; # arm x86 mips __ns_get16; # arm x86 mips
__ns_get32; # arm x86 mips __ns_get32; # arm x86 mips
@ -98,6 +132,7 @@ LIBC {
__ns_skiprr; # arm x86 mips __ns_skiprr; # arm x86 mips
__ns_sprintrr; # arm x86 mips __ns_sprintrr; # arm x86 mips
__ns_sprintrrf; # arm x86 mips __ns_sprintrrf; # arm x86 mips
__open; # arm x86 mips nobrillo
__open_2; __open_2;
__openat; # arm x86 mips __openat; # arm x86 mips
__openat_2; __openat_2;
@ -114,7 +149,11 @@ LIBC {
__p_time; __p_time;
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__poll_chk; __poll_chk;
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -153,6 +192,7 @@ LIBC {
__res_send; __res_send;
__res_send_setqhook; __res_send_setqhook;
__res_send_setrhook; __res_send_setrhook;
__restore_core_regs; # arm
__rt_sigaction; # arm x86 mips __rt_sigaction; # arm x86 mips
__rt_sigpending; # arm x86 mips __rt_sigpending; # arm x86 mips
__rt_sigprocmask; # arm x86 mips __rt_sigprocmask; # arm x86 mips
@ -162,15 +202,28 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__set_thread_area; # x86 __set_thread_area; # x86
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__set_tls; # arm mips __set_tls; # arm mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -187,39 +240,51 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__udivdi3; # x86 __truncdfsf2; # arm
__udivdi3; # arm x86 mips
__udivsi3; # arm
__umask_chk; __umask_chk;
__umoddi3; # x86 mips
__unorddf2; # arm
__unordsf2; # arm
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__wait4; # arm x86 mips nobrillo
__waitid; # arm x86 mips __waitid; # arm x86 mips
_ctype_; _ctype_;
_Exit; _Exit;
_exit; _exit;
_flush_cache; # mips _flush_cache; # mips
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -246,7 +311,9 @@ LIBC {
android_gethostbynamefornet; android_gethostbynamefornet;
android_set_abort_message; android_set_abort_message;
arc4random; arc4random;
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_buf; arc4random_buf;
arc4random_stir; # arm x86 mips nobrillo
arc4random_uniform; arc4random_uniform;
asctime; asctime;
asctime64; # arm x86 mips asctime64; # arm x86 mips
@ -260,11 +327,14 @@ LIBC {
atoll; atoll;
basename; basename;
basename_r; # arm x86 mips basename_r; # arm x86 mips
bcopy; # arm x86 mips nobrillo
bind; bind;
bindresvport; bindresvport;
brk; brk;
bsd_signal; # arm x86 mips nobrillo
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
cacheflush; # arm mips cacheflush; # arm mips
@ -317,6 +387,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -363,6 +434,7 @@ LIBC {
fdatasync; fdatasync;
fdopen; fdopen;
fdopendir; fdopendir;
fdprintf; # arm x86 mips nobrillo
feof; feof;
feof_unlocked; feof_unlocked;
ferror; ferror;
@ -394,6 +466,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -414,6 +487,7 @@ LIBC {
fsync; fsync;
ftell; ftell;
ftello; ftello;
ftime; # arm x86 mips nobrillo
ftok; ftok;
ftruncate; ftruncate;
ftruncate64; ftruncate64;
@ -434,6 +508,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -445,6 +520,8 @@ LIBC {
getchar_unlocked; getchar_unlocked;
getcwd; getcwd;
getdelim; getdelim;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
getegid; getegid;
getenv; getenv;
geteuid; geteuid;
@ -519,6 +596,7 @@ LIBC {
if_nametoindex; if_nametoindex;
imaxabs; imaxabs;
imaxdiv; imaxdiv;
index; # arm x86 mips nobrillo
inet_addr; inet_addr;
inet_aton; inet_aton;
inet_lnaof; inet_lnaof;
@ -571,6 +649,7 @@ LIBC {
isprint_l; isprint_l;
ispunct; ispunct;
ispunct_l; ispunct_l;
issetugid; # arm x86 mips nobrillo
isspace; isspace;
isspace_l; isspace_l;
isupper; isupper;
@ -660,6 +739,7 @@ LIBC {
mempcpy; mempcpy;
memrchr; memrchr;
memset; memset;
memswap; # arm x86 mips nobrillo
mincore; mincore;
mkdir; mkdir;
mkdirat; mkdirat;
@ -679,6 +759,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -772,6 +853,7 @@ LIBC {
pthread_attr_getschedpolicy; pthread_attr_getschedpolicy;
pthread_attr_getscope; pthread_attr_getscope;
pthread_attr_getstack; pthread_attr_getstack;
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_getstacksize; pthread_attr_getstacksize;
pthread_attr_init; pthread_attr_init;
pthread_attr_setdetachstate; pthread_attr_setdetachstate;
@ -780,6 +862,7 @@ LIBC {
pthread_attr_setschedpolicy; pthread_attr_setschedpolicy;
pthread_attr_setscope; pthread_attr_setscope;
pthread_attr_setstack; pthread_attr_setstack;
pthread_attr_setstackaddr; # arm x86 mips nobrillo
pthread_attr_setstacksize; pthread_attr_setstacksize;
pthread_cond_broadcast; pthread_cond_broadcast;
pthread_cond_destroy; pthread_cond_destroy;
@ -895,6 +978,7 @@ LIBC {
res_mkquery; res_mkquery;
res_query; res_query;
res_search; res_search;
restore_core_regs; # arm
rewind; rewind;
rewinddir; rewinddir;
rmdir; rmdir;
@ -1037,6 +1121,8 @@ LIBC {
strncpy; strncpy;
strndup; strndup;
strnlen; strnlen;
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strpbrk; strpbrk;
strptime; strptime;
strrchr; strrchr;
@ -1055,6 +1141,7 @@ LIBC {
strtoll; strtoll;
strtoll_l; strtoll_l;
strtoq; strtoq;
strtotimeval; # arm x86 mips nobrillo
strtoul; strtoul;
strtoull; strtoull;
strtoull_l; strtoull_l;
@ -1076,6 +1163,7 @@ LIBC {
sysinfo; sysinfo;
syslog; syslog;
system; system;
sysv_signal; # arm x86 mips nobrillo
tcdrain; tcdrain;
tcflow; tcflow;
tcflush; tcflush;
@ -1107,6 +1195,7 @@ LIBC {
timerfd_settime; timerfd_settime;
times; times;
timezone; timezone;
tkill; # arm x86 mips nobrillo
tmpfile; tmpfile;
tmpnam; tmpnam;
toascii; toascii;
@ -1148,6 +1237,7 @@ LIBC {
vdprintf; vdprintf;
verr; verr;
verrx; verrx;
vfdprintf; # arm x86 mips nobrillo
vfork; vfork;
vfprintf; vfprintf;
vfscanf; vfscanf;
@ -1167,6 +1257,7 @@ LIBC {
vwprintf; vwprintf;
vwscanf; vwscanf;
wait; wait;
wait3; # arm x86 mips nobrillo
wait4; wait4;
waitid; waitid;
waitpid; waitpid;
@ -1215,6 +1306,7 @@ LIBC {
wcstoull; wcstoull;
wcstoull_l; wcstoull_l;
wcstoumax; wcstoumax;
wcswcs; # arm x86 mips nobrillo
wcswidth; wcswidth;
wcsxfrm; wcsxfrm;
wcsxfrm_l; wcsxfrm_l;
@ -1239,31 +1331,15 @@ LIBC {
LIBC_N { LIBC_N {
global: global:
__aeabi_atexit; # arm
__aeabi_memclr; # arm
__aeabi_memclr4; # arm
__aeabi_memclr8; # arm
__aeabi_memcpy; # arm
__aeabi_memcpy4; # arm
__aeabi_memcpy8; # arm
__aeabi_memmove; # arm
__aeabi_memmove4; # arm
__aeabi_memmove8; # arm
__aeabi_memset; # arm
__aeabi_memset4; # arm
__aeabi_memset8; # arm
__fread_chk; __fread_chk;
__fwrite_chk; __fwrite_chk;
__getcwd_chk; __getcwd_chk;
__gnu_Unwind_Find_exidx; # arm
__pwrite_chk; __pwrite_chk;
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1362,33 +1438,7 @@ LIBC_PRIVATE {
__ashrdi3; # arm __ashrdi3; # arm
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__bionic_libgcc_compat_symbols; # arm x86 __bionic_libgcc_compat_symbols; # arm x86
__cmpdf2; # arm
__divdf3; # arm
__divdi3; # arm x86 mips
__divsf3; # arm
__divsi3; # arm
__dso_handle; # arm __dso_handle; # arm
__eqdf2; # arm
__extendsfdf2; # arm
__fixdfsi; # arm
__fixsfsi; # arm
__fixunssfsi; # arm
__floatdidf; # arm
__floatdisf; # arm
__floatsidf; # arm
__floatsisf; # arm
__floatundidf; # arm
__floatundisf; # arm
__floatunsidf; # arm
__floatunsisf; # arm
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__gedf2; # arm
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getdents64; # arm x86 mips
__gnu_ldivmod_helper; # arm
__gnu_uldivmod_helper; # arm
__gnu_Unwind_Backtrace; # arm __gnu_Unwind_Backtrace; # arm
__gnu_unwind_execute; # arm __gnu_unwind_execute; # arm
__gnu_Unwind_Find_exidx; # arm __gnu_Unwind_Find_exidx; # arm
@ -1407,62 +1457,6 @@ LIBC_PRIVATE {
__gnu_Unwind_Save_VFP_D_16_to_31; # arm __gnu_Unwind_Save_VFP_D_16_to_31; # arm
__gnu_Unwind_Save_WMMXC; # arm __gnu_Unwind_Save_WMMXC; # arm
__gnu_Unwind_Save_WMMXD; # arm __gnu_Unwind_Save_WMMXD; # arm
__gtdf2; # arm
__ledf2; # arm
__lshrdi3; # arm
__ltdf2; # arm
__muldf3; # arm
__muldi3; # arm
__mulsf3; # arm
__nedf2; # arm
__open; # arm x86 mips nobrillo
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__popcount_tab; # arm
__popcountsi2; # arm x86 mips
__pthread_gettid; # arm x86 mips nobrillo
__restore_core_regs; # arm
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__subdf3; # arm
__subsf3; # arm
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__system_properties_init; # arm64 x86_64 mips64
__system_property_add; # arm64 x86_64 mips64
__system_property_area__; # arm64 x86_64 mips64
__system_property_area_init; # arm64 x86_64 mips64
__system_property_area_serial; # arm64 x86_64 mips64
__system_property_find; # arm64 x86_64 mips64
__system_property_find_nth; # arm64 x86_64 mips64
__system_property_foreach; # arm64 x86_64 mips64
__system_property_get; # arm64 x86_64 mips64
__system_property_read; # arm64 x86_64 mips64
__system_property_serial; # arm64 x86_64 mips64
__system_property_set; # arm64 x86_64 mips64
__system_property_set_filename; # arm64 x86_64 mips64
__system_property_update; # arm64 x86_64 mips64
__system_property_wait_any; # arm64 x86_64 mips64
__truncdfsf2; # arm
__udivdi3; # arm mips
__udivsi3; # arm
__umoddi3; # x86 mips
__unorddf2; # arm
__unordsf2; # arm
__wait4; # arm x86 mips nobrillo
_fwalk; # arm x86 mips
_Unwind_Backtrace; # arm _Unwind_Backtrace; # arm
_Unwind_Complete; # arm _Unwind_Complete; # arm
_Unwind_DeleteException; # arm _Unwind_DeleteException; # arm
@ -1478,40 +1472,14 @@ LIBC_PRIVATE {
_Unwind_VRS_Get; # arm _Unwind_VRS_Get; # arm
_Unwind_VRS_Pop; # arm _Unwind_VRS_Pop; # arm
_Unwind_VRS_Set; # arm _Unwind_VRS_Set; # arm
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_stir; # arm x86 mips nobrillo
atexit; # arm atexit; # arm
bcopy; # arm x86 mips nobrillo
bzero; # arm x86 mips nobrillo
bsd_signal; # arm x86 mips nobrillo
dlmalloc; # arm x86 mips nobrillo dlmalloc; # arm x86 mips nobrillo
dlmalloc_inspect_all; # arm x86 mips nobrillo dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_trim; # arm x86 mips nobrillo dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_usable_size; # arm x86 mips nobrillo dlmalloc_usable_size; # arm x86 mips nobrillo
endpwent; # arm x86 mips nobrillo
fdprintf; # arm x86 mips nobrillo
free_malloc_leak_info;
ftime; # arm x86 mips nobrillo
get_malloc_leak_info;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
index; # arm x86 mips nobrillo
issetugid; # arm x86 mips nobrillo
memswap; # arm x86 mips nobrillo
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_setstackaddr; # arm x86 mips nobrillo
restore_core_regs; # arm
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips
SHA1Transform; # arm x86 mips SHA1Transform; # arm x86 mips
SHA1Update; # arm x86 mips SHA1Update; # arm x86 mips
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strtotimeval; # arm x86 mips nobrillo
sysv_signal; # arm x86 mips nobrillo
tkill; # arm x86 mips nobrillo
vfdprintf; # arm x86 mips nobrillo
wait3; # arm x86 mips nobrillo
wcswcs; # arm x86 mips nobrillo
} LIBC_N; } LIBC_N;

View File

@ -12,6 +12,7 @@ LIBC {
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdi3; # arm x86 mips
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
@ -41,6 +42,7 @@ LIBC {
__get_h_errno; __get_h_errno;
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
@ -112,6 +114,7 @@ LIBC {
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__poll_chk; __poll_chk;
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -158,14 +161,24 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__set_tls; # arm mips __set_tls; # arm mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -182,30 +195,35 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__udivdi3; # arm x86 mips
__umask_chk; __umask_chk;
__umoddi3; # x86 mips
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__waitid; # arm x86 mips __waitid; # arm x86 mips
@ -214,6 +232,7 @@ LIBC {
_exit; _exit;
_flush_cache; # mips _flush_cache; # mips
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -259,6 +278,7 @@ LIBC {
brk; brk;
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
cacheflush; # arm mips cacheflush; # arm mips
@ -388,6 +408,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -428,6 +449,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -673,6 +695,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -1217,10 +1240,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1247,27 +1268,6 @@ LIBC_PRIVATE {
global: global:
__accept4; # arm x86 mips __accept4; # arm x86 mips
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__divdi3; # arm x86 mips
__getdents64; # arm x86 mips
__popcountsi2; # arm x86 mips
__sclose; # arm x86 mips
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__udivdi3; # arm mips
__umoddi3; # x86 mips
_fwalk; # arm x86 mips
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips

View File

@ -12,6 +12,7 @@ LIBC {
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdi3; # arm x86 mips
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
@ -37,10 +38,15 @@ LIBC {
__freadable; __freadable;
__fsetlocking; __fsetlocking;
__fstatfs64; # arm x86 mips __fstatfs64; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__fwritable; __fwritable;
__get_h_errno; __get_h_errno;
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
@ -95,6 +101,7 @@ LIBC {
__ns_skiprr; # arm x86 mips __ns_skiprr; # arm x86 mips
__ns_sprintrr; # arm x86 mips __ns_sprintrr; # arm x86 mips
__ns_sprintrrf; # arm x86 mips __ns_sprintrrf; # arm x86 mips
__open; # arm x86 mips nobrillo
__open_2; __open_2;
__openat; # arm x86 mips __openat; # arm x86 mips
__openat_2; __openat_2;
@ -111,7 +118,10 @@ LIBC {
__p_time; __p_time;
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__poll_chk; __poll_chk;
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -159,14 +169,27 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__set_tls; # arm mips __set_tls; # arm mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -183,38 +206,45 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__udivdi3; # arm x86 mips
__umask_chk; __umask_chk;
__umoddi3; # x86 mips
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__wait4; # arm x86 mips nobrillo
__waitid; # arm x86 mips __waitid; # arm x86 mips
_ctype_; _ctype_;
_Exit; _Exit;
_exit; _exit;
_flush_cache; # mips _flush_cache; # mips
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -241,7 +271,9 @@ LIBC {
android_gethostbynamefornet; android_gethostbynamefornet;
android_set_abort_message; android_set_abort_message;
arc4random; arc4random;
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_buf; arc4random_buf;
arc4random_stir; # arm x86 mips nobrillo
arc4random_uniform; arc4random_uniform;
asctime; asctime;
asctime64; # arm x86 mips asctime64; # arm x86 mips
@ -255,11 +287,14 @@ LIBC {
atoll; atoll;
basename; basename;
basename_r; # arm x86 mips basename_r; # arm x86 mips
bcopy; # arm x86 mips nobrillo
bind; bind;
bindresvport; bindresvport;
brk; brk;
bsd_signal; # arm x86 mips nobrillo
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
cacheflush; # arm mips cacheflush; # arm mips
@ -312,6 +347,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -358,6 +394,7 @@ LIBC {
fdatasync; fdatasync;
fdopen; fdopen;
fdopendir; fdopendir;
fdprintf; # arm x86 mips nobrillo
feof; feof;
feof_unlocked; feof_unlocked;
ferror; ferror;
@ -389,6 +426,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -409,6 +447,7 @@ LIBC {
fsync; fsync;
ftell; ftell;
ftello; ftello;
ftime; # arm x86 mips nobrillo
ftok; ftok;
ftruncate; ftruncate;
ftruncate64; ftruncate64;
@ -429,6 +468,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -440,6 +480,8 @@ LIBC {
getchar_unlocked; getchar_unlocked;
getcwd; getcwd;
getdelim; getdelim;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
getegid; getegid;
getenv; getenv;
geteuid; geteuid;
@ -514,6 +556,7 @@ LIBC {
if_nametoindex; if_nametoindex;
imaxabs; imaxabs;
imaxdiv; imaxdiv;
index; # arm x86 mips nobrillo
inet_addr; inet_addr;
inet_aton; inet_aton;
inet_lnaof; inet_lnaof;
@ -566,6 +609,7 @@ LIBC {
isprint_l; isprint_l;
ispunct; ispunct;
ispunct_l; ispunct_l;
issetugid; # arm x86 mips nobrillo
isspace; isspace;
isspace_l; isspace_l;
isupper; isupper;
@ -655,6 +699,7 @@ LIBC {
mempcpy; mempcpy;
memrchr; memrchr;
memset; memset;
memswap; # arm x86 mips nobrillo
mincore; mincore;
mkdir; mkdir;
mkdirat; mkdirat;
@ -674,6 +719,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -744,6 +790,7 @@ LIBC {
pthread_attr_getschedpolicy; pthread_attr_getschedpolicy;
pthread_attr_getscope; pthread_attr_getscope;
pthread_attr_getstack; pthread_attr_getstack;
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_getstacksize; pthread_attr_getstacksize;
pthread_attr_init; pthread_attr_init;
pthread_attr_setdetachstate; pthread_attr_setdetachstate;
@ -752,6 +799,7 @@ LIBC {
pthread_attr_setschedpolicy; pthread_attr_setschedpolicy;
pthread_attr_setscope; pthread_attr_setscope;
pthread_attr_setstack; pthread_attr_setstack;
pthread_attr_setstackaddr; # arm x86 mips nobrillo
pthread_attr_setstacksize; pthread_attr_setstacksize;
pthread_cond_broadcast; pthread_cond_broadcast;
pthread_cond_destroy; pthread_cond_destroy;
@ -1009,6 +1057,8 @@ LIBC {
strncpy; strncpy;
strndup; strndup;
strnlen; strnlen;
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strpbrk; strpbrk;
strptime; strptime;
strrchr; strrchr;
@ -1027,6 +1077,7 @@ LIBC {
strtoll; strtoll;
strtoll_l; strtoll_l;
strtoq; strtoq;
strtotimeval; # arm x86 mips nobrillo
strtoul; strtoul;
strtoull; strtoull;
strtoull_l; strtoull_l;
@ -1048,6 +1099,7 @@ LIBC {
sysinfo; sysinfo;
syslog; syslog;
system; system;
sysv_signal; # arm x86 mips nobrillo
tcdrain; tcdrain;
tcflow; tcflow;
tcflush; tcflush;
@ -1079,6 +1131,7 @@ LIBC {
timerfd_settime; timerfd_settime;
times; times;
timezone; timezone;
tkill; # arm x86 mips nobrillo
tmpfile; tmpfile;
tmpnam; tmpnam;
toascii; toascii;
@ -1120,6 +1173,7 @@ LIBC {
vdprintf; vdprintf;
verr; verr;
verrx; verrx;
vfdprintf; # arm x86 mips nobrillo
vfork; vfork;
vfprintf; vfprintf;
vfscanf; vfscanf;
@ -1139,6 +1193,7 @@ LIBC {
vwprintf; vwprintf;
vwscanf; vwscanf;
wait; wait;
wait3; # arm x86 mips nobrillo
wait4; wait4;
waitid; waitid;
waitpid; waitpid;
@ -1187,6 +1242,7 @@ LIBC {
wcstoull; wcstoull;
wcstoull_l; wcstoull_l;
wcstoumax; wcstoumax;
wcswcs; # arm x86 mips nobrillo
wcswidth; wcswidth;
wcsxfrm; wcsxfrm;
wcsxfrm_l; wcsxfrm_l;
@ -1218,10 +1274,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1248,69 +1302,13 @@ LIBC_PRIVATE {
global: global:
__accept4; # arm x86 mips __accept4; # arm x86 mips
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__divdi3; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getdents64; # arm x86 mips
__open; # arm x86 mips nobrillo
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__popcountsi2; # arm x86 mips
__pthread_gettid; # arm x86 mips nobrillo
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__udivdi3; # arm mips
__umoddi3; # x86 mips
__wait4; # arm x86 mips nobrillo
_fwalk; # arm x86 mips
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_stir; # arm x86 mips nobrillo
bcopy; # arm x86 mips nobrillo
bzero; # arm x86 mips nobrillo
bsd_signal; # arm x86 mips nobrillo
dlmalloc; # arm x86 mips nobrillo dlmalloc; # arm x86 mips nobrillo
dlmalloc_inspect_all; # arm x86 mips nobrillo dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_trim; # arm x86 mips nobrillo dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_usable_size; # arm x86 mips nobrillo dlmalloc_usable_size; # arm x86 mips nobrillo
endpwent; # arm x86 mips nobrillo
fdprintf; # arm x86 mips nobrillo
free_malloc_leak_info;
ftime; # arm x86 mips nobrillo
get_malloc_leak_info;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
index; # arm x86 mips nobrillo
issetugid; # arm x86 mips nobrillo
memswap; # arm x86 mips nobrillo
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_setstackaddr; # arm x86 mips nobrillo
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips
SHA1Transform; # arm x86 mips SHA1Transform; # arm x86 mips
SHA1Update; # arm x86 mips SHA1Update; # arm x86 mips
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strtotimeval; # arm x86 mips nobrillo
sysv_signal; # arm x86 mips nobrillo
tkill; # arm x86 mips nobrillo
vfdprintf; # arm x86 mips nobrillo
wait3; # arm x86 mips nobrillo
wcswcs; # arm x86 mips nobrillo
} LIBC_N; } LIBC_N;

1185
libc/libc.mips64.brillo.map Normal file

File diff suppressed because it is too large Load Diff

View File

@ -131,6 +131,21 @@ LIBC {
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init;
__system_property_add;
__system_property_area__;
__system_property_area_init;
__system_property_area_serial;
__system_property_find;
__system_property_find_nth;
__system_property_foreach;
__system_property_get;
__system_property_read;
__system_property_serial;
__system_property_set;
__system_property_set_filename;
__system_property_update;
__system_property_wait_any;
__umask_chk; __umask_chk;
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
@ -226,6 +241,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -301,6 +317,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -341,6 +358,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -581,6 +599,7 @@ LIBC {
mkstemps64; mkstemps64;
mktemp; mktemp;
mktime; mktime;
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -1138,10 +1157,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
pthread_barrierattr_destroy; pthread_barrierattr_destroy;
@ -1165,22 +1182,7 @@ LIBC_N {
LIBC_PRIVATE { LIBC_PRIVATE {
global: global:
__system_properties_init; # arm64 x86_64 mips64 dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_add; # arm64 x86_64 mips64 dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_area__; # arm64 x86_64 mips64
__system_property_area_init; # arm64 x86_64 mips64
__system_property_area_serial; # arm64 x86_64 mips64
__system_property_find; # arm64 x86_64 mips64
__system_property_find_nth; # arm64 x86_64 mips64
__system_property_foreach; # arm64 x86_64 mips64
__system_property_get; # arm64 x86_64 mips64
__system_property_read; # arm64 x86_64 mips64
__system_property_serial; # arm64 x86_64 mips64
__system_property_set; # arm64 x86_64 mips64
__system_property_set_filename; # arm64 x86_64 mips64
__system_property_update; # arm64 x86_64 mips64
__system_property_wait_any; # arm64 x86_64 mips64
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
} LIBC_N; } LIBC_N;

View File

@ -12,6 +12,7 @@ LIBC {
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdi3; # arm x86 mips
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
@ -41,6 +42,7 @@ LIBC {
__get_h_errno; __get_h_errno;
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
@ -112,6 +114,7 @@ LIBC {
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__poll_chk; __poll_chk;
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -158,14 +161,24 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__set_thread_area; # x86 __set_thread_area; # x86
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -182,31 +195,35 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__udivdi3; # x86 __udivdi3; # arm x86 mips
__umask_chk; __umask_chk;
__umoddi3; # x86 mips
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__waitid; # arm x86 mips __waitid; # arm x86 mips
@ -214,6 +231,7 @@ LIBC {
_Exit; _Exit;
_exit; _exit;
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -259,6 +277,7 @@ LIBC {
brk; brk;
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
calloc; calloc;
@ -387,6 +406,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -427,6 +447,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -672,6 +693,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -1216,10 +1238,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1247,26 +1267,6 @@ LIBC_PRIVATE {
__accept4; # arm x86 mips __accept4; # arm x86 mips
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__bionic_libgcc_compat_symbols; # arm x86 __bionic_libgcc_compat_symbols; # arm x86
__divdi3; # arm x86 mips
__getdents64; # arm x86 mips
__popcountsi2; # arm x86 mips
__sclose; # arm x86 mips
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__umoddi3; # x86 mips
_fwalk; # arm x86 mips
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips

View File

@ -12,6 +12,7 @@ LIBC {
__cxa_atexit; __cxa_atexit;
__cxa_finalize; __cxa_finalize;
__cxa_thread_atexit_impl; __cxa_thread_atexit_impl;
__divdi3; # arm x86 mips
__dn_comp; __dn_comp;
__dn_count_labels; __dn_count_labels;
__dn_skipname; __dn_skipname;
@ -37,10 +38,15 @@ LIBC {
__freadable; __freadable;
__fsetlocking; __fsetlocking;
__fstatfs64; # arm x86 mips __fstatfs64; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__fwritable; __fwritable;
__get_h_errno; __get_h_errno;
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getcpu; # arm x86 mips __getcpu; # arm x86 mips
__getcwd; # arm x86 mips __getcwd; # arm x86 mips
__getdents64; # arm x86 mips
__getpid; # arm x86 mips __getpid; # arm x86 mips
__getpriority; # arm x86 mips __getpriority; # arm x86 mips
__gnu_basename; __gnu_basename;
@ -95,6 +101,7 @@ LIBC {
__ns_skiprr; # arm x86 mips __ns_skiprr; # arm x86 mips
__ns_sprintrr; # arm x86 mips __ns_sprintrr; # arm x86 mips
__ns_sprintrrf; # arm x86 mips __ns_sprintrrf; # arm x86 mips
__open; # arm x86 mips nobrillo
__open_2; __open_2;
__openat; # arm x86 mips __openat; # arm x86 mips
__openat_2; __openat_2;
@ -111,7 +118,10 @@ LIBC {
__p_time; __p_time;
__p_type; __p_type;
__p_type_syms; __p_type_syms;
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__poll_chk; __poll_chk;
__popcountsi2; # arm x86 mips
__ppoll; # arm x86 mips __ppoll; # arm x86 mips
__ppoll_chk; __ppoll_chk;
__pread64_chk; __pread64_chk;
@ -159,14 +169,27 @@ LIBC {
__sched_cpucount; __sched_cpucount;
__sched_cpufree; __sched_cpufree;
__sched_getaffinity; # arm x86 mips __sched_getaffinity; # arm x86 mips
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__set_thread_area; # x86 __set_thread_area; # x86
__set_tid_address; # arm x86 mips __set_tid_address; # arm x86 mips
__sF; __sF;
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sigaction; # arm x86 mips __sigaction; # arm x86 mips
__signalfd4; # arm x86 mips __signalfd4; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__snprintf_chk; __snprintf_chk;
__socket; # arm x86 mips __socket; # arm x86 mips
__sprintf_chk; __sprintf_chk;
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__stack_chk_fail; __stack_chk_fail;
__stack_chk_guard; __stack_chk_guard;
__statfs64; # arm x86 mips __statfs64; # arm x86 mips
@ -183,38 +206,44 @@ LIBC {
__strncpy_chk; __strncpy_chk;
__strncpy_chk2; __strncpy_chk2;
__strrchr_chk; __strrchr_chk;
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init; # arm x86 mips __system_properties_init;
__system_property_add; # arm x86 mips __system_property_add;
__system_property_area__; # arm x86 mips __system_property_area__;
__system_property_area_init; # arm x86 mips __system_property_area_init;
__system_property_area_serial; # arm x86 mips __system_property_area_serial;
__system_property_find; # arm x86 mips __system_property_find;
__system_property_find_nth; # arm x86 mips __system_property_find_nth;
__system_property_foreach; # arm x86 mips __system_property_foreach;
__system_property_get; # arm x86 mips __system_property_get;
__system_property_read; # arm x86 mips __system_property_read;
__system_property_serial; # arm x86 mips __system_property_serial;
__system_property_set; # arm x86 mips __system_property_set;
__system_property_set_filename; # arm x86 mips __system_property_set_filename;
__system_property_update; # arm x86 mips __system_property_update;
__system_property_wait_any; # arm x86 mips __system_property_wait_any;
__timer_create; # arm x86 mips __timer_create; # arm x86 mips
__timer_delete; # arm x86 mips __timer_delete; # arm x86 mips
__timer_getoverrun; # arm x86 mips __timer_getoverrun; # arm x86 mips
__timer_gettime; # arm x86 mips __timer_gettime; # arm x86 mips
__timer_settime; # arm x86 mips __timer_settime; # arm x86 mips
__udivdi3; # x86 __udivdi3; # arm x86 mips
__umask_chk; __umask_chk;
__umoddi3; # x86 mips
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
__wait4; # arm x86 mips nobrillo
__waitid; # arm x86 mips __waitid; # arm x86 mips
_ctype_; _ctype_;
_Exit; _Exit;
_exit; _exit;
_flushlbf; _flushlbf;
_fwalk; # arm x86 mips
_getlong; _getlong;
_getshort; _getshort;
_longjmp; _longjmp;
@ -241,7 +270,9 @@ LIBC {
android_gethostbynamefornet; android_gethostbynamefornet;
android_set_abort_message; android_set_abort_message;
arc4random; arc4random;
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_buf; arc4random_buf;
arc4random_stir; # arm x86 mips nobrillo
arc4random_uniform; arc4random_uniform;
asctime; asctime;
asctime64; # arm x86 mips asctime64; # arm x86 mips
@ -255,11 +286,14 @@ LIBC {
atoll; atoll;
basename; basename;
basename_r; # arm x86 mips basename_r; # arm x86 mips
bcopy; # arm x86 mips nobrillo
bind; bind;
bindresvport; bindresvport;
brk; brk;
bsd_signal; # arm x86 mips nobrillo
bsearch; bsearch;
btowc; btowc;
bzero; # arm x86 mips
c16rtomb; c16rtomb;
c32rtomb; c32rtomb;
calloc; calloc;
@ -311,6 +345,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -357,6 +392,7 @@ LIBC {
fdatasync; fdatasync;
fdopen; fdopen;
fdopendir; fdopendir;
fdprintf; # arm x86 mips nobrillo
feof; feof;
feof_unlocked; feof_unlocked;
ferror; ferror;
@ -388,6 +424,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -408,6 +445,7 @@ LIBC {
fsync; fsync;
ftell; ftell;
ftello; ftello;
ftime; # arm x86 mips nobrillo
ftok; ftok;
ftruncate; ftruncate;
ftruncate64; ftruncate64;
@ -428,6 +466,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -439,6 +478,8 @@ LIBC {
getchar_unlocked; getchar_unlocked;
getcwd; getcwd;
getdelim; getdelim;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
getegid; getegid;
getenv; getenv;
geteuid; geteuid;
@ -513,6 +554,7 @@ LIBC {
if_nametoindex; if_nametoindex;
imaxabs; imaxabs;
imaxdiv; imaxdiv;
index; # arm x86 mips nobrillo
inet_addr; inet_addr;
inet_aton; inet_aton;
inet_lnaof; inet_lnaof;
@ -565,6 +607,7 @@ LIBC {
isprint_l; isprint_l;
ispunct; ispunct;
ispunct_l; ispunct_l;
issetugid; # arm x86 mips nobrillo
isspace; isspace;
isspace_l; isspace_l;
isupper; isupper;
@ -654,6 +697,7 @@ LIBC {
mempcpy; mempcpy;
memrchr; memrchr;
memset; memset;
memswap; # arm x86 mips nobrillo
mincore; mincore;
mkdir; mkdir;
mkdirat; mkdirat;
@ -673,6 +717,7 @@ LIBC {
mktemp; mktemp;
mktime; mktime;
mktime64; # arm x86 mips mktime64; # arm x86 mips
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -743,6 +788,7 @@ LIBC {
pthread_attr_getschedpolicy; pthread_attr_getschedpolicy;
pthread_attr_getscope; pthread_attr_getscope;
pthread_attr_getstack; pthread_attr_getstack;
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_getstacksize; pthread_attr_getstacksize;
pthread_attr_init; pthread_attr_init;
pthread_attr_setdetachstate; pthread_attr_setdetachstate;
@ -751,6 +797,7 @@ LIBC {
pthread_attr_setschedpolicy; pthread_attr_setschedpolicy;
pthread_attr_setscope; pthread_attr_setscope;
pthread_attr_setstack; pthread_attr_setstack;
pthread_attr_setstackaddr; # arm x86 mips nobrillo
pthread_attr_setstacksize; pthread_attr_setstacksize;
pthread_cond_broadcast; pthread_cond_broadcast;
pthread_cond_destroy; pthread_cond_destroy;
@ -1008,6 +1055,8 @@ LIBC {
strncpy; strncpy;
strndup; strndup;
strnlen; strnlen;
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strpbrk; strpbrk;
strptime; strptime;
strrchr; strrchr;
@ -1026,6 +1075,7 @@ LIBC {
strtoll; strtoll;
strtoll_l; strtoll_l;
strtoq; strtoq;
strtotimeval; # arm x86 mips nobrillo
strtoul; strtoul;
strtoull; strtoull;
strtoull_l; strtoull_l;
@ -1047,6 +1097,7 @@ LIBC {
sysinfo; sysinfo;
syslog; syslog;
system; system;
sysv_signal; # arm x86 mips nobrillo
tcdrain; tcdrain;
tcflow; tcflow;
tcflush; tcflush;
@ -1078,6 +1129,7 @@ LIBC {
timerfd_settime; timerfd_settime;
times; times;
timezone; timezone;
tkill; # arm x86 mips nobrillo
tmpfile; tmpfile;
tmpnam; tmpnam;
toascii; toascii;
@ -1119,6 +1171,7 @@ LIBC {
vdprintf; vdprintf;
verr; verr;
verrx; verrx;
vfdprintf; # arm x86 mips nobrillo
vfork; vfork;
vfprintf; vfprintf;
vfscanf; vfscanf;
@ -1138,6 +1191,7 @@ LIBC {
vwprintf; vwprintf;
vwscanf; vwscanf;
wait; wait;
wait3; # arm x86 mips nobrillo
wait4; wait4;
waitid; waitid;
waitpid; waitpid;
@ -1186,6 +1240,7 @@ LIBC {
wcstoull; wcstoull;
wcstoull_l; wcstoull_l;
wcstoumax; wcstoumax;
wcswcs; # arm x86 mips nobrillo
wcswidth; wcswidth;
wcsxfrm; wcsxfrm;
wcsxfrm_l; wcsxfrm_l;
@ -1217,10 +1272,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
prlimit; # arm mips x86 prlimit; # arm mips x86
@ -1248,68 +1301,13 @@ LIBC_PRIVATE {
__accept4; # arm x86 mips __accept4; # arm x86 mips
__bionic_brk; # arm x86 mips __bionic_brk; # arm x86 mips
__bionic_libgcc_compat_symbols; # arm x86 __bionic_libgcc_compat_symbols; # arm x86
__divdi3; # arm x86 mips
__futex_wait; # arm x86 mips nobrillo
__futex_wake; # arm x86 mips nobrillo
__get_thread; # arm x86 mips nobrillo
__get_tls; # arm x86 mips nobrillo
__getdents64; # arm x86 mips
__open; # arm x86 mips nobrillo
__page_shift; # arm x86 mips nobrillo
__page_size; # arm x86 mips nobrillo
__popcountsi2; # arm x86 mips
__pthread_gettid; # arm x86 mips nobrillo
__sclose; # arm x86 mips
__sdidinit; # arm x86 mips nobrillo
__set_errno; # arm x86 mips nobrillo
__sflags; # arm x86 mips
__sflush; # arm x86 mips
__sfp; # arm x86 mips
__sglue; # arm x86 mips
__sinit; # arm x86 mips nobrillo
__smakebuf; # arm x86 mips
__sread; # arm x86 mips
__srefill; # arm x86 mips
__srget; # arm x86 mips
__sseek; # arm x86 mips
__swbuf; # arm x86 mips
__swrite; # arm x86 mips
__swsetup; # arm x86 mips
__umoddi3; # x86 mips
__wait4; # arm x86 mips nobrillo
_fwalk; # arm x86 mips
arc4random_addrandom; # arm x86 mips nobrillo
arc4random_stir; # arm x86 mips nobrillo
bcopy; # arm x86 mips nobrillo
bzero; # arm x86 mips nobrillo
bsd_signal; # arm x86 mips nobrillo
dlmalloc; # arm x86 mips nobrillo dlmalloc; # arm x86 mips nobrillo
dlmalloc_inspect_all; # arm x86 mips nobrillo dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_trim; # arm x86 mips nobrillo dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
dlmalloc_usable_size; # arm x86 mips nobrillo dlmalloc_usable_size; # arm x86 mips nobrillo
endpwent; # arm x86 mips nobrillo
fdprintf; # arm x86 mips nobrillo
free_malloc_leak_info;
ftime; # arm x86 mips nobrillo
get_malloc_leak_info;
getdents; # arm x86 mips nobrillo
getdtablesize; # arm x86 mips nobrillo
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
index; # arm x86 mips nobrillo
issetugid; # arm x86 mips nobrillo
memswap; # arm x86 mips nobrillo
pthread_attr_getstackaddr; # arm x86 mips nobrillo
pthread_attr_setstackaddr; # arm x86 mips nobrillo
SHA1Final; # arm x86 mips SHA1Final; # arm x86 mips
SHA1Init; # arm x86 mips SHA1Init; # arm x86 mips
SHA1Transform; # arm x86 mips SHA1Transform; # arm x86 mips
SHA1Update; # arm x86 mips SHA1Update; # arm x86 mips
strntoimax; # arm x86 mips nobrillo
strntoumax; # arm x86 mips nobrillo
strtotimeval; # arm x86 mips nobrillo
sysv_signal; # arm x86 mips nobrillo
tkill; # arm x86 mips nobrillo
vfdprintf; # arm x86 mips nobrillo
wait3; # arm x86 mips nobrillo
wcswcs; # arm x86 mips nobrillo
} LIBC_N; } LIBC_N;

1185
libc/libc.x86_64.brillo.map Normal file

File diff suppressed because it is too large Load Diff

View File

@ -131,6 +131,21 @@ LIBC {
__sym_ntop; __sym_ntop;
__sym_ntos; __sym_ntos;
__sym_ston; __sym_ston;
__system_properties_init;
__system_property_add;
__system_property_area__;
__system_property_area_init;
__system_property_area_serial;
__system_property_find;
__system_property_find_nth;
__system_property_foreach;
__system_property_get;
__system_property_read;
__system_property_serial;
__system_property_set;
__system_property_set_filename;
__system_property_update;
__system_property_wait_any;
__umask_chk; __umask_chk;
__vsnprintf_chk; __vsnprintf_chk;
__vsprintf_chk; __vsprintf_chk;
@ -226,6 +241,7 @@ LIBC {
dup3; dup3;
duplocale; duplocale;
endmntent; endmntent;
endpwent; # arm arm64 x86 x86_64 mips mips64 nobrillo
endservent; endservent;
endutent; endutent;
environ; environ;
@ -301,6 +317,7 @@ LIBC {
fputws; fputws;
fread; fread;
free; free;
free_malloc_leak_info;
freeaddrinfo; freeaddrinfo;
freelocale; freelocale;
fremovexattr; fremovexattr;
@ -341,6 +358,7 @@ LIBC {
fwscanf; fwscanf;
gai_strerror; gai_strerror;
get_avphys_pages; get_avphys_pages;
get_malloc_leak_info;
get_nprocs; get_nprocs;
get_nprocs_conf; get_nprocs_conf;
get_phys_pages; get_phys_pages;
@ -581,6 +599,7 @@ LIBC {
mkstemps64; mkstemps64;
mktemp; mktemp;
mktime; mktime;
mktime_tz;
mlock; mlock;
mlockall; mlockall;
mmap; mmap;
@ -1138,10 +1157,8 @@ LIBC_N {
__pwrite64_chk; __pwrite64_chk;
__write_chk; __write_chk;
fileno_unlocked; fileno_unlocked;
freeifaddrs;
getgrgid_r; getgrgid_r;
getgrnam_r; getgrnam_r;
getifaddrs;
preadv; preadv;
preadv64; preadv64;
pthread_barrierattr_destroy; pthread_barrierattr_destroy;
@ -1165,22 +1182,7 @@ LIBC_N {
LIBC_PRIVATE { LIBC_PRIVATE {
global: global:
__system_properties_init; # arm64 x86_64 mips64 dlmalloc_inspect_all; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_add; # arm64 x86_64 mips64 dlmalloc_trim; # arm arm64 x86 x86_64 mips mips64 nobrillo
__system_property_area__; # arm64 x86_64 mips64
__system_property_area_init; # arm64 x86_64 mips64
__system_property_area_serial; # arm64 x86_64 mips64
__system_property_find; # arm64 x86_64 mips64
__system_property_find_nth; # arm64 x86_64 mips64
__system_property_foreach; # arm64 x86_64 mips64
__system_property_get; # arm64 x86_64 mips64
__system_property_read; # arm64 x86_64 mips64
__system_property_serial; # arm64 x86_64 mips64
__system_property_set; # arm64 x86_64 mips64
__system_property_set_filename; # arm64 x86_64 mips64
__system_property_update; # arm64 x86_64 mips64
__system_property_wait_any; # arm64 x86_64 mips64
free_malloc_leak_info;
get_malloc_leak_info;
gMallocLeakZygoteChild; gMallocLeakZygoteChild;
} LIBC_N; } LIBC_N;

View File

@ -38,25 +38,32 @@ class KernelArgumentBlock {
argv = reinterpret_cast<char**>(args + 1); argv = reinterpret_cast<char**>(args + 1);
envp = argv + argc + 1; envp = argv + argc + 1;
// Skip over all environment variable definitions to find the aux vector. // Skip over all environment variable definitions to find aux vector.
// The end of the environment block is marked by a NULL pointer. // The end of the environment block is marked by two NULL pointers.
char** p = envp; char** p = envp;
while (*p != NULL) { while (*p != NULL) {
++p; ++p;
} }
++p; // Skip the NULL itself. ++p; // Skip second NULL;
auxv = reinterpret_cast<ElfW(auxv_t)*>(p); auxv = reinterpret_cast<ElfW(auxv_t)*>(p);
} }
// Similar to ::getauxval but doesn't require the libc global variables to be set up, // Similar to ::getauxval but doesn't require the libc global variables to be set up,
// so it's safe to call this really early on. // so it's safe to call this really early on. This function also lets you distinguish
unsigned long getauxval(unsigned long type) { // between the inability to find the given type and its value just happening to be 0.
unsigned long getauxval(unsigned long type, bool* found_match = NULL) {
for (ElfW(auxv_t)* v = auxv; v->a_type != AT_NULL; ++v) { for (ElfW(auxv_t)* v = auxv; v->a_type != AT_NULL; ++v) {
if (v->a_type == type) { if (v->a_type == type) {
if (found_match != NULL) {
*found_match = true;
}
return v->a_un.a_val; return v->a_un.a_val;
} }
} }
if (found_match != NULL) {
*found_match = false;
}
return 0; return 0;
} }

View File

@ -42,8 +42,8 @@
(((value) + (alignment) - 1) & ~((alignment) - 1)) (((value) + (alignment) - 1) & ~((alignment) - 1))
#define BIONIC_ROUND_UP_POWER_OF_2(value) \ #define BIONIC_ROUND_UP_POWER_OF_2(value) \
((sizeof(value) == 8) \ (sizeof(value) == 8) \
? (1UL << (64 - __builtin_clzl(static_cast<unsigned long>(value)))) \ ? (1UL << (64 - __builtin_clzl(static_cast<unsigned long>(value)))) \
: (1UL << (32 - __builtin_clz(static_cast<unsigned int>(value))))) : (1UL << (32 - __builtin_clz(static_cast<unsigned int>(value))))
#endif // _BIONIC_MACROS_H_ #endif // _BIONIC_MACROS_H_

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2015 The Android Open Source Project * Copyright (C) 2011 The Android Open Source Project
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -25,35 +25,17 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef _BIONIC_TIME_H
#define _BIONIC_TIME_H
#ifndef _IFADDRS_H_ #include <time.h>
#define _IFADDRS_H_
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <netinet/in.h>
#include <sys/socket.h>
__BEGIN_DECLS __BEGIN_DECLS
struct ifaddrs { // We can't remove this (and this file) until we fix MtpUtils.cpp.
struct ifaddrs* ifa_next; time_t mktime_tz(struct tm* const, char const*);
char* ifa_name;
unsigned int ifa_flags;
struct sockaddr* ifa_addr;
struct sockaddr* ifa_netmask;
union {
struct sockaddr* ifu_broadaddr;
struct sockaddr* ifu_dstaddr;
} ifa_ifu;
void* ifa_data;
};
#define ifa_broadaddr ifa_ifu.ifu_broadaddr
#define ifa_dstaddr ifa_ifu.ifu_dstaddr
void freeifaddrs(struct ifaddrs*);
int getifaddrs(struct ifaddrs**);
__END_DECLS __END_DECLS
#endif #endif /* _BIONIC_TIME_H */

View File

@ -47,17 +47,14 @@ __LIBC_HIDDEN__ void absolute_timespec_from_timespec(timespec& abs_ts, const tim
__END_DECLS __END_DECLS
static inline int check_timespec(const timespec* ts, bool null_allowed) { static inline int check_timespec(const timespec* ts) {
if (null_allowed && ts == nullptr) { if (ts != nullptr) {
return 0; if (ts->tv_nsec < 0 || ts->tv_nsec >= NS_PER_S) {
} return EINVAL;
// glibc just segfaults if you pass a null timespec. }
// That seems a lot more likely to catch bad code than returning EINVAL. if (ts->tv_sec < 0) {
if (ts->tv_nsec < 0 || ts->tv_nsec >= NS_PER_S) { return ETIMEDOUT;
return EINVAL; }
}
if (ts->tv_sec < 0) {
return ETIMEDOUT;
} }
return 0; return 0;
} }

View File

@ -121,7 +121,7 @@ __END_DECLS
#if defined(__cplusplus) #if defined(__cplusplus)
class KernelArgumentBlock; class KernelArgumentBlock;
extern __LIBC_HIDDEN__ void __libc_init_main_thread(KernelArgumentBlock&); extern __LIBC_HIDDEN__ void __libc_init_main_thread(KernelArgumentBlock& args);
#endif #endif
#endif /* __BIONIC_PRIVATE_BIONIC_TLS_H_ */ #endif /* __BIONIC_PRIVATE_BIONIC_TLS_H_ */

View File

@ -2462,4 +2462,50 @@ static int __bionic_open_tzdata(const char* olson_id) {
return fd; return fd;
} }
// Caches the most recent timezone (http://b/8270865).
static int __bionic_tzload_cached(const char* name, struct state* const sp, const int doextend) {
lock();
// Our single-item cache.
static char* g_cached_time_zone_name;
static struct state g_cached_time_zone;
// Do we already have this timezone cached?
if (g_cached_time_zone_name != NULL && strcmp(name, g_cached_time_zone_name) == 0) {
*sp = g_cached_time_zone;
unlock();
return 0;
}
// Can we load it?
int rc = tzload(name, sp, doextend);
if (rc == 0) {
// Update the cache.
free(g_cached_time_zone_name);
g_cached_time_zone_name = strdup(name);
g_cached_time_zone = *sp;
}
unlock();
return rc;
}
// Non-standard API: mktime(3) but with an explicit timezone parameter.
// This can't actually be hidden/removed until we fix MtpUtils.cpp
__attribute__((visibility("default"))) time_t mktime_tz(struct tm* const tmp, const char* tz) {
struct state* st = malloc(sizeof(*st));
time_t return_value;
if (st == NULL)
return 0;
if (__bionic_tzload_cached(tz, st, true) != 0) {
// TODO: not sure what's best here, but for now, we fall back to gmt.
gmtload(st);
}
return_value = time1(tmp, localsub, st, 0L);
free(st);
return return_value;
}
// END android-added // END android-added

View File

@ -4822,13 +4822,8 @@ void* dlcalloc(size_t n_elements, size_t elem_size) {
req = MAX_SIZE_T; /* force downstream failure on overflow */ req = MAX_SIZE_T; /* force downstream failure on overflow */
} }
mem = dlmalloc(req); mem = dlmalloc(req);
if (mem != 0) { if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
mchunkptr p = mem2chunk(mem); memset(mem, 0, req);
if (calloc_must_clear(p)) {
/* Make sure to clear all of the buffer, not just the requested size. */
memset(mem, 0, chunksize(p) - overhead_for(p));
}
}
return mem; return mem;
} }

View File

@ -18,7 +18,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -17,7 +17,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -24,17 +24,9 @@
// in the dynamic linker and hijacked at runtime. // in the dynamic linker and hijacked at runtime.
void* dlopen(const char* filename __unused, int flag __unused) { return 0; } void* dlopen(const char* filename __unused, int flag __unused) { return 0; }
const char* dlerror(void) { return 0; } const char* dlerror(void) { return 0; }
void* dlsym(void* handle __unused, const char* symbol __unused) { return 0; } void* dlsym(void* handle __unused, const char* symbol __unused) { return 0; }
void* dlvsym(void* handle __unused, const char* symbol __unused, const char* version __unused) {
return 0;
}
int dladdr(const void* addr __unused, Dl_info* info __unused) { return 0; } int dladdr(const void* addr __unused, Dl_info* info __unused) { return 0; }
int dlclose(void* handle __unused) { return 0; } int dlclose(void* handle __unused) { return 0; }
#if defined(__arm__) #if defined(__arm__)
@ -65,7 +57,7 @@ bool android_init_namespaces(const char* public_ns_sonames __unused,
struct android_namespace_t* android_create_namespace(const char* name __unused, struct android_namespace_t* android_create_namespace(const char* name __unused,
const char* ld_library_path __unused, const char* ld_library_path __unused,
const char* default_library_path __unused, const char* default_library_path __unused,
uint64_t type __unused, bool isolated __unused,
const char* permitted_when_isolated_path __unused) { const char* permitted_when_isolated_path __unused) {
return 0; return 0;
} }

View File

@ -32,7 +32,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -17,7 +17,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -17,7 +17,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -17,7 +17,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -17,7 +17,6 @@ LIBC_N {
global: global:
android_init_namespaces; android_init_namespaces;
android_create_namespace; android_create_namespace;
dlvsym;
} LIBC; } LIBC;
LIBC_PRIVATE { LIBC_PRIVATE {

View File

@ -88,10 +88,11 @@ void* dlopen(const char* filename, int flags) {
extern android_namespace_t* g_anonymous_namespace; extern android_namespace_t* g_anonymous_namespace;
void* dlsym_impl(void* handle, const char* symbol, const char* version, void* caller_addr) { void* dlsym(void* handle, const char* symbol) {
void* caller_addr = __builtin_return_address(0);
ScopedPthreadMutexLocker locker(&g_dl_mutex); ScopedPthreadMutexLocker locker(&g_dl_mutex);
void* result; void* result;
if (!do_dlsym(handle, symbol, version, caller_addr, &result)) { if (!do_dlsym(handle, symbol, nullptr, caller_addr, &result)) {
__bionic_format_dlerror(linker_get_error_buffer(), nullptr); __bionic_format_dlerror(linker_get_error_buffer(), nullptr);
return nullptr; return nullptr;
} }
@ -99,16 +100,6 @@ void* dlsym_impl(void* handle, const char* symbol, const char* version, void* ca
return result; return result;
} }
void* dlsym(void* handle, const char* symbol) {
void* caller_addr = __builtin_return_address(0);
return dlsym_impl(handle, symbol, nullptr, caller_addr);
}
void* dlvsym(void* handle, const char* symbol, const char* version) {
void* caller_addr = __builtin_return_address(0);
return dlsym_impl(handle, symbol, version, caller_addr);
}
int dladdr(const void* addr, Dl_info* info) { int dladdr(const void* addr, Dl_info* info) {
ScopedPthreadMutexLocker locker(&g_dl_mutex); ScopedPthreadMutexLocker locker(&g_dl_mutex);
return do_dladdr(addr, info); return do_dladdr(addr, info);
@ -148,14 +139,12 @@ bool android_init_namespaces(const char* public_ns_sonames,
} }
android_namespace_t* android_create_namespace(const char* name, const char* ld_library_path, android_namespace_t* android_create_namespace(const char* name, const char* ld_library_path,
const char* default_library_path, uint64_t type, const char* default_library_path, bool is_isolated,
const char* permitted_when_isolated_path) { const char* permitted_when_isolated_path) {
void* caller_addr = __builtin_return_address(0);
ScopedPthreadMutexLocker locker(&g_dl_mutex); ScopedPthreadMutexLocker locker(&g_dl_mutex);
android_namespace_t* result = create_namespace(caller_addr, name, ld_library_path, android_namespace_t* result = create_namespace(name, ld_library_path, default_library_path,
default_library_path, type, is_isolated, permitted_when_isolated_path);
permitted_when_isolated_path);
if (result == nullptr) { if (result == nullptr) {
__bionic_format_dlerror("android_create_namespace failed", linker_get_error_buffer()); __bionic_format_dlerror("android_create_namespace failed", linker_get_error_buffer());
@ -190,11 +179,11 @@ static const char ANDROID_LIBDL_STRTAB[] =
// 00000000001 1111111112222222222 3333333333444444444455555555556666666666777 777777788888888889999999999 // 00000000001 1111111112222222222 3333333333444444444455555555556666666666777 777777788888888889999999999
// 01234567890 1234567890123456789 0123456789012345678901234567890123456789012 345678901234567890123456789 // 01234567890 1234567890123456789 0123456789012345678901234567890123456789012 345678901234567890123456789
"erate_phdr\0android_dlopen_ext\0android_set_application_target_sdk_version\0android_get_application_tar" "erate_phdr\0android_dlopen_ext\0android_set_application_target_sdk_version\0android_get_application_tar"
// 0000000000111111 111122222222223333333333 4444444444555555555566666 6666677 // 0000000000111111 111122222222223333333333 4444444444555555555566666
// 0123456789012345 678901234567890123456789 0123456789012345678901234 5678901 // 0123456789012345 678901234567890123456789 0123456789012345678901234
"get_sdk_version\0android_init_namespaces\0android_create_namespace\0dlvsym\0" "get_sdk_version\0android_init_namespaces\0android_create_namespace\0"
#if defined(__arm__) #if defined(__arm__)
// 272 // 265
"dl_unwind_find_exidx\0" "dl_unwind_find_exidx\0"
#endif #endif
; ;
@ -218,9 +207,8 @@ static ElfW(Sym) g_libdl_symtab[] = {
ELFW(SYM_INITIALIZER)(173, &android_get_application_target_sdk_version, 1), ELFW(SYM_INITIALIZER)(173, &android_get_application_target_sdk_version, 1),
ELFW(SYM_INITIALIZER)(216, &android_init_namespaces, 1), ELFW(SYM_INITIALIZER)(216, &android_init_namespaces, 1),
ELFW(SYM_INITIALIZER)(240, &android_create_namespace, 1), ELFW(SYM_INITIALIZER)(240, &android_create_namespace, 1),
ELFW(SYM_INITIALIZER)(265, &dlvsym, 1),
#if defined(__arm__) #if defined(__arm__)
ELFW(SYM_INITIALIZER)(272, &dl_unwind_find_exidx, 1), ELFW(SYM_INITIALIZER)(265, &dl_unwind_find_exidx, 1),
#endif #endif
}; };
@ -237,9 +225,9 @@ static ElfW(Sym) g_libdl_symtab[] = {
// Note that adding any new symbols here requires stubbing them out in libdl. // Note that adding any new symbols here requires stubbing them out in libdl.
static unsigned g_libdl_buckets[1] = { 1 }; static unsigned g_libdl_buckets[1] = { 1 };
#if defined(__arm__) #if defined(__arm__)
static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0 };
#else
static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0 }; static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0 };
#else
static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0 };
#endif #endif
static uint8_t __libdl_info_buf[sizeof(soinfo)] __attribute__((aligned(8))); static uint8_t __libdl_info_buf[sizeof(soinfo)] __attribute__((aligned(8)));

View File

@ -1747,6 +1747,7 @@ static bool load_library(android_namespace_t* ns,
}); });
return true; return true;
} }
static bool load_library(android_namespace_t* ns, static bool load_library(android_namespace_t* ns,
@ -2186,7 +2187,7 @@ static std::string symbol_display_name(const char* sym_name, const char* sym_ver
return sym_name; return sym_name;
} }
return std::string(sym_name) + ", version " + sym_ver; return std::string(sym_name) + "@" + sym_ver;
} }
void do_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) { void do_android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size) {
@ -2311,8 +2312,8 @@ bool do_dlsym(void* handle, const char* sym_name, const char* sym_ver,
version_info* vi = nullptr; version_info* vi = nullptr;
if (sym_ver != nullptr) { if (sym_ver != nullptr) {
vi_instance.name = sym_ver; vi_instance.name = sym_name;
vi_instance.elf_hash = calculate_elf_hash(sym_ver); vi_instance.elf_hash = calculate_elf_hash(sym_name);
vi = &vi_instance; vi = &vi_instance;
} }
@ -2376,12 +2377,8 @@ bool init_namespaces(const char* public_ns_sonames, const char* anon_ns_library_
g_public_namespace_initialized = true; g_public_namespace_initialized = true;
// create anonymous namespace // create anonymous namespace
// When the caller is nullptr - create_namespace will take global group
// from the anonymous namespace, which is fine because anonymous namespace
// is still pointing to the default one.
android_namespace_t* anon_ns = android_namespace_t* anon_ns =
create_namespace(nullptr, "(anonymous)", nullptr, anon_ns_library_path, create_namespace("(anonymous)", nullptr, anon_ns_library_path, false, nullptr);
ANDROID_NAMESPACE_TYPE_REGULAR, nullptr);
if (anon_ns == nullptr) { if (anon_ns == nullptr) {
g_public_namespace_initialized = false; g_public_namespace_initialized = false;
@ -2392,23 +2389,16 @@ bool init_namespaces(const char* public_ns_sonames, const char* anon_ns_library_
return true; return true;
} }
android_namespace_t* create_namespace(const void* caller_addr, android_namespace_t* create_namespace(const char* name,
const char* name,
const char* ld_library_path, const char* ld_library_path,
const char* default_library_path, const char* default_library_path,
uint64_t type, bool is_isolated,
const char* permitted_when_isolated_path) { const char* permitted_when_isolated_path) {
if (!g_public_namespace_initialized) { if (!g_public_namespace_initialized) {
DL_ERR("cannot create namespace: public namespace is not initialized."); DL_ERR("cannot create namespace: public namespace is not initialized.");
return nullptr; return nullptr;
} }
soinfo* caller_soinfo = find_containing_library(caller_addr);
android_namespace_t* caller_ns = caller_soinfo != nullptr ?
caller_soinfo->get_namespace() :
g_anonymous_namespace;
ProtectedDataGuard guard; ProtectedDataGuard guard;
std::vector<std::string> ld_library_paths; std::vector<std::string> ld_library_paths;
std::vector<std::string> default_library_paths; std::vector<std::string> default_library_paths;
@ -2420,20 +2410,14 @@ android_namespace_t* create_namespace(const void* caller_addr,
android_namespace_t* ns = new (g_namespace_allocator.alloc()) android_namespace_t(); android_namespace_t* ns = new (g_namespace_allocator.alloc()) android_namespace_t();
ns->set_name(name); ns->set_name(name);
ns->set_isolated((type & ANDROID_NAMESPACE_TYPE_ISOLATED) != 0); ns->set_isolated(is_isolated);
ns->set_ld_library_paths(std::move(ld_library_paths)); ns->set_ld_library_paths(std::move(ld_library_paths));
ns->set_default_library_paths(std::move(default_library_paths)); ns->set_default_library_paths(std::move(default_library_paths));
ns->set_permitted_paths(std::move(permitted_paths)); ns->set_permitted_paths(std::move(permitted_paths));
if ((type & ANDROID_NAMESPACE_TYPE_SHARED) != 0) { // TODO(dimtiry): Should this be global group of caller's namespace?
// If shared - clone the caller namespace auto global_group = make_global_group(&g_default_namespace);
auto& soinfo_list = caller_ns->soinfo_list(); std::copy(global_group.begin(), global_group.end(), std::back_inserter(ns->soinfo_list()));
std::copy(soinfo_list.begin(), soinfo_list.end(), std::back_inserter(ns->soinfo_list()));
} else {
// If not shared - copy only the global group
auto global_group = make_global_group(caller_ns);
std::copy(global_group.begin(), global_group.end(), std::back_inserter(ns->soinfo_list()));
}
return ns; return ns;
} }
@ -3267,7 +3251,7 @@ bool soinfo::prelink_image() {
/* We can't log anything until the linker is relocated */ /* We can't log anything until the linker is relocated */
bool relocating_linker = (flags_ & FLAG_LINKER) != 0; bool relocating_linker = (flags_ & FLAG_LINKER) != 0;
if (!relocating_linker) { if (!relocating_linker) {
INFO("[ Linking '%s' ]", get_realpath()); INFO("[ linking %s ]", get_realpath());
DEBUG("si->base = %p si->flags = 0x%08x", reinterpret_cast<void*>(base), flags_); DEBUG("si->base = %p si->flags = 0x%08x", reinterpret_cast<void*>(base), flags_);
} }
@ -3954,27 +3938,17 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW(
g_ld_debug_verbosity = atoi(LD_DEBUG); g_ld_debug_verbosity = atoi(LD_DEBUG);
} }
#if defined(__LP64__)
INFO("[ Android dynamic linker (64-bit) ]");
#else
INFO("[ Android dynamic linker (32-bit) ]");
#endif
// These should have been sanitized by __libc_init_AT_SECURE, but the test // These should have been sanitized by __libc_init_AT_SECURE, but the test
// doesn't cost us anything. // doesn't cost us anything.
const char* ldpath_env = nullptr; const char* ldpath_env = nullptr;
const char* ldpreload_env = nullptr; const char* ldpreload_env = nullptr;
if (!getauxval(AT_SECURE)) { if (!getauxval(AT_SECURE)) {
ldpath_env = getenv("LD_LIBRARY_PATH"); ldpath_env = getenv("LD_LIBRARY_PATH");
if (ldpath_env != nullptr) {
INFO("[ LD_LIBRARY_PATH set to '%s' ]", ldpath_env);
}
ldpreload_env = getenv("LD_PRELOAD"); ldpreload_env = getenv("LD_PRELOAD");
if (ldpreload_env != nullptr) {
INFO("[ LD_PRELOAD set to '%s' ]", ldpreload_env);
}
} }
INFO("[ android linker & debugger ]");
soinfo* si = soinfo_alloc(&g_default_namespace, args.argv[0], nullptr, 0, RTLD_GLOBAL); soinfo* si = soinfo_alloc(&g_default_namespace, args.argv[0], nullptr, 0, RTLD_GLOBAL);
if (si == nullptr) { if (si == nullptr) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
@ -4154,7 +4128,6 @@ static ElfW(Addr) get_elf_exec_load_bias(const ElfW(Ehdr)* elf) {
return 0; return 0;
} }
extern "C" int __set_tls(void*);
extern "C" void _start(); extern "C" void _start();
/* /*
@ -4169,9 +4142,6 @@ extern "C" void _start();
extern "C" ElfW(Addr) __linker_init(void* raw_args) { extern "C" ElfW(Addr) __linker_init(void* raw_args) {
KernelArgumentBlock args(raw_args); KernelArgumentBlock args(raw_args);
void* tls[BIONIC_TLS_SLOTS];
__set_tls(tls);
ElfW(Addr) linker_addr = args.getauxval(AT_BASE); ElfW(Addr) linker_addr = args.getauxval(AT_BASE);
ElfW(Addr) entry_point = args.getauxval(AT_ENTRY); ElfW(Addr) entry_point = args.getauxval(AT_ENTRY);
ElfW(Ehdr)* elf_hdr = reinterpret_cast<ElfW(Ehdr)*>(linker_addr); ElfW(Ehdr)* elf_hdr = reinterpret_cast<ElfW(Ehdr)*>(linker_addr);
@ -4227,7 +4197,7 @@ extern "C" ElfW(Addr) __linker_init(void* raw_args) {
args.abort_message_ptr = &g_abort_message; args.abort_message_ptr = &g_abort_message;
ElfW(Addr) start_address = __linker_init_post_relocation(args, linker_addr); ElfW(Addr) start_address = __linker_init_post_relocation(args, linker_addr);
INFO("[ Jumping to _start (%p)... ]", reinterpret_cast<void*>(start_address)); INFO("[ jumping to _start ]");
// Return the address that the calling assembly stub should jump to. // Return the address that the calling assembly stub should jump to.
return start_address; return start_address;

View File

@ -444,8 +444,8 @@ void set_application_target_sdk_version(uint32_t target);
uint32_t get_application_target_sdk_version(); uint32_t get_application_target_sdk_version();
bool init_namespaces(const char* public_ns_sonames, const char* anon_ns_library_path); bool init_namespaces(const char* public_ns_sonames, const char* anon_ns_library_path);
android_namespace_t* create_namespace(const void* caller_addr, const char* name, android_namespace_t* create_namespace(const char* name, const char* ld_library_path,
const char* ld_library_path, const char* default_library_path, const char* default_library_path, bool is_isolated,
uint64_t type, const char* permitted_when_isolated_path); const char* permitted_when_isolated_path);
#endif #endif

View File

@ -55,7 +55,6 @@
*********************************************************************/ *********************************************************************/
#include "private/libc_logging.h" #include "private/libc_logging.h"
#include <unistd.h>
__LIBC_HIDDEN__ extern int g_ld_debug_verbosity; __LIBC_HIDDEN__ extern int g_ld_debug_verbosity;

View File

@ -40,7 +40,7 @@ test_cflags = \
test_cflags += -D__STDC_LIMIT_MACROS # For glibc. test_cflags += -D__STDC_LIMIT_MACROS # For glibc.
ifeq ($(MALLOC_SVELTE),true) ifeq ($(MALLOC_IMPL),dlmalloc)
test_cflags += -DUSE_DLMALLOC test_cflags += -DUSE_DLMALLOC
else else
test_cflags += -DUSE_JEMALLOC test_cflags += -DUSE_JEMALLOC
@ -51,7 +51,6 @@ test_cppflags := \
libBionicStandardTests_src_files := \ libBionicStandardTests_src_files := \
arpa_inet_test.cpp \ arpa_inet_test.cpp \
buffer_tests.cpp \ buffer_tests.cpp \
bug_26110743_test.cpp \
complex_test.cpp \ complex_test.cpp \
ctype_test.cpp \ ctype_test.cpp \
dirent_test.cpp \ dirent_test.cpp \
@ -62,7 +61,6 @@ libBionicStandardTests_src_files := \
ftw_test.cpp \ ftw_test.cpp \
getauxval_test.cpp \ getauxval_test.cpp \
getcwd_test.cpp \ getcwd_test.cpp \
ifaddrs_test.cpp \
inttypes_test.cpp \ inttypes_test.cpp \
libc_logging_test.cpp \ libc_logging_test.cpp \
libgen_basename_test.cpp \ libgen_basename_test.cpp \
@ -122,7 +120,7 @@ libBionicStandardTests_src_files := \
libBionicStandardTests_cflags := \ libBionicStandardTests_cflags := \
$(test_cflags) \ $(test_cflags) \
ifeq ($(MALLOC_SVELTE),true) ifeq ($(MALLOC_IMPL),dlmalloc)
libBionicStandardTests_cflags += -DUSE_DLMALLOC libBionicStandardTests_cflags += -DUSE_DLMALLOC
else else
libBionicStandardTests_cflags += -DUSE_JEMALLOC libBionicStandardTests_cflags += -DUSE_JEMALLOC

View File

@ -1,113 +0,0 @@
/*
* 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.
*/
#include <gtest/gtest.h>
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/prctl.h>
#include "private/ScopeGuard.h"
extern "C" pid_t gettid();
static void ProcSelfReadlinkBody() {
char buf[100];
char buf2[1024];
int fd = open("/dev/null", O_RDWR | O_CLOEXEC);
ASSERT_NE(-1, fd);
snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
const char* ERRORMSG = "Please apply the following two kernel patches:\n"
"* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=73af963f9f3036dffed55c3a2898598186db1045\n"
"* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=96d0df79f2644fc823f26c06491e182d87a90c2a\n";
ASSERT_NE(-1, readlink(buf, buf2, sizeof(buf2))) << ERRORMSG;
ASSERT_STREQ("/dev/null", buf2);
close(fd);
}
static void* ProcSelfReadlink(void*) {
ProcSelfReadlinkBody();
return NULL;
}
TEST(bug_26110743, ProcSelfReadlink) {
pthread_t t;
ASSERT_EQ(0, pthread_create(&t, NULL, ProcSelfReadlink, NULL));
void* result;
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}
TEST(bug_26110743, ProcSelfReadlink_NotDumpable) {
int dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
prctl(PR_SET_DUMPABLE, 0, 0, 0, 0);
auto guard = make_scope_guard([&]() {
// restore dumpable
prctl(PR_SET_DUMPABLE, dumpable, 0, 0, 0);
});
pthread_t t;
ASSERT_EQ(0, pthread_create(&t, NULL, ProcSelfReadlink, NULL));
void* result;
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}
static void ProcTaskFdReadlinkBody() {
char buf[200];
char buf2[1024];
int fd = open("/dev/null", O_RDWR | O_CLOEXEC);
ASSERT_NE(-1, fd);
pid_t mypid = getpid();
pid_t mytid = gettid();
ASSERT_NE(mypid, mytid);
snprintf(buf, sizeof(buf), "/proc/%d/task/%d/fd/%d", mypid, mytid, fd);
const char* ERRORMSG = "Please apply the following kernel patch:\n"
"* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=54708d2858e79a2bdda10bf8a20c80eb96c20613\n";
ASSERT_NE(-1, readlink(buf, buf2, sizeof(buf2))) << ERRORMSG;
ASSERT_STREQ("/dev/null", buf2);
close(fd);
}
static void* ProcTaskFdReadlink(void*) {
ProcTaskFdReadlinkBody();
return NULL;
}
TEST(bug_26110743, ProcTaskFdReadlink) {
pthread_t t;
ASSERT_EQ(0, pthread_create(&t, NULL, ProcTaskFdReadlink, NULL));
void* result;
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}
TEST(bug_26110743, ProcTaskFdReadlink_NotDumpable) {
int dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
prctl(PR_SET_DUMPABLE, 0, 0, 0, 0);
auto guard = make_scope_guard([&]() {
// restore dumpable
prctl(PR_SET_DUMPABLE, dumpable, 0, 0, 0);
});
pthread_t t;
ASSERT_EQ(0, pthread_create(&t, NULL, ProcTaskFdReadlink, NULL));
void* result;
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}

View File

@ -625,21 +625,13 @@ TEST(dlext, ns_smoke) {
// Check that libraries added to public namespace are NODELETE // Check that libraries added to public namespace are NODELETE
dlclose(handle_public); dlclose(handle_public);
handle_public = dlopen((lib_path + "/public_namespace_libs/" + g_public_lib).c_str(), handle_public = dlopen((lib_path + "/public_namespace_libs/" + g_public_lib).c_str(), RTLD_NOW | RTLD_NOLOAD);
RTLD_NOW | RTLD_NOLOAD);
ASSERT_TRUE(handle_public != nullptr) << dlerror(); ASSERT_TRUE(handle_public != nullptr) << dlerror();
android_namespace_t* ns1 = android_namespace_t* ns1 = android_create_namespace("private", nullptr, (lib_path + "/private_namespace_libs").c_str(), false, nullptr);
android_create_namespace("private", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_REGULAR, nullptr);
ASSERT_TRUE(ns1 != nullptr) << dlerror(); ASSERT_TRUE(ns1 != nullptr) << dlerror();
android_namespace_t* ns2 = android_namespace_t* ns2 = android_create_namespace("private_isolated", nullptr, (lib_path + "/private_namespace_libs").c_str(), true, nullptr);
android_create_namespace("private_isolated", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_ISOLATED, nullptr);
ASSERT_TRUE(ns2 != nullptr) << dlerror(); ASSERT_TRUE(ns2 != nullptr) << dlerror();
// This should not have affect search path for default namespace: // This should not have affect search path for default namespace:
@ -740,22 +732,13 @@ TEST(dlext, ns_isolated) {
ASSERT_TRUE(android_init_namespaces(path.c_str(), nullptr)) << dlerror(); ASSERT_TRUE(android_init_namespaces(path.c_str(), nullptr)) << dlerror();
android_namespace_t* ns_not_isolated = android_namespace_t* ns_not_isolated = android_create_namespace("private", nullptr, (lib_path + "/private_namespace_libs").c_str(), false, nullptr);
android_create_namespace("private", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_REGULAR, nullptr);
ASSERT_TRUE(ns_not_isolated != nullptr) << dlerror(); ASSERT_TRUE(ns_not_isolated != nullptr) << dlerror();
android_namespace_t* ns_isolated = android_namespace_t* ns_isolated = android_create_namespace("private_isolated1", nullptr, (lib_path + "/private_namespace_libs").c_str(), true, nullptr);
android_create_namespace("private_isolated1", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_ISOLATED, nullptr);
ASSERT_TRUE(ns_isolated != nullptr) << dlerror(); ASSERT_TRUE(ns_isolated != nullptr) << dlerror();
android_namespace_t* ns_isolated2 = android_namespace_t* ns_isolated2 = android_create_namespace("private_isolated2", (lib_path + "/private_namespace_libs").c_str(), nullptr, true, lib_path.c_str());
android_create_namespace("private_isolated2",
(lib_path + "/private_namespace_libs").c_str(),
nullptr, ANDROID_NAMESPACE_TYPE_ISOLATED, lib_path.c_str());
ASSERT_TRUE(ns_isolated2 != nullptr) << dlerror(); ASSERT_TRUE(ns_isolated2 != nullptr) << dlerror();
ASSERT_TRUE(dlopen(root_lib, RTLD_NOW) == nullptr); ASSERT_TRUE(dlopen(root_lib, RTLD_NOW) == nullptr);
@ -825,122 +808,6 @@ TEST(dlext, ns_isolated) {
dlclose(handle1); dlclose(handle1);
} }
TEST(dlext, ns_shared) {
static const char* root_lib = "libnstest_root_not_isolated.so";
static const char* root_lib_isolated = "libnstest_root.so";
std::string path = std::string("libc.so:libc++.so:libdl.so:libm.so:") + g_public_lib;
const std::string lib_path = std::string(getenv("ANDROID_DATA")) + NATIVE_TESTS_PATH;
const std::string lib_public_path = lib_path + "/public_namespace_libs/" + g_public_lib;
void* handle_public = dlopen(lib_public_path.c_str(), RTLD_NOW);
ASSERT_TRUE(handle_public != nullptr) << dlerror();
android_set_application_target_sdk_version(42U); // something > 23
ASSERT_TRUE(android_init_namespaces(path.c_str(), nullptr)) << dlerror();
// preload this library to the default namespace to check if it
// is shared later on.
void* handle_dlopened =
dlopen((lib_path + "/private_namespace_libs/libnstest_dlopened.so").c_str(), RTLD_NOW);
ASSERT_TRUE(handle_dlopened != nullptr) << dlerror();
android_namespace_t* ns_not_isolated =
android_create_namespace("private", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_REGULAR, nullptr);
ASSERT_TRUE(ns_not_isolated != nullptr) << dlerror();
android_namespace_t* ns_isolated_shared =
android_create_namespace("private_isolated_shared", nullptr,
(lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_ISOLATED | ANDROID_NAMESPACE_TYPE_SHARED,
nullptr);
ASSERT_TRUE(ns_isolated_shared != nullptr) << dlerror();
ASSERT_TRUE(dlopen(root_lib, RTLD_NOW) == nullptr);
ASSERT_STREQ("dlopen failed: library \"libnstest_root_not_isolated.so\" not found", dlerror());
std::string lib_private_external_path =
lib_path + "/private_namespace_libs_external/libnstest_private_external.so";
// Load lib_private_external_path to default namespace
// (it should remain invisible for the isolated namespaces after this)
void* handle = dlopen(lib_private_external_path.c_str(), RTLD_NOW);
ASSERT_TRUE(handle != nullptr) << dlerror();
android_dlextinfo extinfo;
extinfo.flags = ANDROID_DLEXT_USE_NAMESPACE;
extinfo.library_namespace = ns_not_isolated;
void* handle1 = android_dlopen_ext(root_lib, RTLD_NOW, &extinfo);
ASSERT_TRUE(handle1 != nullptr) << dlerror();
extinfo.library_namespace = ns_isolated_shared;
void* handle2 = android_dlopen_ext(root_lib, RTLD_NOW, &extinfo);
ASSERT_TRUE(handle2 == nullptr);
ASSERT_STREQ("dlopen failed: library \"libnstest_private_external.so\" not found", dlerror());
// Check dlopen by absolute path
handle2 = android_dlopen_ext(lib_private_external_path.c_str(), RTLD_NOW, &extinfo);
ASSERT_TRUE(handle2 == nullptr);
ASSERT_EQ("dlopen failed: library \"" + lib_private_external_path + "\" is not accessible for the namespace \"private_isolated_shared\"", dlerror());
// load libnstest_root.so to shared namespace in order to check that everything is different
// except shared libnstest_dlopened.so
handle2 = android_dlopen_ext(root_lib_isolated, RTLD_NOW, &extinfo);
typedef const char* (*fn_t)();
fn_t ns_get_local_string = reinterpret_cast<fn_t>(dlsym(handle1, "ns_get_local_string"));
ASSERT_TRUE(ns_get_local_string != nullptr) << dlerror();
fn_t ns_get_local_string_shared = reinterpret_cast<fn_t>(dlsym(handle2, "ns_get_local_string"));
ASSERT_TRUE(ns_get_local_string_shared != nullptr) << dlerror();
ASSERT_STREQ("This string is local to root library", ns_get_local_string());
ASSERT_STREQ("This string is local to root library", ns_get_local_string_shared());
ASSERT_TRUE(ns_get_local_string() != ns_get_local_string_shared());
fn_t ns_get_private_extern_string =
reinterpret_cast<fn_t>(dlsym(handle1, "ns_get_private_extern_string"));
ASSERT_TRUE(ns_get_private_extern_string != nullptr) << dlerror();
fn_t ns_get_private_extern_string_shared =
reinterpret_cast<fn_t>(dlsym(handle2, "ns_get_private_extern_string"));
ASSERT_TRUE(ns_get_private_extern_string_shared() != nullptr) << dlerror();
ASSERT_STREQ("This string is from private namespace", ns_get_private_extern_string());
ASSERT_STREQ("This string is from private namespace", ns_get_private_extern_string_shared());
ASSERT_TRUE(ns_get_private_extern_string() != ns_get_private_extern_string_shared());
fn_t ns_get_public_extern_string =
reinterpret_cast<fn_t>(dlsym(handle1, "ns_get_public_extern_string"));
ASSERT_TRUE(ns_get_public_extern_string != nullptr) << dlerror();
fn_t ns_get_public_extern_string_shared =
reinterpret_cast<fn_t>(dlsym(handle2, "ns_get_public_extern_string"));
ASSERT_TRUE(ns_get_public_extern_string_shared != nullptr) << dlerror();
ASSERT_STREQ("This string is from public namespace", ns_get_public_extern_string());
ASSERT_STREQ("This string is from public namespace", ns_get_public_extern_string_shared());
ASSERT_TRUE(ns_get_public_extern_string() == ns_get_public_extern_string_shared());
fn_t ns_get_dlopened_string = reinterpret_cast<fn_t>(dlsym(handle1, "ns_get_dlopened_string"));
ASSERT_TRUE(ns_get_dlopened_string != nullptr) << dlerror();
fn_t ns_get_dlopened_string_shared = reinterpret_cast<fn_t>(dlsym(handle2, "ns_get_dlopened_string"));
ASSERT_TRUE(ns_get_dlopened_string_shared != nullptr) << dlerror();
const char** ns_dlopened_string = static_cast<const char**>(dlsym(handle_dlopened, "g_private_dlopened_string"));
ASSERT_TRUE(ns_dlopened_string != nullptr) << dlerror();
ASSERT_STREQ("This string is from private namespace (dlopened library)", ns_get_dlopened_string());
ASSERT_STREQ("This string is from private namespace (dlopened library)", *ns_dlopened_string);
ASSERT_STREQ("This string is from private namespace (dlopened library)", ns_get_dlopened_string_shared());
ASSERT_TRUE(ns_get_dlopened_string() != ns_get_dlopened_string_shared());
ASSERT_TRUE(*ns_dlopened_string == ns_get_dlopened_string_shared());
dlclose(handle1);
dlclose(handle2);
}
TEST(dlext, ns_anonymous) { TEST(dlext, ns_anonymous) {
static const char* root_lib = "libnstest_root.so"; static const char* root_lib = "libnstest_root.so";
std::string path = std::string("libc.so:libc++.so:libdl.so:libm.so:") + g_public_lib; std::string path = std::string("libc.so:libc++.so:libdl.so:libm.so:") + g_public_lib;
@ -958,7 +825,7 @@ TEST(dlext, ns_anonymous) {
android_namespace_t* ns = android_create_namespace( android_namespace_t* ns = android_create_namespace(
"private", nullptr, "private", nullptr,
(lib_path + "/private_namespace_libs").c_str(), (lib_path + "/private_namespace_libs").c_str(),
ANDROID_NAMESPACE_TYPE_REGULAR, nullptr); false, nullptr);
ASSERT_TRUE(ns != nullptr) << dlerror(); ASSERT_TRUE(ns != nullptr) << dlerror();

View File

@ -624,10 +624,8 @@ TEST(dlfcn, dlopen_check_loop) {
handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW | RTLD_NOLOAD); handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW | RTLD_NOLOAD);
ASSERT_TRUE(handle == nullptr); ASSERT_TRUE(handle == nullptr);
#ifdef __BIONIC__ #ifdef __BIONIC__
ASSERT_STREQ("dlopen failed: library \"libtest_with_dependency_loop.so\" wasn't loaded and RTLD_NOLOAD prevented it", dlerror());
#else
// TODO: glibc returns nullptr on dlerror() here. Is it bug? // TODO: glibc returns nullptr on dlerror() here. Is it bug?
ASSERT_TRUE(dlerror() == nullptr); ASSERT_STREQ("dlopen failed: library \"libtest_with_dependency_loop.so\" wasn't loaded and RTLD_NOLOAD prevented it", dlerror());
#endif #endif
handle = dlopen("libtest_with_dependency_a.so", RTLD_NOW | RTLD_NOLOAD); handle = dlopen("libtest_with_dependency_a.so", RTLD_NOW | RTLD_NOLOAD);
@ -765,6 +763,14 @@ TEST(dlfcn, dlsym_failures) {
ASSERT_STREQ("dlsym failed: library handle is null", dlerror()); ASSERT_STREQ("dlsym failed: library handle is null", dlerror());
#endif #endif
// NULL symbol name.
#if defined(__BIONIC__)
// glibc marks this parameter non-null and SEGVs if you cheat.
sym = dlsym(self, nullptr);
ASSERT_TRUE(sym == nullptr);
ASSERT_STREQ("dlsym failed: symbol name is null", dlerror());
#endif
// Symbol that doesn't exist. // Symbol that doesn't exist.
sym = dlsym(self, "ThisSymbolDoesNotExist"); sym = dlsym(self, "ThisSymbolDoesNotExist");
ASSERT_TRUE(sym == nullptr); ASSERT_TRUE(sym == nullptr);
@ -1048,26 +1054,6 @@ TEST(dlfcn, symbol_versioning_default_via_dlsym) {
dlclose(handle); dlclose(handle);
} }
TEST(dlfcn, dlvsym_smoke) {
void* handle = dlopen("libtest_versioned_lib.so", RTLD_NOW);
ASSERT_TRUE(handle != nullptr) << dlerror();
typedef int (*fn_t)();
{
fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion"));
ASSERT_TRUE(fn == nullptr);
ASSERT_SUBSTR("undefined symbol: versioned_function, version nonversion", dlerror());
}
{
fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2"));
ASSERT_TRUE(fn != nullptr) << dlerror();
ASSERT_EQ(2, fn());
}
dlclose(handle);
}
// This preempts the implementation from libtest_versioned_lib.so // This preempts the implementation from libtest_versioned_lib.so
extern "C" int version_zero_function() { extern "C" int version_zero_function() {
return 0; return 0;

View File

@ -1,38 +0,0 @@
/*
* 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.
*/
#include <gtest/gtest.h>
#include <ifaddrs.h>
TEST(ifaddrs, freeifaddrs_null) {
freeifaddrs(nullptr);
}
TEST(ifaddrs, getifaddrs_smoke) {
ifaddrs* addrs = nullptr;
ASSERT_EQ(0, getifaddrs(&addrs));
ASSERT_TRUE(addrs != nullptr);
bool saw_loopback = false;
for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) {
if (addr->ifa_name && strcmp(addr->ifa_name, "lo") == 0) saw_loopback = true;
}
ASSERT_TRUE(saw_loopback);
freeifaddrs(addrs);
}

View File

@ -372,22 +372,3 @@ TEST(malloc, malloc_info) {
} }
#endif #endif
} }
TEST(malloc, calloc_usable_size) {
for (size_t size = 1; size <= 2048; size++) {
void* pointer = malloc(size);
ASSERT_TRUE(pointer != nullptr);
memset(pointer, 0xeb, malloc_usable_size(pointer));
free(pointer);
// We should get a previous pointer that has been set to non-zero.
// If calloc does not zero out all of the data, this will fail.
uint8_t* zero_mem = reinterpret_cast<uint8_t*>(calloc(1, size));
ASSERT_TRUE(pointer != nullptr);
size_t usable_size = malloc_usable_size(zero_mem);
for (size_t i = 0; i < usable_size; i++) {
ASSERT_EQ(0, zero_mem[i]) << "Failed at allocation size " << size << " at byte " << i;
}
free(zero_mem);
}
}

View File

@ -1536,9 +1536,6 @@ TEST(pthread, pthread_mutex_lock_NORMAL) {
ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); ASSERT_EQ(0, pthread_mutex_lock(&m.lock));
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
ASSERT_EQ(0, pthread_mutex_trylock(&m.lock));
ASSERT_EQ(EBUSY, pthread_mutex_trylock(&m.lock));
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
} }
TEST(pthread, pthread_mutex_lock_ERRORCHECK) { TEST(pthread, pthread_mutex_lock_ERRORCHECK) {
@ -1561,8 +1558,6 @@ TEST(pthread, pthread_mutex_lock_RECURSIVE) {
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
ASSERT_EQ(0, pthread_mutex_trylock(&m.lock)); ASSERT_EQ(0, pthread_mutex_trylock(&m.lock));
ASSERT_EQ(0, pthread_mutex_trylock(&m.lock));
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); ASSERT_EQ(0, pthread_mutex_unlock(&m.lock));
ASSERT_EQ(EPERM, pthread_mutex_unlock(&m.lock)); ASSERT_EQ(EPERM, pthread_mutex_unlock(&m.lock));
} }

View File

@ -131,13 +131,6 @@ TEST(semaphore, sem_timedwait) {
ASSERT_EQ(0, sem_destroy(&s)); ASSERT_EQ(0, sem_destroy(&s));
} }
TEST(semaphore_DeathTest, sem_timedwait_null_timeout) {
sem_t s;
ASSERT_EQ(0, sem_init(&s, 0, 0));
ASSERT_EXIT(sem_timedwait(&s, nullptr), testing::KilledBySignal(SIGSEGV), "");
}
TEST(semaphore, sem_getvalue) { TEST(semaphore, sem_getvalue) {
sem_t s; sem_t s;
ASSERT_EQ(0, sem_init(&s, 0, 0)); ASSERT_EQ(0, sem_init(&s, 0, 0));