Compare commits

..

3 Commits

Author SHA1 Message Date
Elliott Hughes
2c222c4906 Merge "Update to tzdata2011n." into gingerbread 2011-11-16 10:47:37 -08:00
Elliott Hughes
f0e5b680ba Update to tzdata2011n.
This is a bumper update from tzdata2010k, affecting many time zones, including:

2011c: Chile and Annette Island, Alaska.
2011d: Cuba, Samoa, and Turkey.
2011e: Chile and Morocco.
2011g: Egypt.
2011h: Russia and Curacao.
2011i: South Sudan (Africa/Juba), Samoa, Europe/Kalingrad, Newfoundland,
    America/Resolute, Metlakatla, America/Honolulu, America/Goose_Bay and
    America/St_Johns.
2011j: Samoa, Kenya, Uganda, and Tanzania.
2011k: Palestine, Gaza, Hebron, Belarus, Ukraine, and Russia.
2011l: Asia/Hebron and Pacific/Fiji (and historical data for
    America/Sitka).
2011m: Europe/Tiraspol (Moldova) and all four Ukrainian zones.
2011n: Cuba (America/Havana), Europe/Tiraspol (Moldova), Fiji.

(This list is not comprehensive.)

Bug: 5530615
Change-Id: I599250a1c19c2897425e4a5418b925b2f8f88e14
2011-11-15 18:29:40 -08:00
Elliott Hughes
30983c9ab9 Backport ICS' tzdata update script to Gingerbread.
Bug: 5530615
Change-Id: I1aff3e33bc5f746f0defe1aca4453379455c8c1b
2011-11-15 18:24:08 -08:00
2185 changed files with 43881 additions and 98653 deletions

View File

@@ -16,4 +16,9 @@
LOCAL_PATH := $(call my-dir)
include $(call all-subdir-makefiles)
ifneq ($(TARGET_SIMULATOR),true)
include $(call all-subdir-makefiles)
else
# The host dalvikvm needs Android's concatenated & indexed timezone data.
include $(LOCAL_PATH)/libc/zoneinfo/Android.mk
endif

6
MAINTAINERS Normal file
View File

@@ -0,0 +1,6 @@
Bionic support for SuperH
-------------------------
Bionic support for SuperH architecture is written by
Shin-ichiro KAWASAKI <shinichiro.kawasaki.mg@hitachi.com>
and Contributed to Android by Hitachi, Ltd. and Renesas Solutions Corp.

10
ThirdPartyProject.prop Normal file
View File

@@ -0,0 +1,10 @@
# Copyright 2010 Google Inc. All Rights Reserved.
#Fri Jul 16 10:03:08 PDT 2010
currentVersion=Unknown
version=Unknown
isNative=true
feedurl=http\://www.openbsd.org/security.html
name=openbsd
keywords=openbsd
onDevice=true
homepage=http\://openbsd.org

View File

@@ -9,6 +9,7 @@ libc_common_src_files := \
unistd/abort.c \
unistd/alarm.c \
unistd/brk.c \
unistd/creat.c \
unistd/daemon.c \
unistd/eventfd.c \
unistd/exec.c \
@@ -17,6 +18,7 @@ libc_common_src_files := \
unistd/fstatfs.c \
unistd/ftime.c \
unistd/ftok.c \
unistd/getcwd.c \
unistd/getdtablesize.c \
unistd/gethostname.c \
unistd/getopt_long.c \
@@ -29,6 +31,7 @@ libc_common_src_files := \
unistd/killpg.c \
unistd/lseek64.c \
unistd/mmap.c \
unistd/nice.c \
unistd/open.c \
unistd/openat.c \
unistd/opendir.c \
@@ -61,6 +64,7 @@ libc_common_src_files := \
unistd/sigwait.c \
unistd/sleep.c \
unistd/statfs.c \
unistd/strsignal.c \
unistd/syslog.c \
unistd/system.c \
unistd/tcgetpgrp.c \
@@ -136,11 +140,6 @@ libc_common_src_files := \
stdio/vsscanf.c \
stdio/wbuf.c \
stdio/wsetup.c \
stdio/__fgets_chk.c \
stdio/__snprintf_chk.c \
stdio/__sprintf_chk.c \
stdio/__vsnprintf_chk.c \
stdio/__vsprintf_chk.c \
stdlib/_rand48.c \
stdlib/assert.c \
stdlib/atexit.c \
@@ -188,8 +187,11 @@ libc_common_src_files := \
string/strcat.c \
string/strchr.c \
string/strcoll.c \
string/strcpy.c \
string/strcspn.c \
string/strdup.c \
string/strerror.c \
string/strerror_r.c \
string/strlcat.c \
string/strlcpy.c \
string/strncat.c \
@@ -203,16 +205,7 @@ libc_common_src_files := \
string/strstr.c \
string/strtok.c \
string/strtotimeval.c \
string/__memcpy_chk.c \
string/__memmove_chk.c \
string/__memset_chk.c \
string/__strcat_chk.c \
string/__strcpy_chk.c \
string/__strlcat_chk.c \
string/__strlcpy_chk.c \
string/__strlen_chk.c \
string/__strncat_chk.c \
string/__strncpy_chk.c \
string/strxfrm.c \
wchar/wcpcpy.c \
wchar/wcpncpy.c \
wchar/wcscasecmp.c \
@@ -237,7 +230,6 @@ libc_common_src_files := \
wchar/wcsstr.c \
wchar/wcstok.c \
wchar/wcswidth.c \
wchar/wcsxfrm.c \
wchar/wmemchr.c \
wchar/wmemcmp.c \
wchar/wmemcpy.c \
@@ -249,15 +241,13 @@ libc_common_src_files := \
inet/inet_ntoa.c \
inet/inet_ntop.c \
inet/inet_pton.c \
inet/ether_aton.c \
inet/ether_ntoa.c \
tzcode/asctime.c \
tzcode/difftime.c \
tzcode/localtime.c \
tzcode/strftime.c \
tzcode/strptime.c \
bionic/__set_errno.c \
bionic/bionic_clone.c \
bionic/_rand48.c \
bionic/cpuacct.c \
bionic/arc4random.c \
bionic/basename.c \
@@ -271,7 +261,6 @@ libc_common_src_files := \
bionic/fdprintf.c \
bionic/fork.c \
bionic/fts.c \
bionic/getcwd.cpp \
bionic/if_nametoindex.c \
bionic/if_indextoname.c \
bionic/ioctl.c \
@@ -279,21 +268,13 @@ libc_common_src_files := \
bionic/libc_init_common.c \
bionic/logd_write.c \
bionic/md5.c \
bionic/memmove_words.c \
bionic/pututline.c \
bionic/realpath.c \
bionic/sched_getaffinity.c \
bionic/sched_getcpu.c \
bionic/sched_cpualloc.c \
bionic/sched_cpucount.c \
bionic/semaphore.c \
bionic/sha1.c \
bionic/strerror.cpp \
bionic/strerror_r.cpp \
bionic/strsignal.cpp \
bionic/stubs.cpp \
bionic/ssp.c \
bionic/stubs.c \
bionic/system_properties.c \
bionic/tdestroy.c \
bionic/time64.c \
bionic/thread_atexit.c \
bionic/utime.c \
@@ -328,21 +309,10 @@ libc_common_src_files := \
netbsd/nameser/ns_netint.c \
netbsd/nameser/ns_print.c \
netbsd/nameser/ns_samedomain.c \
libc_upstream_netbsd_src_files := \
upstream-netbsd/libc/compat-43/creat.c \
upstream-netbsd/libc/gen/ftw.c \
upstream-netbsd/libc/gen/nftw.c \
upstream-netbsd/libc/gen/nice.c \
upstream-netbsd/libc/gen/psignal.c \
upstream-netbsd/libc/regex/regcomp.c \
upstream-netbsd/libc/regex/regerror.c \
upstream-netbsd/libc/regex/regexec.c \
upstream-netbsd/libc/regex/regfree.c \
upstream-netbsd/libc/stdlib/tdelete.c \
upstream-netbsd/libc/stdlib/tfind.c \
upstream-netbsd/libc/stdlib/tsearch.c \
upstream-netbsd/libc/string/strxfrm.c \
regex/regcomp.c \
regex/regerror.c \
regex/regexec.c \
regex/regfree.c \
# The following files are common, but must be compiled
# with different C flags when building a static C library.
@@ -365,19 +335,18 @@ libc_static_common_src_files := \
# =========================================================
ifeq ($(TARGET_ARCH),arm)
libc_common_src_files += \
bionic/bionic_clone.c \
arch-arm/bionic/__get_pc.S \
arch-arm/bionic/__get_sp.S \
arch-arm/bionic/_exit_with_stack_teardown.S \
arch-arm/bionic/_setjmp.S \
arch-arm/bionic/abort_arm.S \
arch-arm/bionic/atomics_arm.c \
arch-arm/bionic/atomics_arm.S \
arch-arm/bionic/clone.S \
arch-arm/bionic/eabi.c \
arch-arm/bionic/ffs.S \
arch-arm/bionic/futex_arm.S \
arch-arm/bionic/kill.S \
arch-arm/bionic/libgcc_compat.c \
arch-arm/bionic/tkill.S \
arch-arm/bionic/tgkill.S \
arch-arm/bionic/memcmp.S \
arch-arm/bionic/memcmp16.S \
arch-arm/bionic/memcpy.S \
@@ -385,11 +354,10 @@ libc_common_src_files += \
arch-arm/bionic/setjmp.S \
arch-arm/bionic/sigsetjmp.S \
arch-arm/bionic/strlen.c.arm \
arch-arm/bionic/strcpy.S \
arch-arm/bionic/strcmp.S \
arch-arm/bionic/syscall.S \
string/memmove.c.arm \
string/bcopy.c \
string/strcmp.c \
string/strncmp.c \
unistd/socketcalls.c
@@ -397,7 +365,6 @@ libc_common_src_files += \
# can set breakpoints in them without messing
# up any thumb code.
libc_common_src_files += \
bionic/pthread-atfork.c.arm \
bionic/pthread-rwlocks.c.arm \
bionic/pthread-timers.c.arm \
bionic/ptrace.c.arm
@@ -412,19 +379,18 @@ libc_arch_static_src_files := \
libc_arch_dynamic_src_files := \
arch-arm/bionic/exidx_dynamic.c
endif # arm
else # !arm
ifeq ($(TARGET_ARCH),x86)
libc_common_src_files += \
arch-x86/bionic/__get_sp.S \
arch-x86/bionic/__get_tls.c \
arch-x86/bionic/__set_tls.c \
arch-x86/bionic/atomics_x86.S \
arch-x86/bionic/clone.S \
arch-x86/bionic/_exit_with_stack_teardown.S \
arch-x86/bionic/futex_x86.S \
arch-x86/bionic/setjmp.S \
arch-x86/bionic/_setjmp.S \
arch-x86/bionic/sigsetjmp.S \
arch-x86/bionic/vfork.S \
arch-x86/bionic/syscall.S \
arch-x86/string/bcopy_wrapper.S \
@@ -436,8 +402,6 @@ libc_common_src_files += \
arch-x86/string/strcmp_wrapper.S \
arch-x86/string/strncmp_wrapper.S \
arch-x86/string/strlen_wrapper.S \
string/strcpy.c \
bionic/pthread-atfork.c \
bionic/pthread-rwlocks.c \
bionic/pthread-timers.c \
bionic/ptrace.c
@@ -445,71 +409,65 @@ libc_common_src_files += \
libc_static_common_src_files += \
bionic/pthread.c \
# this is needed for static versions of libc
libc_arch_static_src_files := \
bionic/dl_iterate_phdr_static.c
arch-x86/bionic/dl_iterate_phdr_static.c
libc_arch_dynamic_src_files :=
endif # x86
ifeq ($(TARGET_ARCH),mips)
libc_common_src_files += \
arch-mips/bionic/__get_sp.S \
arch-mips/bionic/__get_tls.c \
arch-mips/bionic/__set_tls.c \
arch-mips/bionic/_exit_with_stack_teardown.S \
arch-mips/bionic/_setjmp.S \
arch-mips/bionic/futex_mips.S \
arch-mips/bionic/bzero.S \
arch-mips/bionic/cacheflush.c \
arch-mips/bionic/clone.S \
arch-mips/bionic/ffs.S \
arch-mips/bionic/memcmp16.S \
arch-mips/bionic/memmove.c \
arch-mips/bionic/pipe.S \
arch-mips/bionic/setjmp.S \
arch-mips/bionic/sigsetjmp.S \
arch-mips/bionic/vfork.S
libc_common_src_files += \
arch-mips/string/memset.S \
arch-mips/string/memcpy.S \
arch-mips/string/mips_strlen.c
else # !x86
ifeq ($(TARGET_ARCH),sh)
libc_common_src_files += \
arch-sh/bionic/__get_pc.S \
arch-sh/bionic/__get_sp.S \
arch-sh/bionic/_exit_with_stack_teardown.S \
arch-sh/bionic/_setjmp.S \
arch-sh/bionic/atomics_sh.c \
arch-sh/bionic/atomic_cmpxchg.S \
arch-sh/bionic/clone.S \
arch-sh/bionic/pipe.S \
arch-sh/bionic/memcpy.S \
arch-sh/bionic/memset.S \
arch-sh/bionic/bzero.S \
arch-sh/bionic/setjmp.S \
arch-sh/bionic/sigsetjmp.S \
arch-sh/bionic/syscall.S \
arch-sh/bionic/memmove.S \
arch-sh/bionic/__set_tls.c \
arch-sh/bionic/__get_tls.c \
arch-sh/bionic/ffs.S \
string/bcopy.c \
string/memcmp.c \
string/strcmp.c \
string/strcpy.c \
string/strncmp.c
libc_common_src_files += \
bionic/pthread-atfork.c \
string/strncmp.c \
string/memcmp.c \
string/strlen.c \
bionic/pthread-rwlocks.c \
bionic/pthread-timers.c \
bionic/ptrace.c
bionic/ptrace.c \
unistd/socketcalls.c
libc_static_common_src_files += \
bionic/pthread.c
bionic/pthread.c \
libc_arch_static_src_files := \
bionic/dl_iterate_phdr_static.c
endif # sh
libc_arch_dynamic_src_files :=
endif # mips
endif # !x86
endif # !arm
# Define some common cflags
# ========================================================
libc_common_cflags := \
-DWITH_ERRLIST \
-DANDROID_CHANGES \
-D_LIBC=1 \
-DFLOATING_POINT \
-DINET6 \
-I$(LOCAL_PATH)/private \
-DPOSIX_MISTAKE \
-DLOG_ON_HEAP_ERROR \
-std=gnu99 \
-Wall -Wextra
-DWITH_ERRLIST \
-DANDROID_CHANGES \
-DUSE_LOCKS \
-DREALLOC_ZERO_BYTES_FREES \
-D_LIBC=1 \
-DSOFTFLOAT \
-DFLOATING_POINT \
-DINET6 \
-I$(LOCAL_PATH)/private \
-DUSE_DL_PREFIX \
-DPOSIX_MISTAKE
# these macro definitions are required to implement the
# 'timezone' and 'daylight' global variables, as well as
@@ -523,15 +481,7 @@ ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
libc_common_cflags += -DDEBUG
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
ifeq ($(TARGET_ARCH),arm)
libc_common_cflags += -DSOFTFLOAT
libc_common_cflags += -fstrict-aliasing
libc_crt_target_cflags := -mthumb-interwork
#
@@ -544,38 +494,16 @@ ifeq ($(TARGET_ARCH),arm)
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
endif
#
# Define HAVE_32_BYTE_CACHE_LINES to indicate to C
# library it should use to 32-byte version of memcpy, and not
# the 64-byte version.
#
ifeq ($(ARCH_ARM_HAVE_32_BYTE_CACHE_LINES),true)
libc_common_cflags += -DHAVE_32_BYTE_CACHE_LINE
endif
ifeq ($(ARCH_ARM_USE_NON_NEON_MEMCPY),true)
libc_common_cflags += -DARCH_ARM_USE_NON_NEON_MEMCPY
endif
else # !arm
ifeq ($(TARGET_ARCH),x86)
libc_crt_target_cflags := -m32
# Enable recent IA friendly memory routines (such as for Atom)
# These will not work on the earlier x86 machines
libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
endif # x86
endif # !arm
ifeq ($(TARGET_ARCH),x86)
libc_common_cflags += -DSOFTFLOAT
libc_crt_target_cflags :=
ifeq ($(ARCH_X86_HAVE_SSE2),true)
libc_crt_target_cflags += -DUSE_SSE2=1
endif
ifeq ($(ARCH_X86_HAVE_SSSE3),true)
libc_crt_target_cflags += -DUSE_SSSE3=1
endif
endif # x86
ifeq ($(TARGET_ARCH),mips)
ifneq ($(ARCH_MIPS_HAS_FPU),true)
libc_common_cflags += -DSOFTFLOAT
endif
libc_common_cflags += -fstrict-aliasing
libc_crt_target_cflags := $(TARGET_GLOBAL_CFLAGS)
endif # mips
# Define ANDROID_SMP appropriately.
ifeq ($(TARGET_CPU_SMP),true)
libc_common_cflags += -DANDROID_SMP=1
@@ -583,145 +511,78 @@ else
libc_common_cflags += -DANDROID_SMP=0
endif
# crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
libc_crt_target_cflags += \
-I$(LOCAL_PATH)/include \
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
# Needed to access private/__dso_handle.S from
# crtbegin_xxx.S and crtend_xxx.S
#
libc_crt_target_cflags += -I$(LOCAL_PATH)/private
ifeq ($(TARGET_ARCH),arm)
libc_crt_target_cflags += -DCRT_LEGACY_WORKAROUND
endif
# Define some common includes
# ========================================================
libc_common_c_includes := \
$(LOCAL_PATH)/stdlib \
$(LOCAL_PATH)/string \
$(LOCAL_PATH)/stdio \
external/safe-iop/include
$(LOCAL_PATH)/stdio
# Needed to access private/__dso_handle.h from
# crtbegin_xxx.S and crtend_xxx.S
libc_crt_target_cflags += \
-I$(LOCAL_PATH)/private \
-I$(LOCAL_PATH)/arch-$(TARGET_ARCH)/include
# Define the libc run-time (crt) support object files that must be built,
# which are needed to build all other objects (shared/static libs and
# executables)
# ==========================================================================
# ARM, MIPS, and x86 all need crtbegin_so/crtend_so.
ifneq ($(filter arm x86,$(TARGET_ARCH)),)
# ARM and x86 need crtbegin_so/crtend_so.
#
# For x86, the .init section must point to a function that calls all
# entries in the .ctors section. (on ARM this is done through the
# .init_array section instead).
#
# For all the platforms, the .fini_array section must point to a function
# For both platforms, the .fini_array section must point to a function
# that will call __cxa_finalize(&__dso_handle) in order to ensure that
# static C++ destructors are properly called on dlclose().
#
ifeq ($(TARGET_ARCH),arm)
libc_crtbegin_extension := c
libc_crt_target_so_cflags :=
endif
ifeq ($(TARGET_ARCH),mips)
libc_crtbegin_extension := S
libc_crt_target_so_cflags := -fPIC
endif
libc_crt_target_so_cflags := $(libc_crt_target_cflags)
ifeq ($(TARGET_ARCH),x86)
libc_crtbegin_extension := S
libc_crt_target_so_cflags := -fPIC
# This flag must be added for x86 targets, but not for ARM
libc_crt_target_so_cflags += -fPIC
endif
ifeq ($(libc_crtbegin_extension),)
$(error $(TARGET_ARCH) not supported)
endif
libc_crt_target_so_cflags += $(libc_crt_target_cflags)
libc_crt_target_crtbegin_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin.$(libc_crtbegin_extension)
libc_crt_target_crtbegin_so_file := $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.$(libc_crtbegin_extension)
# See the comment in crtbrand.c for the reason why we need to generate
# crtbrand.s before generating crtbrand.o.
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
$(GEN): $(LOCAL_PATH)/bionic/crtbrand.c
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.S
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -S \
-MD -MF $(@:%.s=%.d) -o $@ $<
$(hide) sed -i -e '/\.note\.ABI-tag/s/progbits/note/' $@
$(call transform-d-to-p-args,$(@:%.s=%.d),$(@:%.s=%.P))
-include $(GEN:%.s=%.P)
$(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.s
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
$(GEN): $(libc_crt_target_crtbegin_so_file)
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
-MD -MF $(@:%.o=%.d) -o $@ -c $<
$(transform-d-to-p)
-include $(GEN:%.o=%.P)
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_so_cflags) \
-MD -MF $(@:%.o=%.d) -o $@ -c $<
$(transform-d-to-p)
-include $(GEN:%.o=%.P)
ALL_GENERATED_SOURCES += $(GEN)
# The following two are installed to device
GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtbegin_so.o
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_so.o
$(hide) mkdir -p $(dir $@) && cp -f $< $@
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_SHARED_LIBRARIES)/crtend_so.o
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_so.o
$(hide) mkdir -p $(dir $@) && cp -f $< $@
$(TARGET_CC) $(libc_crt_target_so_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
endif # TARGET_ARCH == x86 || TARGET_ARCH == arm
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o
$(GEN): $(libc_crt_target_crtbegin_file)
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_static.S
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
-MD -MF $(@:%.o=%.d) -o $@ -c $<
$(transform-d-to-p)
-include $(GEN:%.o=%.P)
$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static.o
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_static1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_dynamic.S
@mkdir -p $(dir $@)
$(hide) $(TARGET_LD) -r -o $@ $^
$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o
$(GEN): $(libc_crt_target_crtbegin_file)
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
-MD -MF $(@:%.o=%.d) -o $@ -c $<
$(transform-d-to-p)
-include $(GEN:%.o=%.P)
ALL_GENERATED_SOURCES += $(GEN)
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic.o
$(GEN): $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbegin_dynamic1.o $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtbrand.o
@mkdir -p $(dir $@)
$(hide) $(TARGET_LD) -r -o $@ $^
ALL_GENERATED_SOURCES += $(GEN)
# We rename crtend.o to crtend_android.o to avoid a
# name clash between gcc and bionic.
GEN := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/crtend_android.o
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
@mkdir -p $(dir $@)
$(hide) $(TARGET_CC) $(libc_crt_target_cflags) \
-MD -MF $(@:%.o=%.d) -o $@ -c $<
$(transform-d-to-p)
-include $(GEN:%.o=%.P)
$(TARGET_CC) $(libc_crt_target_cflags) -o $@ -c $<
ALL_GENERATED_SOURCES += $(GEN)
@@ -729,60 +590,18 @@ ALL_GENERATED_SOURCES += $(GEN)
# "WITH_MALLOC_CHECK_LIBC_A := true" to buildspec.mk
WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
# ========================================================
# libbionic_ssp.a - stack protector code
# ========================================================
#
# The stack protector code needs to be compiled
# with -fno-stack-protector, since it modifies the
# stack canary.
include $(CLEAR_VARS)
LOCAL_SRC_FILES := bionic/ssp.c
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libbionic_ssp
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SYSTEM_SHARED_LIBRARIES :=
include $(BUILD_STATIC_LIBRARY)
# ========================================================
# libc_netbsd.a - upstream NetBSD C library code
# ========================================================
#
# These files are built with the netbsd-compat.h header file
# automatically included.
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
-I$(LOCAL_PATH)/upstream-netbsd \
-include upstream-netbsd/netbsd-compat.h
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libc_netbsd
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SYSTEM_SHARED_LIBRARIES :=
include $(BUILD_STATIC_LIBRARY)
# ========================================================
# libc_common.a
# ========================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(libc_common_src_files)
LOCAL_CFLAGS := $(libc_common_cflags)
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
endif
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libc_common
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_WHOLE_STATIC_LIBRARIES := libbionic_ssp libc_netbsd
LOCAL_SYSTEM_SHARED_LIBRARIES :=
include $(BUILD_STATIC_LIBRARY)
@@ -810,7 +629,6 @@ LOCAL_CFLAGS := $(libc_common_cflags) \
-DLIBC_STATIC
LOCAL_MODULE := libc_nomalloc
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
LOCAL_SYSTEM_SHARED_LIBRARIES :=
@@ -826,14 +644,13 @@ LOCAL_SRC_FILES := \
$(libc_arch_static_src_files) \
$(libc_static_common_src_files) \
bionic/dlmalloc.c \
bionic/malloc_debug_common.cpp \
bionic/malloc_debug_common.c \
bionic/libc_init_static.c
LOCAL_CFLAGS := $(libc_common_cflags) \
-DLIBC_STATIC
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_MODULE := libc
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
LOCAL_SYSTEM_SHARED_LIBRARIES :=
@@ -845,36 +662,17 @@ include $(BUILD_STATIC_LIBRARY)
# ========================================================
include $(CLEAR_VARS)
# pthread deadlock prediction:
# set -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=1 to enable support for
# pthread deadlock prediction.
# Since this code is experimental it is disabled by default.
# see libc/bionic/pthread_debug.c for details
LOCAL_CFLAGS := $(libc_common_cflags) -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
LOCAL_CFLAGS := $(libc_common_cflags)
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_SRC_FILES := \
$(libc_arch_dynamic_src_files) \
$(libc_static_common_src_files) \
bionic/dlmalloc.c \
bionic/malloc_debug_common.cpp \
bionic/pthread_debug.c \
bionic/malloc_debug_common.c \
bionic/libc_init_dynamic.c
ifeq ($(TARGET_ARCH),arm)
LOCAL_NO_CRT := true
LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
LOCAL_SRC_FILES := \
arch-arm/bionic/crtbegin_so.c \
arch-arm/bionic/atexit_legacy.c \
$(LOCAL_SRC_FILES) \
arch-arm/bionic/crtend_so.S
endif
LOCAL_MODULE:= libc
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
@@ -911,19 +709,16 @@ LOCAL_CFLAGS := \
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_SRC_FILES := \
bionic/malloc_debug_leak.cpp \
bionic/malloc_debug_check.cpp \
bionic/malloc_debug_check_mapinfo.cpp \
bionic/malloc_debug_stacktrace.cpp
bionic/malloc_debug_leak.c
LOCAL_MODULE:= libc_malloc_debug_leak
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SHARED_LIBRARIES := libc libdl
LOCAL_SHARED_LIBRARIES := libc
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
LOCAL_SYSTEM_SHARED_LIBRARIES :=
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
# Don't prelink
LOCAL_PRELINK_MODULE := false
# Don't install on release build
LOCAL_MODULE_TAGS := eng debug
@@ -942,15 +737,15 @@ LOCAL_CFLAGS := \
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_SRC_FILES := \
bionic/malloc_debug_qemu.cpp
bionic/malloc_debug_qemu.c
LOCAL_MODULE:= libc_malloc_debug_qemu
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SHARED_LIBRARIES := libc libdl
LOCAL_SHARED_LIBRARIES := libc
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
LOCAL_SYSTEM_SHARED_LIBRARIES :=
# Don't prelink
LOCAL_PRELINK_MODULE := false
# Don't install on release build
LOCAL_MODULE_TAGS := eng debug

441
libc/Jamfile Normal file
View File

@@ -0,0 +1,441 @@
# This file is used to build the Bionic library with the Jam build
# tool. For info, see www.perforce.com/jam/jam.html
#
BIONIC_TOP ?= $(DOT) ;
DEBUG = 1 ;
# pattern used for automatic heade inclusion detection
HDRPATTERN = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
# debugging support, simply define the DEBUG variable to activate verbose output
rule Debug
{
if $(DEBUG) {
Echo $(1) ;
}
}
# return all elements from $(1) that are not in $(2)
rule Filter list : filter
{
local result = ;
local item ;
for item in $(list) {
if ! $(item) in $(filter) {
result += $(item) ;
}
}
return $(result) ;
}
# reverse a list of elements
rule Reverse list
{
local result = ;
local item ;
for item in $(list) {
result = $(item) $(result) ;
}
return $(result) ;
}
# decompose a path into a list of elements
rule PathDecompose dir
{
local result ;
while $(dir:D)
{
if ! $(dir:BS) { # for rooted paths like "/foo"
break ;
}
result = $(dir:BS) $(result) ;
dir = $(dir:D) ;
}
result = $(dir) $(result) ;
return $(result) ;
}
# simply a file path, i.e. get rid of . or .. when possible
rule _PathSimplify dir
{
local result = ;
local dir2 d ;
dir = [ PathDecompose $(dir) ] ;
# get rid of any single dot
dir2 = ;
for d in $(dir) {
if $(d) = "." {
continue ;
}
dir2 += $(d) ;
}
# get rid of .. when possible
for d in $(dir2) {
if $(d) = ".." && $(result) {
result = $(result[2-]) ;
}
else
result = $(d) $(result) ;
}
# now invert the result
result = [ Reverse $(result) ] ;
if ! $(result) {
result = "." ;
}
return $(result:J="/") ;
}
rule PathSimplify dirs
{
local result ;
local d ;
for d in $(dirs) {
result += [ _PathSimplify $(d) ] ;
}
return $(result) ;
}
# retrieve list of subdirectories
rule ListSubDirs paths
{
local result = ;
local entry ;
for entry in [ Glob $(paths) : * ] {
if ! $(entry:S) {
result += $(entry) ;
}
}
return [ PathSimplify $(result) ] ;
}
# retrieve list of sources in a given directory
rule ListSources path
{
return [ Glob $(path) : *.S *.c ] ;
}
# find the prebuilt directory
#
if ! $(TOP) {
Echo "Please define TOP as the root of your device build tree" ;
Exit ;
}
Debug "OS is" $(OS) ;
Debug "CPU is" $(CPU) ;
if $(OS) = LINUX
{
PREBUILT = $(TOP)/prebuilt/Linux ;
}
else if $(OS) = MACOSX
{
switch $(CPU) {
case i386 : PREBUILT = $(TOP)/prebuilt/darwin-x86 ; break ;
case ppc : PREBUILT = $(TOP)/prebuilt/darwin-ppc ; break ;
case * : Echo "unsupported CPU" "$(CPU) !!" ;
Echo "Please contact digit@google.com for help" ;
Exit ;
}
}
else
{
Echo "Unsupported operating system" $(OS) ;
Echo "Please contact digit@google.com for help" ;
Exit ;
}
Debug "TOP is" $(TOP) ;
Debug "PREBUILT is" $(PREBUILT) ;
# check architectures and setup toolchain variables
#
SUPPORTED_ARCHS = x86 arm ;
ARCH ?= $(SUPPORTED_ARCHS) ;
if ! $(ARCH) in $(SUPPORTED_ARCHS) {
Echo "The variable ARCH contains an unsupported value, use one or more of these instead" ;
Echo "separated by spaces:" $(SUPPORTED_ARCHS) ;
Exit ;
}
x86_TOOLSET_PREFIX ?= "" ;
arm_TOOLSET_PREFIX ?= $(TOP)/prebuilt/Linux/toolchain-4.1.1/bin/arm-elf- ;
for arch in $(ARCH) {
CC_$(arch) = $($(arch)_TOOLSET_PREFIX)gcc ;
C++_$(arch) = $($(arch)_TOOLSET_PREFIX)g++ ;
AR_$(arch) = $($(arch)_TOOLSET_PREFIX)ar ;
}
# the list of arch-independent source subdirectories
BIONIC_SRC_SUBDIRS = string ;
BIONIC_x86_SUBDIRS = ;
BIONIC_arm_SUBDIRS = ;
CFLAGS = -O0 -g -W ;
# find sources in a given list of subdirectories
rule FindSources dirs
{
local dir ;
for dir in $(dirs)
{
local LOCAL_SRC NO_LOCAL_SRC ;
if [ Glob $(dir) : rules.jam ] {
include $(dir)/rules.jam ;
if $(LOCAL_SRC) {
_sources = $(LOCAL_SRC) ;
}
else {
_sources = [ Glob $(dir) : *.S *.c ] ;
_sources = $(_sources:BS) ;
}
if $(NO_LOCAL_SRC) {
_sources = [ Filter $(_sources) : $(NO_LOCAL_SRC) ] ;
}
sources += $(dir)/$(_sources) ;
}
else
sources += [ ListSources $(dir) ] ;
}
}
# Compile a given object file from a source
rule Compile object : source
{
Depends $(object) : $(source) ;
Depends bionic : $(object) ;
Clean clean : $(object) ;
MakeLocate $(object) : $(OUT) ;
CC on $(object) = $(CC_$(arch)) ;
CFLAGS on $(object) = $(CFLAGS) ;
INCLUDES on $(object) = $(INCLUDES) ;
DEFINES on $(object) = $(DEFINES) ;
HDRRULE on $(>) = HdrRule ;
HDRSCAN on $(>) = $(HDRPATTERN) ;
HDRSEARCH on $(>) = $(INCLUDES) ;
HDRGRIST on $(>) = $(HDRGRIST) ;
}
actions Compile
{
$(CC) -c -o $(1) $(CFLAGS) -I$(INCLUDES) -D$(DEFINES) $(2)
}
rule RmTemps
{
Temporary $(2) ;
}
actions quietly updated piecemeal together RmTemps
{
rm -f $(2)
}
actions Archive
{
$(AR) ru $(1) $(2)
}
rule Library library : objects
{
local obj ;
if ! $(library:S) {
library = $(library:S=.a) ;
}
library = $(library:G=<$(arch)>) ;
Depends all : $(library) ;
if ! $(library:D) {
MakeLocate $(library) $(library)($(objects:BS)) : $(OUT) ;
}
Depends $(library) : $(library)($(objects:BS)) ;
for obj in $(objects) {
Depends $(library)($(obj:BS)) : $(obj) ;
}
Clean clean : $(library) ;
AR on $(library) = $(AR_$(arch)) ;
Archive $(library) : $(objects) ;
RmTemps $(library) : $(objects) ;
}
rule ProcessDir
{
local CFLAGS = $(CFLAGS) ;
local DEFINES = $(DEFINES) ;
local INCLUDES = $(INCLUDES) ;
local local_rules = [ Glob $(1) : rules.jam ] ;
local source sources ;
if $(local_rules) {
local LOCAL_CFLAGS LOCAL_DEFINES LOCAL_INCLUDES LOCAL_SRC NO_LOCAL_SRC ;
include $(local_rules) ;
CFLAGS += $(LOCAL_CFLAGS) ;
DEFINES += $(LOCAL_DEFINES) ;
INCLUDES += $(LOCAL_INCLUDES) ;
if $(LOCAL_SRC) {
sources = $(LOCAL_SRC) ;
}
else {
sources = [ Glob $(1) : *.S *.c ] ;
sources = $(sources:BS) ;
}
if $(NO_LOCAL_SRC) {
sources = [ Filter $(sources) : $(NO_LOCAL_SRC) ] ;
}
sources = $(1)/$(sources) ;
}
else
sources = [ Glob $(1) : *.S *.c ] ;
for source in $(sources) {
local name = $(source:B) ;
if $(source:S) = ".S" {
# record the list of assembler sources
ASSEMBLER_SOURCES += $(name) ;
}
else if $(source:S) = ".c" && $(name) in $(ASSEMBLER_SOURCES) {
# skip C source file if corresponding assembler exists
continue ;
}
objname = <$(arch)>$(name).o ;
Compile $(objname) : $(source) ;
ALL_OBJECTS += $(objname) ;
}
}
rule ProcessDirs
{
local dir ;
for dir in $(1) {
ProcessDir $(dir) ;
}
}
INCLUDES_x86 = /usr/src/linux/include ;
INCLUDES_arm = ../kernel_headers
include/arch/arm
include/bits32
;
INCLUDES = include stdio string stdlib .
../msun/include
;
DEFINES = ANDROID_CHANGES
USE_LOCKS
REALLOC_ZERO_BYTES_FREES
_LIBC=1
SOFTFLOAT
FLOATING_POINT
NEED_PSELECT=1
ANDROID
;
CFLAGS_x86 = ;
for arch in $(ARCH)
{
local ARCH_DIR = $(BIONIC_TOP)/arch-$(arch) ;
local INCLUDES = $(INCLUDES_$(arch)) $(ARCH_DIR)/include $(INCLUDES) ;
local DEFINES = $(DEFINES_$(arch)) $(DEFINES) ARCH=$(arch) ;
local CFLAGS = $(CFLAGS) $(CFLAGS_$(arch)) ;
local OUT = out/$(arch) ;
local ASSEMBLER_SOURCES ALL_OBJECTS ;
ProcessDirs [ ListSubDirs $(ARCH_DIR) ] ;
ProcessDirs stdlib stdio unistd string tzcode inet ;
ProcessDirs [ ListSubDirs netbsd ] ;
ProcessDirs bionic ;
Library bionic : $(ALL_OBJECTS) ;
}
BIONIC_SEARCH = $(BIONIC_TOP)/include ;
# /HdrRule source : headers ;
#
# Arranges the proper dependencies when the file _source_ includes the files
# _headers_ through the #include C preprocessor directive
#
# this rule is not intendend to be called explicitely. It is called
# automatically during header scanning on sources handled by the @Object
# rule (e.g. sources in @Main or @Library rules)
#
rule HdrRule
{
# HdrRule source : headers ;
# N.B. This rule is called during binding, potentially after
# the fate of many targets has been determined, and must be
# used with caution: don't add dependencies to unrelated
# targets, and don't set variables on $(<).
# Tell Jam that anything depending on $(<) also depends on $(>),
# set SEARCH so Jam can find the headers, but then say we don't
# care if we can't actually find the headers (they may have been
# within ifdefs),
local s = $(>:G=$(HDRGRIST:E)) ;
Includes $(<) : $(s) ;
SEARCH on $(s) = $(HDRSEARCH) ;
NoCare $(s) ;
# Propagate on $(<) to $(>)
HDRSEARCH on $(s) = $(HDRSEARCH) ;
HDRSCAN on $(s) = $(HDRSCAN) ;
HDRRULE on $(s) = $(HDRRULE) ;
HDRGRIST on $(s) = $(HDRGRIST) ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
# this file is used to list all the syscalls that will be supported by
# the Bionic C library. It is used to automatically generate the syscall
# stubs, the list of syscall constants (__NR_xxxx) and the content of <linux/_unistd.h>
# stubs, the list of syscall constants (__NR_xxxx) and the content of <linux/_unitsd.h>
#
# each non comment line has the following format:
#
# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (syscall_number|"stub")
# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (#syscall_number|stub)
#
# note that:
# - syscall_name correspond to the name of the syscall, which may differ from
@@ -22,18 +22,18 @@
# assembler template for the syscall; it's up to the bionic implementation to provide
# a relevant C stub
#
# - additionally, if the syscall number is different amoung ARM, and x86, MIPS use:
# return_type funcname[:syscall_name](parameters) arm_number,x86_number,mips_number
# - additionally, if the syscall number is different amoung ARM, x86 and SuperH, use:
# return_type funcname[:syscall_name](parameters) arm_number,x86_number,superh_number
#
# the file is processed by a python script named gensyscalls.py
#
# process management
void _exit:exit_group (int) 248,252,246
void _exit_thread:exit (int) 1
void _exit:exit_group (int) 248,252
void _exit_thread:exit (int) 1
pid_t __fork:fork (void) 2
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7,7
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284,278
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284
# NOTE: this system call is never called directly, but we list it there
# to have __NR_clone properly defined.
@@ -42,90 +42,68 @@ pid_t __sys_clone:clone (int, void*, int*, void*, int*) 120
int execve (const char*, char* const*, char* const*) 11
int __setuid:setuid32 (uid_t) 213,213,-1
int __setuid:setuid (uid_t) -1,-1,23
uid_t getuid:getuid32 () 199,199,-1
uid_t getuid:getuid () -1,-1,24
gid_t getgid:getgid32 () 200,200,-1
gid_t getgid:getgid () -1,-1,47
uid_t geteuid:geteuid32 () 201,201,-1
uid_t geteuid:geteuid () -1,-1,49
gid_t getegid:getegid32 () 202,202,-1
gid_t getegid:getegid () -1,-1,50
uid_t getresuid:getresuid32 (uid_t *ruid, uid_t *euid, uid_t *suid) 209,209,-1
uid_t getresuid:getresuid (uid_t *ruid, uid_t *euid, uid_t *suid) -1,-1,186
gid_t getresgid:getresgid32 (gid_t *rgid, gid_t *egid, gid_t *sgid) 211,211,-1
gid_t getresgid:getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid) -1,-1,191
pid_t gettid() 224,224,222
ssize_t readahead(int, off64_t, size_t) 225,225,223
int getgroups:getgroups32(int, gid_t *) 205,205,-1
int getgroups:getgroups(int, gid_t *) -1,-1,80
int __setuid:setuid32 (uid_t) 213
uid_t getuid:getuid32 () 199
gid_t getgid:getgid32 () 200
uid_t geteuid:geteuid32 () 201
gid_t getegid:getegid32 () 202
uid_t getresuid:getresuid32 () 209
gid_t getresgid:getresgid32 () 211
pid_t gettid() 224
int getgroups:getgroups32(int, gid_t *) 205
pid_t getpgid(pid_t) 132
pid_t getppid() 64
pid_t getsid(pid_t) 147
pid_t getppid() 64
pid_t setsid() 66
int setgid:setgid32(gid_t) 214,214,-1
int setgid:setgid(gid_t) -1,-1,46
int setgid:setgid32(gid_t) 214
int seteuid:seteuid32(uid_t) stub
int __setreuid:setreuid32(uid_t, uid_t) 203,203,-1
int __setreuid:setreuid(uid_t, uid_t) -1,-1,70
int __setresuid:setresuid32(uid_t, uid_t, uid_t) 208,208,-1
int __setresuid:setresuid(uid_t, uid_t, uid_t) -1,-1,185
int setresgid:setresgid32(gid_t, gid_t, gid_t) 210,210,-1
int setresgid:setresgid(gid_t, gid_t, gid_t) -1,-1,190
int __setreuid:setreuid32(uid_t, uid_t) 203
int __setresuid:setresuid32(uid_t, uid_t, uid_t) 208
int setresgid:setresgid32(gid_t, gid_t, gid_t) 210
void* __brk:brk(void*) 45
# see comments in arch-arm/bionic/kill.S to understand why we don't generate an ARM stub for kill/tkill
int kill(pid_t, int) -1,37,37
int tkill(pid_t tid, int sig) -1,238,236
int tgkill(pid_t tgid, pid_t tid, int sig) -1,270,266
int kill(pid_t, int) -1,37
int tkill(pid_t tid, int sig) -1,238
int __ptrace:ptrace(int request, int pid, void* addr, void* data) 26
int __set_thread_area:set_thread_area(void* user_desc) -1,243,283
int __set_thread_area:set_thread_area(void* user_desc) -1,243
int __getpriority:getpriority(int, int) 96
int setpriority(int, int, int) 97
int setrlimit(int resource, const struct rlimit *rlp) 75
int getrlimit:ugetrlimit(int resource, struct rlimit *rlp) 191,191,-1
int getrlimit:getrlimit(int resource, struct rlimit *rlp) -1,-1,76
int getrlimit:ugetrlimit(int resource, struct rlimit *rlp) 191
int getrusage(int who, struct rusage* r_usage) 77
int setgroups:setgroups32(int, const gid_t *) 206,206,-1
int setgroups:setgroups(int, const gid_t *) -1,-1,81
int setgroups:setgroups32(int, const gid_t *) 206
pid_t getpgrp(void) stub
int setpgid(pid_t, pid_t) 57
pid_t vfork(void) 190,-1,-1
int setregid:setregid32(gid_t, gid_t) 204,204,-1
int setregid:setregid(gid_t, gid_t) -1,-1,71
pid_t vfork(void) 190,-1,190
int setregid:setregid32(gid_t, gid_t) 204
int chroot(const char *) 61
# IMPORTANT: Even though <sys/prctl.h> declares prctl(int,...), the syscall stub must take 6 arguments
# to match the kernel implementation.
int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) 172,172,192
int capget(cap_user_header_t header, cap_user_data_t data) 184,184,204
int capset(cap_user_header_t header, const cap_user_data_t data) 185,185,205
int sigaltstack(const stack_t*, stack_t*) 186,186,206
int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) 172
int capget(cap_user_header_t header, cap_user_data_t data) 184
int capset(cap_user_header_t header, const cap_user_data_t data) 185
int sigaltstack(const stack_t*, stack_t*) 186
int acct(const char* filepath) 51
# file descriptors
ssize_t read (int, void*, size_t) 3
ssize_t write (int, const void*, size_t) 4
ssize_t pread64 (int, void *, size_t, off64_t) 180,180,200
ssize_t pwrite64 (int, void *, size_t, off64_t) 181,181,201
ssize_t __pread64:pread64 (int, void *, size_t, off_t, off_t) 180
ssize_t __pwrite64:pwrite64 (int, void *, size_t, off_t, off_t) 181
int __open:open (const char*, int, mode_t) 5
int __openat:openat (int, const char*, int, mode_t) 322,295,288
int __openat:openat (int, const char*, int, mode_t) 322,295
int close (int) 6
int creat(const char*, mode_t) stub
off_t lseek(int, off_t, int) 19
int __llseek:_llseek (int, unsigned long, unsigned long, loff_t*, int) 140
pid_t getpid () 20
void * mmap(void *, size_t, int, int, int, long) stub
void * __mmap2:mmap2(void*, size_t, int, int, int, long) 192,192,210
void * __mmap2:mmap2(void*, size_t, int, int, int, long) 192
int munmap(void *, size_t) 91
void * mremap(void *, size_t, size_t, unsigned long) 163,163,167
void * mremap(void *, size_t, size_t, unsigned long) 163
int msync(const void *, size_t, int) 144
int mprotect(const void *, size_t, int) 125
int madvise(const void *, size_t, int) 220,219,218
int mlock(const void *addr, size_t len) 150,150,154
int munlock(const void *addr, size_t len) 151,151,155
int mlockall(int flags) 152,152,156
int munlockall() 153,153,157
int mincore(void* start, size_t length, unsigned char* vec) 219,218,217
int madvise(const void *, size_t, int) 220,219
int mlock(const void *addr, size_t len) 150
int munlock(const void *addr, size_t len) 151
int mincore(void* start, size_t length, unsigned char* vec) 219,218
int __ioctl:ioctl(int, int, void *) 54
int readv(int, const struct iovec *, int) 145
int writev(int, const struct iovec *, int) 146
@@ -134,114 +112,93 @@ int flock(int, int) 143
int fchmod(int, mode_t) 94
int dup(int) 41
int pipe(int *) 42,42,-1
int pipe2(int *, int) 359,331,328
int pipe2(int *, int) 359,331
int dup2(int, int) 63
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
int ftruncate(int, off_t) 93
int ftruncate64(int, off64_t) 194,194,212
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220,219
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220
int fsync(int) 118
int fdatasync(int) 148,148,152
int fchown:fchown32(int, uid_t, gid_t) 207,207,-1
int fchown:fchown(int, uid_t, gid_t) -1,-1,95
int fdatasync(int) 148
int fchown:fchown32(int, uid_t, gid_t) 207
void sync(void) 36
int __fcntl64:fcntl64(int, int, void *) 221,221,220
int __fstatfs64:fstatfs64(int, size_t, struct statfs *) 267,269,256
ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) 187,187,207
int fstatat:fstatat64(int dirfd, const char *path, struct stat *buf, int flags) 327,300,293
int mkdirat(int dirfd, const char *pathname, mode_t mode) 323,296,289
int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags) 325,298,291
int fchmodat(int dirfd, const char *path, mode_t mode, int flags) 333,306,299
int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath) 329,302,295
int fsetxattr(int, const char *, const void *, size_t, int) 228,228,226
ssize_t fgetxattr(int, const char *, void *, size_t) 231,231,229
ssize_t flistxattr(int, char *, size_t) 234,234,232
int fremovexattr(int, const char *) 237,237,235
int __fcntl64:fcntl64(int, int, void *) 221
int __fstatfs64:fstatfs64(int, size_t, struct statfs *) 267,269
ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) 187
int fstatat:fstatat64(int dirfd, const char *path, struct stat *buf, int flags) 327,300
int mkdirat(int dirfd, const char *pathname, mode_t mode) 323,296
int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags) 325,298
int fchmodat(int dirfd, const char *path, mode_t mode, int flags) 333,306
int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath) 329,302
# file system
int link (const char*, const char*) 9
int unlink (const char*) 10
int unlinkat (int, const char *, int) 328,301,294
int unlinkat (int, const char *, int) 328,301
int chdir (const char*) 12
int mknod (const char*, mode_t, dev_t) 14
int chmod (const char*,mode_t) 15
int chown:chown32(const char *, uid_t, gid_t) 212,212,-1
int chown:chown(const char *, uid_t, gid_t) -1,-1,202
int lchown:lchown32 (const char*, uid_t, gid_t) 198,198,-1
int lchown:lchown (const char*, uid_t, gid_t) -1,-1,16
int chown:chown32(const char *, uid_t, gid_t) 212
int lchown:lchown32 (const char*, uid_t, gid_t) 198
int mount (const char*, const char*, const char*, unsigned long, const void*) 21
int umount(const char*) stub
int umount2 (const char*, int) 52
int fstat:fstat64(int, struct stat*) 197,197,215
int stat:stat64(const char *, struct stat *) 195,195,213
int lstat:lstat64(const char *, struct stat *) 196,196,214
int fstat:fstat64(int, struct stat*) 197
int stat:stat64(const char *, struct stat *) 195
int lstat:lstat64(const char *, struct stat *) 196
int mkdir(const char *, mode_t) 39
int readlink(const char *, char *, size_t) 85
int rmdir(const char *) 40
int rename(const char *, const char *) 38
int __getcwd:getcwd(char * buf, size_t size) 183,183,203
int __getcwd:getcwd(char * buf, size_t size) 183
int access(const char *, int) 33
int faccessat(int, const char *, int, int) 334,307,300
int symlink(const char *, const char *) 83
int fchdir(int) 133
int truncate(const char*, off_t) 92
int setxattr(const char *, const char *, const void *, size_t, int) 226,226,224
int lsetxattr(const char *, const char *, const void *, size_t, int) 227,227,225
ssize_t getxattr(const char *, const char *, void *, size_t) 229,229,227
ssize_t lgetxattr(const char *, const char *, void *, size_t) 230,230,228
ssize_t listxattr(const char *, char *, size_t) 232,232,230
ssize_t llistxattr(const char *, char *, size_t) 233,233,231
int removexattr(const char *, const char *) 235,235,233
int lremovexattr(const char *, const char *) 236,236,234
int __statfs64:statfs64(const char *, size_t, struct statfs *) 266,268,255
long unshare(unsigned long) 337,310,303
int __statfs64:statfs64(const char *, size_t, struct statfs *) 266,268
# time
int pause () 29
int gettimeofday(struct timeval*, struct timezone*) 78
int settimeofday(const struct timeval*, const struct timezone*) 79
clock_t times(struct tms *) 43
int nanosleep(const struct timespec *, struct timespec *) 162,162,166
int clock_gettime(clockid_t clk_id, struct timespec *tp) 263,265,263
int clock_settime(clockid_t clk_id, const struct timespec *tp) 262,264,262
int clock_getres(clockid_t clk_id, struct timespec *res) 264,266,264
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *req, struct timespec *rem) 265,267,265
int nanosleep(const struct timespec *, struct timespec *) 162
int clock_gettime(clockid_t clk_id, struct timespec *tp) 263,265
int clock_settime(clockid_t clk_id, const struct timespec *tp) 262,264
int clock_getres(clockid_t clk_id, struct timespec *res) 264,266
int clock_nanosleep(const struct timespec *req, struct timespec *rem) 265,267
int getitimer(int, const struct itimerval *) 105
int setitimer(int, const struct itimerval *, struct itimerval *) 104
int __timer_create:timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) 257,259,257
int __timer_settime:timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) 258,260,258
int __timer_gettime:timer_gettime(timer_t, struct itimerspec*) 259,261,259
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262,260
int __timer_delete:timer_delete(timer_t) 261,263,261
int utimes(const char*, const struct timeval tvp[2]) 269,271,267
int utimensat(int, const char *, const struct timespec times[2], int) 348,320,316
int __timer_create:timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) 257,259
int __timer_settime:timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) 258,260
int __timer_gettime:timer_gettime(timer_t, struct itimerspec*) 259,261
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262
int __timer_delete:timer_delete(timer_t) 261,263
int utimes(const char*, const struct timeval tvp[2]) 269, 271
# signals
int sigaction(int, const struct sigaction *, struct sigaction *) 67
int sigprocmask(int, const sigset_t *, sigset_t *) 126
int __sigsuspend:sigsuspend(int unused1, int unused2, unsigned mask) 72,72,-1
int __sigsuspend:sigsuspend(const sigset_t *mask) -1,-1,72
int __rt_sigaction:rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize) 174,174,194
int __rt_sigprocmask:rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize) 175,175,195
int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size) 177,177,197
int __sigsuspend:sigsuspend(int unused1, int unused2, unsigned mask) 72
int __rt_sigaction:rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize) 174
int __rt_sigprocmask:rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize) 175
int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size) 177
int sigpending(sigset_t *) 73
# sockets
int socket(int, int, int) 281,-1,183
int socketpair(int, int, int, int*) 288,-1,184
int bind(int, struct sockaddr *, int) 282,-1,169
int connect(int, struct sockaddr *, socklen_t) 283,-1,170
int listen(int, int) 284,-1,174
int accept(int, struct sockaddr *, socklen_t *) 285,-1,168
int getsockname(int, struct sockaddr *, socklen_t *) 286,-1,172
int getpeername(int, struct sockaddr *, socklen_t *) 287,-1,171
int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) 290,-1,180
int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) 292,-1,176
int shutdown(int, int) 293,-1,182
int setsockopt(int, int, int, const void *, socklen_t) 294,-1,181
int getsockopt(int, int, int, void *, socklen_t *) 295,-1,173
int sendmsg(int, const struct msghdr *, unsigned int) 296,-1,179
int recvmsg(int, struct msghdr *, unsigned int) 297,-1,177
int socket(int, int, int) 281,-1
int socketpair(int, int, int, int*) 288,-1
int bind(int, struct sockaddr *, int) 282,-1
int connect(int, struct sockaddr *, socklen_t) 283,-1
int listen(int, int) 284,-1
int accept(int, struct sockaddr *, socklen_t *) 285,-1
int getsockname(int, struct sockaddr *, socklen_t *) 286,-1
int getpeername(int, struct sockaddr *, socklen_t *) 287,-1
int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) 290,-1
int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) 292,-1
int shutdown(int, int) 293,-1
int setsockopt(int, int, int, const void *, socklen_t) 294,-1
int getsockopt(int, int, int, void *, socklen_t *) 295,-1
int sendmsg(int, const struct msghdr *, unsigned int) 296,-1
int recvmsg(int, struct msghdr *, unsigned int) 297,-1
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
int socket:socketcall:1 (int, int, int) -1,102,-1
@@ -260,22 +217,22 @@ int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1
int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102,-1
int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,102,-1
# sockets for sh.
int __socketcall:__socketcall(int, unsigned long*) -1,-1,102
# scheduler & real-time
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156,156,160
int sched_getscheduler(pid_t pid) 157,157,161
int sched_yield(void) 158,158,162
int sched_setparam(pid_t pid, const struct sched_param *param) 154,154,158
int sched_getparam(pid_t pid, struct sched_param *param) 155,155,159
int sched_get_priority_max(int policy) 159,159,163
int sched_get_priority_min(int policy) 160,160,164
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161,161,165
int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) 241,241,239
int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) 242,242,240
int __getcpu:getcpu(unsigned *cpu, unsigned *node, void *unused) 345,318,312
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156
int sched_getscheduler(pid_t pid) 157
int sched_yield(void) 158
int sched_setparam(pid_t pid, const struct sched_param *param) 154
int sched_getparam(pid_t pid, struct sched_param *param) 155
int sched_get_priority_max(int policy) 159
int sched_get_priority_min(int policy) 160
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
# io priorities
int ioprio_set(int which, int who, int ioprio) 314,289,314
int ioprio_get(int which, int who) 315,290,315
int ioprio_set(int which, int who, int ioprio) 314,289,288
int ioprio_get(int which, int who) 315,290,289
# other
int uname(struct utsname *) 122
@@ -287,29 +244,23 @@ int init_module(void *, unsigned long, const char *) 128
int delete_module(const char*, unsigned int) 129
int klogctl:syslog(int, char *, int) 103
int sysinfo(struct sysinfo *) 116
int personality(unsigned long) 136
long perf_event_open(struct perf_event_attr *attr_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) 364
# futex
int futex(void *, int, int, void *, void *, int) 240,240,238
int futex(void *, int, int, void *, void *, int) 240
# epoll
int epoll_create(int size) 250,254,248
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 251,255,249
int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256,250
int epoll_create(int size) 250,254
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 251,255
int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256
int inotify_init(void) 316,291,284
int inotify_add_watch(int, const char *, unsigned int) 317,292,285
int inotify_rm_watch(int, unsigned int) 318,293,286
int inotify_init(void) 316,291,290
int inotify_add_watch(int, const char *, unsigned int) 317,292,291
int inotify_rm_watch(int, unsigned int) 318,293,292
int poll(struct pollfd *, unsigned int, long) 168,168,188
int poll(struct pollfd *, unsigned int, long) 168
int eventfd:eventfd2(unsigned int, int) 356,328,325
int eventfd:eventfd2(unsigned int, int) 356,328
# ARM-specific ARM_NR_BASE == 0x0f0000 == 983040
int __set_tls:ARM_set_tls(void*) 983045,-1,-1
int cacheflush:ARM_cacheflush(long start, long end, long flags) 983042,-1,-1
# MIPS-specific
int _flush_cache:cacheflush(char *addr, const int nbytes, const int op) -1,-1,147
int syscall(int number,...) -1,-1,0
int __set_tls:ARM_set_tls(void*) 983045,-1
int cacheflush:ARM_cacheflush(long start, long end, long flags) 983042,-1

View File

@@ -25,9 +25,10 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef ANDROID_API_LEVEL_H
#define ANDROID_API_LEVEL_H
.global __get_pc
.type __get_pc, %function
#define __ANDROID_API__ 10
__get_pc:
mov r0, pc
bx lr
#endif /* ANDROID_API_LEVEL_H */

View File

@@ -26,10 +26,15 @@
* SUCH DAMAGE.
*/
#include <asm/unistd.h>
#include <machine/asm.h>
.text
.type _exit_with_stack_teardown, #function
.globl _exit_with_stack_teardown
.align 4
@ void _exit_with_stack_teardown(void * stackBase, int stackSize, int retCode)
ENTRY(_exit_with_stack_teardown)
_exit_with_stack_teardown:
#if __ARM_EABI__
mov lr, r2
@@ -48,4 +53,3 @@ ENTRY(_exit_with_stack_teardown)
@ exit() should never return, cause a crash if it does
mov r0, #0
ldr r0, [r0]
END(_exit_with_stack_teardown)

View File

@@ -70,7 +70,6 @@ ENTRY(_setjmp)
mov r0, #0x00000000
bx lr
END(_setjmp)
.L_setjmp_magic:
.word _JB_MAGIC__SETJMP
@@ -110,4 +109,3 @@ botch:
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
bl PIC_SYM(_C_LABEL(abort), PLT)
b . - 8 /* Cannot get here */
END(_longjmp)

View File

@@ -1,42 +0,0 @@
/*
* Copyright (C) 2012 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 <machine/asm.h>
/*
* Coding the abort function in assembly so that registers are guaranteed to
* be preserved properly regardless of GCC's assumption on the "noreturn"
* attribute. When the registers are not properly preserved we won't be able
* to unwind the stack all the way to the bottom to fully reveal the call
* sequence when the crash happens.
*/
ENTRY(abort)
.save {r3, r14}
stmfd sp!, {r3, r14}
blx PIC_SYM(_C_LABEL(__libc_android_abort), PLT)
END(abort)

View File

@@ -0,0 +1,69 @@
/*
* Copyright (C) 2011 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.
*/
#ifndef CRT_LEGACY_WORKAROUND
.arch armv5te
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 4
.eabi_attribute 18, 4
.code 16
.section .text.atexit,"ax",%progbits
.align 2
.global atexit
.hidden atexit
.code 16
.thumb_func
.type atexit, %function
atexit:
.fnstart
.LFB0:
.save {r4, lr}
push {r4, lr}
.LCFI0:
ldr r3, .L3
mov r1, #0
@ sp needed for prologue
.LPIC0:
add r3, pc
ldr r2, [r3]
bl __cxa_atexit
pop {r4, pc}
.L4:
.align 2
.L3:
.word __dso_handle-(.LPIC0+4)
.LFE0:
.fnend
.size atexit, .-atexit
#endif

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2012 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.
*/
extern void *__dso_handle;
__attribute__ ((visibility ("hidden")))
int atexit(void (*func)(void))
{
return (__cxa_atexit((void (*)(void *))func, (void *)0, &__dso_handle));
}

View File

@@ -0,0 +1,251 @@
/*
* 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 <sys/linux-syscalls.h>
#include <machine/cpu-features.h>
.global __atomic_cmpxchg
.type __atomic_cmpxchg, %function
.global __atomic_swap
.type __atomic_swap, %function
.global __atomic_dec
.type __atomic_dec, %function
.global __atomic_inc
.type __atomic_inc, %function
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
#if defined(__ARM_HAVE_LDREX_STREX)
/*
* ===========================================================================
* ARMv6+ implementation
* ===========================================================================
*/
/* r0(addr) -> r0(old) */
__atomic_dec:
.fnstart
mov r1, r0 @ copy addr so we don't clobber it
1: ldrex r0, [r1] @ load current value into r0
sub r2, r0, #1 @ generate new value into r2
strex r3, r2, [r1] @ try to store new value; result in r3
cmp r3, #0 @ success?
bxeq lr @ yes, return
b 1b @ no, retry
.fnend
/* r0(addr) -> r0(old) */
__atomic_inc:
.fnstart
mov r1, r0
1: ldrex r0, [r1]
add r2, r0, #1
strex r3, r2, [r1]
cmp r3, #0
bxeq lr
b 1b
.fnend
/* r0(old) r1(new) r2(addr) -> r0(zero_if_succeeded) */
__atomic_cmpxchg:
.fnstart
1: mov ip, #2 @ ip=2 means "new != old"
ldrex r3, [r2] @ load current value into r3
teq r0, r3 @ new == old?
strexeq ip, r1, [r2] @ yes, try store, set ip to 0 or 1
teq ip, #1 @ strex failure?
beq 1b @ yes, retry
mov r0, ip @ return 0 on success, 2 on failure
bx lr
.fnend
/* r0(new) r1(addr) -> r0(old) */
__atomic_swap:
.fnstart
1: ldrex r2, [r1]
strex r3, r0, [r1]
teq r3, #0
bne 1b
mov r0, r2
bx lr
.fnend
#else /*not defined __ARM_HAVE_LDREX_STREX*/
/*
* ===========================================================================
* Pre-ARMv6 implementation
* ===========================================================================
*/
/* int __kernel_cmpxchg(int oldval, int newval, int* ptr) */
.equ kernel_cmpxchg, 0xFFFF0FC0
.equ kernel_atomic_base, 0xFFFF0FFF
/* r0(addr) -> r0(old) */
__atomic_dec:
.fnstart
.save {r4, lr}
stmdb sp!, {r4, lr}
mov r2, r0
1: @ atomic_dec
ldr r0, [r2]
mov r3, #kernel_atomic_base
add lr, pc, #4
sub r1, r0, #1
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
bcc 1b
add r0, r1, #1
ldmia sp!, {r4, lr}
bx lr
.fnend
/* r0(addr) -> r0(old) */
__atomic_inc:
.fnstart
.save {r4, lr}
stmdb sp!, {r4, lr}
mov r2, r0
1: @ atomic_inc
ldr r0, [r2]
mov r3, #kernel_atomic_base
add lr, pc, #4
add r1, r0, #1
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
bcc 1b
sub r0, r1, #1
ldmia sp!, {r4, lr}
bx lr
.fnend
/* r0(old) r1(new) r2(addr) -> r0(zero_if_succeeded) */
__atomic_cmpxchg:
.fnstart
.save {r4, lr}
stmdb sp!, {r4, lr}
mov r4, r0 /* r4 = save oldvalue */
1: @ atomic_cmpxchg
mov r3, #kernel_atomic_base
add lr, pc, #4
mov r0, r4 /* r0 = oldvalue */
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
bcs 2f /* swap was made. we're good, return. */
ldr r3, [r2] /* swap not made, see if it's because *ptr!=oldvalue */
cmp r3, r4
beq 1b
2: @ atomic_cmpxchg
ldmia sp!, {r4, lr}
bx lr
.fnend
/* r0(new) r1(addr) -> r0(old) */
__atomic_swap:
.fnstart
swp r0, r0, [r1]
bx lr
.fnend
#endif /*not defined __ARM_HAVE_LDREX_STREX*/
/* __futex_wait(*ftx, val, *timespec) */
/* __futex_wake(*ftx, counter) */
/* __futex_syscall3(*ftx, op, val) */
/* __futex_syscall4(*ftx, op, val, *timespec) */
.global __futex_wait
.type __futex_wait, %function
.global __futex_wake
.type __futex_wake, %function
.global __futex_syscall3
.type __futex_syscall3, %function
.global __futex_syscall4
.type __futex_syscall4, %function
#if __ARM_EABI__
__futex_syscall3:
.fnstart
stmdb sp!, {r4, r7}
.save {r4, r7}
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
.fnend
__futex_wait:
.fnstart
stmdb sp!, {r4, r7}
.save {r4, r7}
mov r3, r2
mov r2, r1
mov r1, #FUTEX_WAIT
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
.fnend
__futex_wake:
.fnstart
.save {r4, r7}
stmdb sp!, {r4, r7}
mov r2, r1
mov r1, #FUTEX_WAKE
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
.fnend
#else
__futex_syscall3:
swi #__NR_futex
bx lr
__futex_wait:
mov r3, r2
mov r2, r1
mov r1, #FUTEX_WAIT
swi #__NR_futex
bx lr
__futex_wake:
mov r2, r1
mov r1, #FUTEX_WAKE
swi #__NR_futex
bx lr
#endif
__futex_syscall4:
b __futex_syscall3

View File

@@ -1,87 +0,0 @@
/*
* Copyright (C) 2011 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.
*/
/* The purpose of this file is to export a small set of atomic-related
* functions from the C library, to ensure binary ABI compatibility for
* the NDK.
*
* These functions were initially exposed by the NDK through <sys/atomics.h>,
* which was unfortunate because their implementation didn't provide any
* memory barriers at all.
*
* This wasn't a problem for the platform code that used them, because it
* used explicit barrier instructions around them. On the other hand, it means
* that any NDK-generated machine code that linked against them would not
* perform correctly when running on multi-core devices.
*
* To fix this, the platform code was first modified to not use any of these
* functions (everything is now inlined through assembly statements, see
* libc/private/bionic_arm_inline.h and the headers it includes.
*
* The functions here are thus only for the benefit of NDK applications,
* and now includes full memory barriers to prevent any random memory ordering
* issue from cropping.
*
* Note that we also provide an updated <sys/atomics.h> header that defines
* always_inlined versions of the functions that use the GCC builtin
* intrinsics to perform the same thing.
*
* NOTE: There is no need for a similar file for non-ARM platforms.
*/
/* DO NOT INCLUDE <sys/atomics.h> HERE ! */
int
__atomic_cmpxchg(int old, int _new, volatile int *ptr)
{
/* We must return 0 on success */
return __sync_val_compare_and_swap(ptr, old, _new) != old;
}
int
__atomic_swap(int _new, volatile int *ptr)
{
int prev;
do {
prev = *ptr;
} while (__sync_val_compare_and_swap(ptr, prev, _new) != prev);
return prev;
}
int
__atomic_dec(volatile int *ptr)
{
return __sync_fetch_and_sub (ptr, 1);
}
int
__atomic_inc(volatile int *ptr)
{
return __sync_fetch_and_add (ptr, 1);
}

View File

@@ -26,11 +26,17 @@
* SUCH DAMAGE.
*/
#include <sys/linux-syscalls.h>
#include <machine/asm.h>
ENTRY(__pthread_clone)
.text
.type __pthread_clone, #function
.global __pthread_clone
.align 4
.fnstart
__pthread_clone:
@ insert the args onto the new stack
stmdb r1!, {r0, r3}
str r0, [r1, #-4]
str r3, [r1, #-8]
@ do the system call
@ get flags
@@ -59,14 +65,15 @@ ENTRY(__pthread_clone)
@ to the C __thread_entry function which does some setup and then
@ calls the thread's start function
pop {r0, r1}
ldr r0, [sp, #-4]
ldr r1, [sp, #-8]
mov r2, sp @ __thread_entry needs the TLS pointer
b __thread_entry
__error:
mov r0, #-1
bx lr
END(__pthread_clone)
.fnend
#
@@ -81,8 +88,12 @@ END(__pthread_clone)
# at the end of the parameter list makes the
# implementation much simpler.
#
.type __bionic_clone, #function
.globl __bionic_clone
.align 4
.fnstart
ENTRY(__bionic_clone)
__bionic_clone:
mov ip, sp
.save {r4, r5, r6, r7}
@@ -113,4 +124,5 @@ ENTRY(__bionic_clone)
ldr r0, [sp, #-4]
ldr r1, [sp, #-8]
b __bionic_clone_entry
END(__bionic_clone)
.fnend

View File

@@ -25,70 +25,64 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
.text
.align 4
.type _start,#function
.globl _start
# this is the small startup code that is first run when
# any executable that is dynamically-linked with Bionic
# runs.
#
# it's purpose is to call __libc_init with appropriate
# arguments, which are:
#
# - the address of the raw data block setup by the Linux
# kernel ELF loader
#
# - address of an "onexit" function, not used on any
# platform supported by Bionic
#
# - address of the "main" function of the program. We
# can't hard-code it in the adr pseudo instruction
# so we use a tiny trampoline that will get relocated
# by the dynamic linker before this code runs
#
# - address of the constructor list
#
_start:
mov r0, sp
mov r1, #0
adr r2, 0f
adr r3, 1f
b __libc_init
0: b main
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__
.long __FINI_ARRAY__
.long __CTOR_LIST__
.section .preinit_array, "aw"
.globl __PREINIT_ARRAY__
__PREINIT_ARRAY__:
.long -1
.section .init_array, "aw"
.type __INIT_ARRAY__, @object
.globl __INIT_ARRAY__
__INIT_ARRAY__:
.long -1
.section .fini_array, "aw"
.type __FINI_ARRAY__, @object
.globl __FINI_ARRAY__
__FINI_ARRAY__:
.long -1
.long __do_global_dtors_aux
.abicalls
.text
.align 2
.set nomips16
.ent __do_global_dtors_aux
.type __do_global_dtors_aux, @function
__do_global_dtors_aux:
.frame $sp,32,$31 # vars= 0, regs= 1/0, args= 16, gp= 8
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set nomacro
addiu $sp,$sp,-32
sw $31,28($sp)
.cprestore 16
lw $2,%got(completed.1269)($28)
lbu $2,%lo(completed.1269)($2)
bne $2,$0,$L8
nop
.section .ctors, "aw"
.globl __CTOR_LIST__
__CTOR_LIST__:
.long -1
$L4:
lw $2,%got(__cxa_finalize)($28)
beq $2,$0,$L6
nop
lw $2,%got(__dso_handle)($28)
lw $4,0($2)
lw $25,%call16(__cxa_finalize)($28)
.reloc 1f,R_MIPS_JALR,__cxa_finalize
1: jalr $25
nop
lw $28,16($sp)
$L6:
lw $2,%got(completed.1269)($28)
li $3,1 # 0x1
sb $3,%lo(completed.1269)($2)
$L8:
lw $31,28($sp)
addiu $sp,$sp,32
j $31
nop
.set macro
.set reorder
.end __do_global_dtors_aux
.size __do_global_dtors_aux, .-__do_global_dtors_aux
.local completed.1269
.comm completed.1269,1,1
.weak __cxa_finalize
#include "__dso_handle_so.S"
#include "__dso_handle.S"
#include "atexit.S"

View File

@@ -25,27 +25,37 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* unlike our auto-generated syscall stubs, this code saves lr
on the stack, as well as a few other registers. this makes
our stack unwinder happy, when we generate debug stack
traces after the C library or other parts of the system
abort due to a fatal runtime error (e.g. detection
of a corrupted malloc heap).
*/
#include <sys/linux-syscalls.h>
#include <machine/asm.h>
# Implement static C++ destructors when the shared
# library is unloaded through dlclose().
#
# A call to this function must be the first entry
# in the .fini_array. See 3.3.5.3.C of C++ ABI
# standard.
#
__on_dlclose:
adr r0, 0f
ldr r0, [r0]
b __cxa_finalize
#ifndef __NR_tgkill
#define __NR_tgkill 268
0:
.long __dso_handle
.section .init_array, "aw"
.globl __INIT_ARRAY__
__INIT_ARRAY__:
.long -1
.section .fini_array, "aw"
.globl __FINI_ARRAY__
__FINI_ARRAY__:
.long -1
.long __on_dlclose
#ifdef CRT_LEGACY_WORKAROUND
#include "__dso_handle.S"
#else
#include "__dso_handle_so.S"
#endif
ENTRY(tgkill)
stmfd sp!, {r4-r7, ip, lr}
ldr r7, =__NR_tgkill
swi #0
ldmfd sp!, {r4-r7, ip, lr}
movs r0, r0
bxpl lr
b __set_syscall_errno
END(tgkill)
#include "atexit.S"

View File

@@ -1,58 +0,0 @@
/*
* Copyright (C) 2012 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.
*/
extern void __cxa_finalize(void *);
extern void *__dso_handle;
__attribute__((visibility("hidden"),destructor))
void __on_dlclose() {
__cxa_finalize(&__dso_handle);
}
/* CRT_LEGACY_WORKAROUND should only be defined when building
* this file as part of the platform's C library.
*
* The C library already defines a function named 'atexit()'
* for backwards compatibility with older NDK-generated binaries.
*
* For newer ones, 'atexit' is actually embedded in the C
* runtime objects that are linked into the final ELF
* binary (shared library or executable), and will call
* __cxa_atexit() in order to un-register any atexit()
* handler when a library is unloaded.
*
* This function must be global *and* hidden. Only the
* code inside the same ELF binary should be able to access it.
*/
#ifdef CRT_LEGACY_WORKAROUND
#include "__dso_handle.h"
#else
#include "__dso_handle_so.h"
#include "atexit.h"
#endif

View File

@@ -27,8 +27,7 @@
*/
.text
.align 4
.type __start,@function
.globl __start
.type _start,#function
.globl _start
# this is the small startup code that is first run when
@@ -44,103 +43,47 @@
# - address of an "onexit" function, not used on any
# platform supported by Bionic
#
# - address of the "main" function of the program.
# - address of the "main" function of the program. We
# can't hard-code it in the adr pseudo instruction
# so we use a tiny trampoline that will get relocated
# by the dynamic linker before this code runs
#
# - address of the constructor list
#
_start:
mov r0, sp
mov r1, #0
adr r2, 0f
adr r3, 1f
b __libc_init
.ent __start
__start:
_start:
bal 1f
1:
.set noreorder
.cpload $ra
.set reorder
0: b main
move $a0, $sp
move $a1, $0
la $a2, main
la $a3, 1f
subu $sp, 32
la $t9, __libc_init
j $t9
.end __start
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__
.long __FINI_ARRAY__
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__
.long __FINI_ARRAY__
.long __CTOR_LIST__
.section .preinit_array, "aw"
.type __PREINIT_ARRAY__, @object
.globl __PREINIT_ARRAY__
__PREINIT_ARRAY__:
.long -1
.section .init_array, "aw"
.type __INIT_ARRAY__, @object
.globl __INIT_ARRAY__
__INIT_ARRAY__:
.long -1
.section .fini_array, "aw"
.type __FINI_ARRAY__, @object
.globl __FINI_ARRAY__
__FINI_ARRAY__:
.long -1
.long __do_global_dtors_aux
.abicalls
.text
.align 2
.set nomips16
.ent __do_global_dtors_aux
.type __do_global_dtors_aux, @function
__do_global_dtors_aux:
.frame $sp,32,$31 # vars= 0, regs= 1/0, args= 16, gp= 8
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set nomacro
addiu $sp,$sp,-32
sw $31,28($sp)
.cprestore 16
lw $2,%got(completed.1269)($28)
lbu $2,%lo(completed.1269)($2)
bne $2,$0,$L8
nop
.section .ctors, "aw"
.globl __CTOR_LIST__
__CTOR_LIST__:
.long -1
$L4:
lw $2,%got(__cxa_finalize)($28)
beq $2,$0,$L6
nop
lw $2,%got(__dso_handle)($28)
lw $4,0($2)
lw $25,%call16(__cxa_finalize)($28)
.reloc 1f,R_MIPS_JALR,__cxa_finalize
1: jalr $25
nop
lw $28,16($sp)
$L6:
lw $2,%got(completed.1269)($28)
li $3,1 # 0x1
sb $3,%lo(completed.1269)($2)
$L8:
lw $31,28($sp)
addiu $sp,$sp,32
j $31
nop
.set macro
.set reorder
.end __do_global_dtors_aux
.size __do_global_dtors_aux, .-__do_global_dtors_aux
.local completed.1269
.comm completed.1269,1,1
.weak __cxa_finalize
#include "__dso_handle.S"
#include "atexit.S"

View File

@@ -35,6 +35,6 @@
.section .fini_array, "aw"
.long 0
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
.section .ctors, "aw"
.long 0

View File

@@ -26,6 +26,13 @@
* SUCH DAMAGE.
*/
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
/* This is the same than crtend.S except that a shared library
* cannot have a .preinit_array
*/
.section .init_array, "aw"
.long 0
.section .fini_array, "aw"
.long 0

View File

@@ -30,6 +30,22 @@
extern int __cxa_atexit(void (*)(void*), void*, void* );
/* Temporary hack: this variable should not be part of the C library
* itself, but placed in the .bss section of each executable or
* shared library instead.
*
* We keep it here temporarily until the build system has been
* modified properly to use crtbegin_so.S and crtend_so.S when
* generating shared libraries.
*
* It must be a 'weak' symbol to avoid conflicts with the definitions
* that have been moved to crtbegin_static.S and crtbegin_dynamic.S
*
* For the record, it is used for static C++ object construction
* and destruction. See http://www.codesourcery.com/public/cxx-abi/abi.html#dso-dtor
*/
void* __attribute__((weak)) __dso_handle;
/* The "C++ ABI for ARM" document states that static C++ constructors,
* which are called from the .init_array, should manually call
* __aeabi_atexit() to register static destructors explicitely.

View File

@@ -25,8 +25,12 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
typedef long unsigned int *_Unwind_Ptr;
#include <link.h>
/* Stubbed out in libdl and defined in the dynamic linker.
* Same semantics as __gnu_Unwind_Find_exidx().
*/
extern _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int *pcount);
/* For a given PC, find the .so that it belongs to.
* Returns the base address of the .ARM.exidx section

View File

@@ -25,8 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <link.h>
typedef long unsigned int *_Unwind_Ptr;
/* Find the .ARM.exidx section (which in the case of a static executable
* can be identified through its start and end symbols), and return its

View File

@@ -29,7 +29,6 @@
*/
#include <machine/asm.h>
#include <machine/cpu-features.h>
/*
* ffs - find first set bit, this algorithm isolates the first set
@@ -37,8 +36,8 @@
* 6 bits as an index into the table. This algorithm should be a win
* over the checking each bit in turn as per the C compiled version.
*
* Some newer ARM architectures have an instruction named
* CLZ (count leading Zero's) that is used
* under ARMv5 there's an instruction called CLZ (count leading Zero's) that
* could be used
*
* This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on
* 16 Feb 1994.
@@ -48,7 +47,7 @@ ENTRY(ffs)
/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
rsb r1, r0, #0
ands r0, r0, r1
#ifndef __ARM_HAVE_CLZ
#ifndef __ARM_ARCH_5__
/*
* now r0 has at most one set bit, call this X
* if X = 0, all further instructions are skipped
@@ -62,7 +61,6 @@ ENTRY(ffs)
ldrneb r0, [ r2, r0, lsr #26 ]
bx lr
END(ffs)
.text;
.type .L_ffs_table, _ASM_TYPE_OBJECT;
@@ -76,10 +74,9 @@ END(ffs)
.byte 10, 0, 0, 25, 0, 0, 21, 27 /* 40-47 */
.byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */
.byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */
#else /* !defined(__ARM_HAVE_CLZ) */
#else
clzne r0, r0
rsbne r0, r0, #32
bx lr
END(ffs)
#endif /* !defined(__ARM_HAVE_CLZ) */
#endif

View File

@@ -1,112 +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 <sys/linux-syscalls.h>
#include <machine/asm.h>
#include <machine/cpu-features.h>
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
/* __futex_wait(*ftx, val, *timespec) */
/* __futex_wake(*ftx, counter) */
/* __futex_syscall3(*ftx, op, val) */
/* __futex_syscall4(*ftx, op, val, *timespec) */
.global __futex_wait
.type __futex_wait, %function
.global __futex_wake
.type __futex_wake, %function
.global __futex_syscall3
.type __futex_syscall3, %function
.global __futex_syscall4
.type __futex_syscall4, %function
#if __ARM_EABI__
ENTRY(__futex_syscall3)
stmdb sp!, {r4, r7}
.save {r4, r7}
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
END(__futex_syscall3)
ENTRY(__futex_wait)
stmdb sp!, {r4, r7}
.save {r4, r7}
mov r3, r2
mov r2, r1
mov r1, #FUTEX_WAIT
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
END(__futex_wait)
ENTRY(__futex_wake)
.save {r4, r7}
stmdb sp!, {r4, r7}
mov r2, r1
mov r1, #FUTEX_WAKE
ldr r7, =__NR_futex
swi #0
ldmia sp!, {r4, r7}
bx lr
END(__futex_wake)
#else
ENTRY(__futex_syscall3)
swi #__NR_futex
bx lr
END(__futex_syscall3)
ENTRY(__futex_wait)
mov r3, r2
mov r2, r1
mov r1, #FUTEX_WAIT
swi #__NR_futex
bx lr
END(__futex_wait)
ENTRY(__futex_wake)
mov r2, r1
mov r1, #FUTEX_WAKE
swi #__NR_futex
bx lr
END(__futex_wake)
#endif
ENTRY(__futex_syscall4)
b __futex_syscall3
END(__futex_syscall4)

View File

@@ -33,13 +33,17 @@
of a corrupted malloc heap).
*/
#include <sys/linux-syscalls.h>
#include <machine/asm.h>
#ifndef __NR_kill
#define __NR_kill 37
#endif
ENTRY(kill)
.text
.type kill, #function
.globl kill
.align 4
kill:
stmfd sp!, {r4-r7, ip, lr}
ldr r7, =__NR_kill
swi #0
@@ -47,4 +51,3 @@ ENTRY(kill)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(kill)

View File

@@ -30,7 +30,7 @@
* dynamic linker to copy their definition into the final libc.so binary.
*
* They are required to ensure backwards binary compatibility with
* Android 1.5, 1.6 and even 3.0 system images. Some applications built
* Android 1.5 and Android 1.6 system images. Some applications built
* using the NDK require them to be here.
*
* Now, for a more elaborate description of the issue:
@@ -66,12 +66,7 @@
* any native shared library generated with it should now be safe from that
* problem. On the other hand, existing shared libraries distributed with
* applications that were generated with a previous version of the NDK
* still need all 1.5/1.6 helper functions in libc.so and libm.so
*
* After 3.2, the toolchain was updated again, adding __aeabi_f2uiz to the
* list of requirements. Technically, this is due to mis-linked NDK libraries
* but it is easier to add a single function here than asking several app
* developers to fix their build.
* still need all 1.5/1.6 helper functions in libc.so and libn.so
*
* Final note: some of the functions below should really be in libm.so to
* completely reflect the state of 1.5/1.6 system images. However,
@@ -101,7 +96,6 @@
XX(__aeabi_dsub) \
XX(__aeabi_f2d) \
XX(__aeabi_f2iz) \
XX(__aeabi_f2uiz) \
XX(__aeabi_fadd) \
XX(__aeabi_fcmpun) \
XX(__aeabi_fdiv) \
@@ -113,8 +107,6 @@
XX(__aeabi_l2d) \
XX(__aeabi_l2f) \
XX(__aeabi_lmul) \
XX(__aeabi_llsl) \
XX(__aeabi_llsr) \
XX(__aeabi_ui2d) \
XX(__aeabi_ui2f) \
XX(__aeabi_ul2d) \

View File

@@ -27,7 +27,12 @@
*/
#include <machine/cpu-features.h>
#include <machine/asm.h>
.text
.global memcmp
.type memcmp, %function
.align 4
/*
* Optimized memcmp() for ARM9.
@@ -38,7 +43,8 @@
* (2) The loads are scheduled in a way they won't stall
*/
ENTRY(memcmp)
memcmp:
.fnstart
PLD (r0, #0)
PLD (r1, #0)
@@ -170,7 +176,7 @@ ENTRY(memcmp)
9: /* restore registers and return */
ldmfd sp!, {r4, lr}
bx lr
END(memcmp)
.fnend

View File

@@ -27,7 +27,12 @@
*/
#include <machine/cpu-features.h>
#include <machine/asm.h>
.text
.global __memcmp16
.type __memcmp16, %function
.align 4
/*
* Optimized memcmp16() for ARM9.
@@ -38,7 +43,8 @@
* (2) The loads are scheduled in a way they won't stall
*/
ENTRY(__memcmp16)
__memcmp16:
.fnstart
PLD (r0, #0)
PLD (r1, #0)
@@ -89,6 +95,8 @@ ENTRY(__memcmp16)
/* restore registers and return */
ldmnefd sp!, {r4, lr}
bxne lr
.fnend
0: /* here the first pointer is aligned, and we have at least 3 words
@@ -229,4 +237,3 @@ ENTRY(__memcmp16)
7: /* fix up the 2 pointers and fallthrough... */
sub r1, r1, #2
b 2b
END(__memcmp16)

View File

@@ -27,35 +27,34 @@
*/
#include <machine/cpu-features.h>
#include <machine/asm.h>
#if defined(__ARM_NEON__) && !defined(ARCH_ARM_USE_NON_NEON_MEMCPY)
#if defined(__ARM_NEON__)
.text
.fpu neon
#ifdef HAVE_32_BYTE_CACHE_LINE
/* a prefetch distance of 2 cache-lines */
#define CACHE_LINE_SIZE 32
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*2)
#else
.global memcpy
.type memcpy, %function
.align 4
/* a prefetch distance of 4 cache-lines works best experimentally */
#define CACHE_LINE_SIZE 64
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4)
#endif
ENTRY(memcpy)
memcpy:
.fnstart
.save {r0, lr}
stmfd sp!, {r0, lr}
/* start preloading as early as possible */
pld [r1, #(CACHE_LINE_SIZE*0)]
stmfd sp!, {r0, lr}
pld [r1, #(CACHE_LINE_SIZE*1)]
/* do we have at least 16-bytes to copy (needed for alignment below) */
cmp r2, #16
blo 5f
/* align destination to cache-line for the write-buffer */
/* align destination to half cache-line for the write-buffer */
rsb r3, r0, #0
ands r3, r3, #0xF
beq 0f
@@ -84,26 +83,6 @@ ENTRY(memcpy)
pld [r1, #(CACHE_LINE_SIZE*0)]
pld [r1, #(CACHE_LINE_SIZE*1)]
#ifdef HAVE_32_BYTE_CACHE_LINE
/* make sure we have at least 32 bytes to copy */
subs r2, r2, #32
blo 4f
/* preload all the cache lines we need.
* NOTE: the number of pld below depends on PREFETCH_DISTANCE,
* ideally would would increase the distance in the main loop to
* avoid the goofy code below. In practice this doesn't seem to make
* a big difference.
*/
pld [r1, #(PREFETCH_DISTANCE)]
1: /* The main loop copies 32 bytes at a time */
vld1.8 {d0 - d3}, [r1]!
pld [r1, #(PREFETCH_DISTANCE)]
subs r2, r2, #32
vst1.8 {d0 - d3}, [r0, :128]!
bhs 1b
#else
/* make sure we have at least 64 bytes to copy */
subs r2, r2, #64
blo 2f
@@ -137,7 +116,7 @@ ENTRY(memcpy)
subs r2, r2, #32
vst1.8 {d0 - d3}, [r0, :128]!
bhs 3b
#endif
4: /* less than 32 left */
add r2, r2, #32
tst r2, #0x10
@@ -164,12 +143,18 @@ ENTRY(memcpy)
ldmfd sp!, {r0, lr}
bx lr
END(memcpy)
.fnend
#else /* __ARM_ARCH__ < 7 */
.text
.global memcpy
.type memcpy, %function
.align 4
/*
* Optimized memcpy() for ARM.
*
@@ -177,11 +162,12 @@ END(memcpy)
* so we have to preserve R0.
*/
ENTRY(memcpy)
memcpy:
/* The stack must always be 64-bits aligned to be compliant with the
* ARM ABI. Since we have to save R0, we might as well save R4
* which we can use for better pipelining of the reads below
*/
.fnstart
.save {r0, r4, lr}
stmfd sp!, {r0, r4, lr}
/* Making room for r5-r11 which will be spilled later */
@@ -518,7 +504,7 @@ copy_last_3_and_return:
add sp, sp, #28
ldmfd sp!, {r0, r4, lr}
bx lr
END(memcpy)
.fnend
#endif /* __ARM_ARCH__ < 7 */

View File

@@ -25,8 +25,15 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
.text
#include <machine/asm.h>
.global memset
.type memset, %function
.global bzero
.type bzero, %function
.align
/*
* Optimized memset() for ARM.
@@ -34,15 +41,15 @@
* memset() returns its first argument.
*/
ENTRY(bzero)
bzero:
mov r2, r1
mov r1, #0
END(bzero)
ENTRY(memset)
memset:
/* compute the offset to align the destination
* offset = (4-(src&3))&3 = -src & 3
*/
.fnstart
.save {r0, r4-r7, lr}
stmfd sp!, {r0, r4-r7, lr}
rsb r3, r0, #0
@@ -106,4 +113,5 @@ ENTRY(memset)
strcsb r1, [r0]
ldmfd sp!, {r0, r4-r7, lr}
bx lr
END(memset)
.fnend

View File

@@ -79,7 +79,6 @@ ENTRY(setjmp)
mov r0, #0x00000000
bx lr
END(setjmp)
.Lsetjmp_magic:
.word _JB_MAGIC_SETJMP
@@ -139,4 +138,3 @@ botch:
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
bl PIC_SYM(_C_LABEL(abort), PLT)
b . - 8 /* Cannot get here */
END(longjmp)

View File

@@ -33,8 +33,6 @@
* SUCH DAMAGE.
*/
#define _ALIGN_TEXT .align 0
#include <machine/asm.h>
#include <machine/setjmp.h>
@@ -52,7 +50,6 @@ ENTRY(sigsetjmp)
teq r1, #0
beq PIC_SYM(_C_LABEL(_setjmp), PLT)
b PIC_SYM(_C_LABEL(setjmp), PLT)
END(sigsetjmp)
.L_setjmp_magic:
.word _JB_MAGIC__SETJMP
@@ -63,4 +60,3 @@ ENTRY(siglongjmp)
teq r2, r3
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
b PIC_SYM(_C_LABEL(longjmp), PLT)
END(siglongjmp)

View File

@@ -1,317 +0,0 @@
/*
* Copyright (c) 2011 The Android Open Source Project
* Copyright (c) 2008 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. The name of the company may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <machine/cpu-features.h>
#include <machine/asm.h>
.text
#ifdef __ARMEB__
#define SHFT2LSB lsl
#define SHFT2LSBEQ lsleq
#define SHFT2MSB lsr
#define SHFT2MSBEQ lsreq
#define MSB 0x000000ff
#define LSB 0xff000000
#else
#define SHFT2LSB lsr
#define SHFT2LSBEQ lsreq
#define SHFT2MSB lsl
#define SHFT2MSBEQ lsleq
#define MSB 0xff000000
#define LSB 0x000000ff
#endif
#define magic1(REG) REG
#define magic2(REG) REG, lsl #7
ENTRY(strcmp)
PLD(r0, #0)
PLD(r1, #0)
eor r2, r0, r1
tst r2, #3
/* Strings not at same byte offset from a word boundary. */
bne .Lstrcmp_unaligned
ands r2, r0, #3
bic r0, r0, #3
bic r1, r1, #3
ldr ip, [r0], #4
it eq
ldreq r3, [r1], #4
beq 1f
/* Although s1 and s2 have identical initial alignment, they are
* not currently word aligned. Rather than comparing bytes,
* make sure that any bytes fetched from before the addressed
* bytes are forced to 0xff. Then they will always compare
* equal.
*/
eor r2, r2, #3
lsl r2, r2, #3
mvn r3, #MSB
SHFT2LSB r2, r3, r2
ldr r3, [r1], #4
orr ip, ip, r2
orr r3, r3, r2
1:
/* Load the 'magic' constant 0x01010101. */
str r4, [sp, #-4]!
mov r4, #1
orr r4, r4, r4, lsl #8
orr r4, r4, r4, lsl #16
.p2align 2
4:
PLD(r0, #8)
PLD(r1, #8)
sub r2, ip, magic1(r4)
cmp ip, r3
itttt eq
/* check for any zero bytes in first word */
biceq r2, r2, ip
tsteq r2, magic2(r4)
ldreq ip, [r0], #4
ldreq r3, [r1], #4
beq 4b
2:
/* There's a zero or a different byte in the word */
SHFT2MSB r0, ip, #24
SHFT2LSB ip, ip, #8
cmp r0, #1
it cs
cmpcs r0, r3, SHFT2MSB #24
it eq
SHFT2LSBEQ r3, r3, #8
beq 2b
/* On a big-endian machine, r0 contains the desired byte in bits
* 0-7; on a little-endian machine they are in bits 24-31. In
* both cases the other bits in r0 are all zero. For r3 the
* interesting byte is at the other end of the word, but the
* other bits are not necessarily zero. We need a signed result
* representing the differnece in the unsigned bytes, so for the
* little-endian case we can't just shift the interesting bits up.
*/
#ifdef __ARMEB__
sub r0, r0, r3, lsr #24
#else
and r3, r3, #255
/* No RSB instruction in Thumb2 */
#ifdef __thumb2__
lsr r0, r0, #24
sub r0, r0, r3
#else
rsb r0, r3, r0, lsr #24
#endif
#endif
ldr r4, [sp], #4
bx lr
.Lstrcmp_unaligned:
wp1 .req r0
wp2 .req r1
b1 .req r2
w1 .req r4
w2 .req r5
t1 .req ip
@ r3 is scratch
/* First of all, compare bytes until wp1(sp1) is word-aligned. */
1:
tst wp1, #3
beq 2f
ldrb r2, [wp1], #1
ldrb r3, [wp2], #1
cmp r2, #1
it cs
cmpcs r2, r3
beq 1b
sub r0, r2, r3
bx lr
2:
str r5, [sp, #-4]!
str r4, [sp, #-4]!
mov b1, #1
orr b1, b1, b1, lsl #8
orr b1, b1, b1, lsl #16
and t1, wp2, #3
bic wp2, wp2, #3
ldr w1, [wp1], #4
ldr w2, [wp2], #4
cmp t1, #2
beq 2f
bhi 3f
/* Critical inner Loop: Block with 3 bytes initial overlap */
.p2align 2
1:
bic t1, w1, #MSB
cmp t1, w2, SHFT2LSB #8
sub r3, w1, b1
bic r3, r3, w1
bne 4f
ands r3, r3, b1, lsl #7
it eq
ldreq w2, [wp2], #4
bne 5f
eor t1, t1, w1
cmp t1, w2, SHFT2MSB #24
bne 6f
ldr w1, [wp1], #4
b 1b
4:
SHFT2LSB w2, w2, #8
b 8f
5:
#ifdef __ARMEB__
/* The syndrome value may contain false ones if the string ends
* with the bytes 0x01 0x00
*/
tst w1, #0xff000000
itt ne
tstne w1, #0x00ff0000
tstne w1, #0x0000ff00
beq 7f
#else
bics r3, r3, #0xff000000
bne 7f
#endif
ldrb w2, [wp2]
SHFT2LSB t1, w1, #24
#ifdef __ARMEB__
lsl w2, w2, #24
#endif
b 8f
6:
SHFT2LSB t1, w1, #24
and w2, w2, #LSB
b 8f
/* Critical inner Loop: Block with 2 bytes initial overlap */
.p2align 2
2:
SHFT2MSB t1, w1, #16
sub r3, w1, b1
SHFT2LSB t1, t1, #16
bic r3, r3, w1
cmp t1, w2, SHFT2LSB #16
bne 4f
ands r3, r3, b1, lsl #7
it eq
ldreq w2, [wp2], #4
bne 5f
eor t1, t1, w1
cmp t1, w2, SHFT2MSB #16
bne 6f
ldr w1, [wp1], #4
b 2b
5:
#ifdef __ARMEB__
/* The syndrome value may contain false ones if the string ends
* with the bytes 0x01 0x00
*/
tst w1, #0xff000000
it ne
tstne w1, #0x00ff0000
beq 7f
#else
lsls r3, r3, #16
bne 7f
#endif
ldrh w2, [wp2]
SHFT2LSB t1, w1, #16
#ifdef __ARMEB__
lsl w2, w2, #16
#endif
b 8f
6:
SHFT2MSB w2, w2, #16
SHFT2LSB t1, w1, #16
4:
SHFT2LSB w2, w2, #16
b 8f
/* Critical inner Loop: Block with 1 byte initial overlap */
.p2align 2
3:
and t1, w1, #LSB
cmp t1, w2, SHFT2LSB #24
sub r3, w1, b1
bic r3, r3, w1
bne 4f
ands r3, r3, b1, lsl #7
it eq
ldreq w2, [wp2], #4
bne 5f
eor t1, t1, w1
cmp t1, w2, SHFT2MSB #8
bne 6f
ldr w1, [wp1], #4
b 3b
4:
SHFT2LSB w2, w2, #24
b 8f
5:
/* The syndrome value may contain false ones if the string ends
* with the bytes 0x01 0x00
*/
tst w1, #LSB
beq 7f
ldr w2, [wp2], #4
6:
SHFT2LSB t1, w1, #8
bic w2, w2, #MSB
b 8f
7:
mov r0, #0
ldr r4, [sp], #4
ldr r5, [sp], #4
bx lr
8:
and r2, t1, #LSB
and r0, w2, #LSB
cmp r0, #1
it cs
cmpcs r0, r2
itt eq
SHFT2LSBEQ t1, t1, #8
SHFT2LSBEQ w2, w2, #8
beq 8b
sub r0, r2, r0
ldr r4, [sp], #4
ldr r5, [sp], #4
bx lr
END(strcmp)

View File

@@ -1,133 +0,0 @@
/*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (c) 2008 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. The name of the company may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
*
* Android adaptation and tweak by Jim Huang <jserv@0xlab.org>.
*/
#include <machine/cpu-features.h>
#include <machine/asm.h>
ENTRY(strcpy)
PLD(r1, #0)
eor r2, r0, r1
mov ip, r0
tst r2, #3
bne 4f
tst r1, #3
bne 3f
5:
str r5, [sp, #-4]!
mov r5, #0x01
orr r5, r5, r5, lsl #8
orr r5, r5, r5, lsl #16
str r4, [sp, #-4]!
tst r1, #4
ldr r3, [r1], #4
beq 2f
sub r2, r3, r5
bics r2, r2, r3
tst r2, r5, lsl #7
itt eq
streq r3, [ip], #4
ldreq r3, [r1], #4
bne 1f
/* Inner loop. We now know that r1 is 64-bit aligned, so we
can safely fetch up to two words. This allows us to avoid
load stalls. */
.p2align 2
2:
PLD(r1, #8)
ldr r4, [r1], #4
sub r2, r3, r5
bics r2, r2, r3
tst r2, r5, lsl #7
sub r2, r4, r5
bne 1f
str r3, [ip], #4
bics r2, r2, r4
tst r2, r5, lsl #7
itt eq
ldreq r3, [r1], #4
streq r4, [ip], #4
beq 2b
mov r3, r4
1:
#ifdef __ARMEB__
rors r3, r3, #24
#endif
strb r3, [ip], #1
tst r3, #0xff
#ifdef __ARMEL__
ror r3, r3, #8
#endif
bne 1b
ldr r4, [sp], #4
ldr r5, [sp], #4
bx lr
/* Strings have the same offset from word alignment, but it's
not zero. */
3:
tst r1, #1
beq 1f
ldrb r2, [r1], #1
strb r2, [ip], #1
cmp r2, #0
it eq
bxeq lr
1:
tst r1, #2
beq 5b
ldrh r2, [r1], #2
#ifdef __ARMEB__
tst r2, #0xff00
iteet ne
strneh r2, [ip], #2
lsreq r2, r2, #8
streqb r2, [ip]
tstne r2, #0xff
#else
tst r2, #0xff
itet ne
strneh r2, [ip], #2
streqb r2, [ip]
tstne r2, #0xff00
#endif
bne 5b
bx lr
/* src and dst do not have a common word-alignement. Fall back to
byte copying. */
4:
ldrb r2, [r1], #1
strb r2, [ip], #1
cmp r2, #0
bne 4b
bx lr
END(strcpy)

View File

@@ -32,15 +32,18 @@
abort due to a fatal runtime error (e.g. detection
of a corrupted malloc heap).
*/
#include <sys/linux-syscalls.h>
#include <machine/asm.h>
#ifndef __NR_tkill
#define __NR_tkill 238
#endif
ENTRY(tkill)
.text
.type tkill, #function
.globl tkill
.align 4
tkill:
stmfd sp!, {r4-r7, ip, lr}
ldr r7, =__NR_tkill
swi #0
@@ -48,4 +51,3 @@ ENTRY(tkill)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(tkill)

View File

@@ -1,89 +1,10 @@
/* $OpenBSD: endian.h,v 1.3 2005/12/13 00:35:23 millert Exp $ */
/*
* Copyright (C) 2010 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.
*/
#ifndef _ARM_ENDIAN_H_
#define _ARM_ENDIAN_H_
#ifdef __GNUC__
/*
* REV and REV16 weren't available on ARM5 or ARM4.
* We don't include <machine/cpu-features.h> because it pollutes the
* namespace with macros like PLD.
*/
#if !defined __ARM_ARCH_5__ && !defined __ARM_ARCH_5T__ && \
!defined __ARM_ARCH_5TE__ && !defined __ARM_ARCH_5TEJ__ && \
!defined __ARM_ARCH_4T__ && !defined __ARM_ARCH_4__
/* According to RealView Assembler User's Guide, REV and REV16 are available
* in Thumb code and 16-bit instructions when used in Thumb-2 code.
*
* REV Rd, Rm
* Rd and Rm must both be Lo registers.
*
* REV16 Rd, Rm
* Rd and Rm must both be Lo registers.
*
* The +l constraint takes care of this without constraining us in ARM mode.
*/
#define __swap16md(x) ({ \
register u_int16_t _x = (x); \
__asm volatile ("rev16 %0, %0" : "+l" (_x)); \
_x; \
})
#define __swap32md(x) ({ \
register u_int32_t _x = (x); \
__asm volatile ("rev %0, %0" : "+l" (_x)); \
_x; \
})
#define __swap64md(x) ({ \
u_int64_t _swap64md_x = (x); \
(u_int64_t) __swap32md(_swap64md_x >> 32) | \
(u_int64_t) __swap32md(_swap64md_x & 0xffffffff) << 32; \
})
/* Tell sys/endian.h we have MD variants of the swap macros. */
#define MD_SWAP
#endif /* __ARM_ARCH__ */
#endif /* __GNUC__ */
#ifdef __ARMEB__
#define _BYTE_ORDER _BIG_ENDIAN
#else
#define _BYTE_ORDER _LITTLE_ENDIAN
#endif
#define __STRICT_ALIGNMENT
#define __STRICT_ALIGNMENT
#include <sys/types.h>
#include <sys/endian.h>
#endif /* !_ARM_ENDIAN_H_ */

View File

@@ -70,13 +70,7 @@
#define _ASM_TYPE_FUNCTION #function
#define _ASM_TYPE_OBJECT #object
#define _ENTRY(x) \
.text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .fnstart
#define _ASM_SIZE(x) .size x, .-x;
#define _END(x) \
.fnend; \
_ASM_SIZE(x)
.text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
#ifdef GPROF
# ifdef __ELF__
@@ -92,16 +86,8 @@
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
#define END(y) _END(_C_LABEL(y))
#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
#define ASEND(y) _END(_ASM_LABEL(y))
#ifdef __ELF__
#define ENTRY_PRIVATE(y) ENTRY(y); .hidden _C_LABEL(y)
#else
#define ENTRY_PRIVATE(y) ENTRY(y)
#endif
#define ASMSTR .asciz

View File

@@ -185,7 +185,6 @@
#endif
/* Assembly-only macros */
#ifdef __ASSEMBLY__
/* define a handy PLD(address) macro since the cache preload
* is an optional opcode
@@ -196,6 +195,4 @@
# define PLD(reg,offset) /* nothing */
#endif
#endif /* ! __ASSEMBLY__ */
#endif /* _ARM_MACHINE_CPU_FEATURES_H */

View File

@@ -14,11 +14,9 @@ syscall_src += arch-arm/syscalls/getegid.S
syscall_src += arch-arm/syscalls/getresuid.S
syscall_src += arch-arm/syscalls/getresgid.S
syscall_src += arch-arm/syscalls/gettid.S
syscall_src += arch-arm/syscalls/readahead.S
syscall_src += arch-arm/syscalls/getgroups.S
syscall_src += arch-arm/syscalls/getpgid.S
syscall_src += arch-arm/syscalls/getppid.S
syscall_src += arch-arm/syscalls/getsid.S
syscall_src += arch-arm/syscalls/setsid.S
syscall_src += arch-arm/syscalls/setgid.S
syscall_src += arch-arm/syscalls/__setreuid.S
@@ -43,8 +41,8 @@ syscall_src += arch-arm/syscalls/sigaltstack.S
syscall_src += arch-arm/syscalls/acct.S
syscall_src += arch-arm/syscalls/read.S
syscall_src += arch-arm/syscalls/write.S
syscall_src += arch-arm/syscalls/pread64.S
syscall_src += arch-arm/syscalls/pwrite64.S
syscall_src += arch-arm/syscalls/__pread64.S
syscall_src += arch-arm/syscalls/__pwrite64.S
syscall_src += arch-arm/syscalls/__open.S
syscall_src += arch-arm/syscalls/__openat.S
syscall_src += arch-arm/syscalls/close.S
@@ -59,8 +57,6 @@ syscall_src += arch-arm/syscalls/mprotect.S
syscall_src += arch-arm/syscalls/madvise.S
syscall_src += arch-arm/syscalls/mlock.S
syscall_src += arch-arm/syscalls/munlock.S
syscall_src += arch-arm/syscalls/mlockall.S
syscall_src += arch-arm/syscalls/munlockall.S
syscall_src += arch-arm/syscalls/mincore.S
syscall_src += arch-arm/syscalls/__ioctl.S
syscall_src += arch-arm/syscalls/readv.S
@@ -74,7 +70,6 @@ syscall_src += arch-arm/syscalls/pipe2.S
syscall_src += arch-arm/syscalls/dup2.S
syscall_src += arch-arm/syscalls/select.S
syscall_src += arch-arm/syscalls/ftruncate.S
syscall_src += arch-arm/syscalls/ftruncate64.S
syscall_src += arch-arm/syscalls/getdents.S
syscall_src += arch-arm/syscalls/fsync.S
syscall_src += arch-arm/syscalls/fdatasync.S
@@ -88,10 +83,6 @@ syscall_src += arch-arm/syscalls/mkdirat.S
syscall_src += arch-arm/syscalls/fchownat.S
syscall_src += arch-arm/syscalls/fchmodat.S
syscall_src += arch-arm/syscalls/renameat.S
syscall_src += arch-arm/syscalls/fsetxattr.S
syscall_src += arch-arm/syscalls/fgetxattr.S
syscall_src += arch-arm/syscalls/flistxattr.S
syscall_src += arch-arm/syscalls/fremovexattr.S
syscall_src += arch-arm/syscalls/link.S
syscall_src += arch-arm/syscalls/unlink.S
syscall_src += arch-arm/syscalls/unlinkat.S
@@ -111,20 +102,10 @@ syscall_src += arch-arm/syscalls/rmdir.S
syscall_src += arch-arm/syscalls/rename.S
syscall_src += arch-arm/syscalls/__getcwd.S
syscall_src += arch-arm/syscalls/access.S
syscall_src += arch-arm/syscalls/faccessat.S
syscall_src += arch-arm/syscalls/symlink.S
syscall_src += arch-arm/syscalls/fchdir.S
syscall_src += arch-arm/syscalls/truncate.S
syscall_src += arch-arm/syscalls/setxattr.S
syscall_src += arch-arm/syscalls/lsetxattr.S
syscall_src += arch-arm/syscalls/getxattr.S
syscall_src += arch-arm/syscalls/lgetxattr.S
syscall_src += arch-arm/syscalls/listxattr.S
syscall_src += arch-arm/syscalls/llistxattr.S
syscall_src += arch-arm/syscalls/removexattr.S
syscall_src += arch-arm/syscalls/lremovexattr.S
syscall_src += arch-arm/syscalls/__statfs64.S
syscall_src += arch-arm/syscalls/unshare.S
syscall_src += arch-arm/syscalls/pause.S
syscall_src += arch-arm/syscalls/gettimeofday.S
syscall_src += arch-arm/syscalls/settimeofday.S
@@ -142,7 +123,6 @@ syscall_src += arch-arm/syscalls/__timer_gettime.S
syscall_src += arch-arm/syscalls/__timer_getoverrun.S
syscall_src += arch-arm/syscalls/__timer_delete.S
syscall_src += arch-arm/syscalls/utimes.S
syscall_src += arch-arm/syscalls/utimensat.S
syscall_src += arch-arm/syscalls/sigaction.S
syscall_src += arch-arm/syscalls/sigprocmask.S
syscall_src += arch-arm/syscalls/__sigsuspend.S
@@ -173,9 +153,6 @@ syscall_src += arch-arm/syscalls/sched_getparam.S
syscall_src += arch-arm/syscalls/sched_get_priority_max.S
syscall_src += arch-arm/syscalls/sched_get_priority_min.S
syscall_src += arch-arm/syscalls/sched_rr_get_interval.S
syscall_src += arch-arm/syscalls/sched_setaffinity.S
syscall_src += arch-arm/syscalls/__sched_getaffinity.S
syscall_src += arch-arm/syscalls/__getcpu.S
syscall_src += arch-arm/syscalls/ioprio_set.S
syscall_src += arch-arm/syscalls/ioprio_get.S
syscall_src += arch-arm/syscalls/uname.S
@@ -187,8 +164,6 @@ syscall_src += arch-arm/syscalls/init_module.S
syscall_src += arch-arm/syscalls/delete_module.S
syscall_src += arch-arm/syscalls/klogctl.S
syscall_src += arch-arm/syscalls/sysinfo.S
syscall_src += arch-arm/syscalls/personality.S
syscall_src += arch-arm/syscalls/perf_event_open.S
syscall_src += arch-arm/syscalls/futex.S
syscall_src += arch-arm/syscalls/epoll_create.S
syscall_src += arch-arm/syscalls/epoll_ctl.S

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__brk)
.text
.type __brk, #function
.globl __brk
.align 4
.fnstart
__brk:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_brk
@@ -11,4 +16,4 @@ ENTRY(__brk)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__brk)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__fcntl)
.text
.type __fcntl, #function
.globl __fcntl
.align 4
.fnstart
__fcntl:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_fcntl
@@ -11,4 +16,4 @@ ENTRY(__fcntl)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__fcntl)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__fcntl64)
.text
.type __fcntl64, #function
.globl __fcntl64
.align 4
.fnstart
__fcntl64:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_fcntl64
@@ -11,4 +16,4 @@ ENTRY(__fcntl64)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__fcntl64)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__fork)
.text
.type __fork, #function
.globl __fork
.align 4
.fnstart
__fork:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_fork
@@ -11,4 +16,4 @@ ENTRY(__fork)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__fork)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__fstatfs64)
.text
.type __fstatfs64, #function
.globl __fstatfs64
.align 4
.fnstart
__fstatfs64:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_fstatfs64
@@ -11,4 +16,4 @@ ENTRY(__fstatfs64)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__fstatfs64)
.fnend

View File

@@ -1,14 +0,0 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__getcpu)
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_getcpu
swi #0
ldmfd sp!, {r4, r7}
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__getcpu)

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__getcwd)
.text
.type __getcwd, #function
.globl __getcwd
.align 4
.fnstart
__getcwd:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_getcwd
@@ -11,4 +16,4 @@ ENTRY(__getcwd)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__getcwd)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__getpriority)
.text
.type __getpriority, #function
.globl __getpriority
.align 4
.fnstart
__getpriority:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_getpriority
@@ -11,4 +16,4 @@ ENTRY(__getpriority)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__getpriority)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__ioctl)
.text
.type __ioctl, #function
.globl __ioctl
.align 4
.fnstart
__ioctl:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_ioctl
@@ -11,4 +16,4 @@ ENTRY(__ioctl)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__ioctl)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__llseek)
.text
.type __llseek, #function
.globl __llseek
.align 4
.fnstart
__llseek:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(__llseek)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__llseek)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__mmap2)
.text
.type __mmap2, #function
.globl __mmap2
.align 4
.fnstart
__mmap2:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(__mmap2)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__mmap2)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__open)
.text
.type __open, #function
.globl __open
.align 4
.fnstart
__open:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_open
@@ -11,4 +16,4 @@ ENTRY(__open)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__open)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__openat)
.text
.type __openat, #function
.globl __openat
.align 4
.fnstart
__openat:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_openat
@@ -11,4 +16,4 @@ ENTRY(__openat)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__openat)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(pread64)
.text
.type __pread64, #function
.globl __pread64
.align 4
.fnstart
__pread64:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(pread64)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(pread64)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__ptrace)
.text
.type __ptrace, #function
.globl __ptrace
.align 4
.fnstart
__ptrace:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_ptrace
@@ -11,4 +16,4 @@ ENTRY(__ptrace)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__ptrace)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(pwrite64)
.text
.type __pwrite64, #function
.globl __pwrite64
.align 4
.fnstart
__pwrite64:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(pwrite64)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(pwrite64)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__reboot)
.text
.type __reboot, #function
.globl __reboot
.align 4
.fnstart
__reboot:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_reboot
@@ -11,4 +16,4 @@ ENTRY(__reboot)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__reboot)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__rt_sigaction)
.text
.type __rt_sigaction, #function
.globl __rt_sigaction
.align 4
.fnstart
__rt_sigaction:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_rt_sigaction
@@ -11,4 +16,4 @@ ENTRY(__rt_sigaction)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__rt_sigaction)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__rt_sigprocmask)
.text
.type __rt_sigprocmask, #function
.globl __rt_sigprocmask
.align 4
.fnstart
__rt_sigprocmask:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_rt_sigprocmask
@@ -11,4 +16,4 @@ ENTRY(__rt_sigprocmask)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__rt_sigprocmask)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__rt_sigtimedwait)
.text
.type __rt_sigtimedwait, #function
.globl __rt_sigtimedwait
.align 4
.fnstart
__rt_sigtimedwait:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_rt_sigtimedwait
@@ -11,4 +16,4 @@ ENTRY(__rt_sigtimedwait)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__rt_sigtimedwait)
.fnend

View File

@@ -1,14 +0,0 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__sched_getaffinity)
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_sched_getaffinity
swi #0
ldmfd sp!, {r4, r7}
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__sched_getaffinity)

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__set_tls)
.text
.type __set_tls, #function
.globl __set_tls
.align 4
.fnstart
__set_tls:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_ARM_set_tls
@@ -11,4 +16,4 @@ ENTRY(__set_tls)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__set_tls)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__setresuid)
.text
.type __setresuid, #function
.globl __setresuid
.align 4
.fnstart
__setresuid:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_setresuid32
@@ -11,4 +16,4 @@ ENTRY(__setresuid)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__setresuid)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__setreuid)
.text
.type __setreuid, #function
.globl __setreuid
.align 4
.fnstart
__setreuid:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_setreuid32
@@ -11,4 +16,4 @@ ENTRY(__setreuid)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__setreuid)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__setuid)
.text
.type __setuid, #function
.globl __setuid
.align 4
.fnstart
__setuid:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_setuid32
@@ -11,4 +16,4 @@ ENTRY(__setuid)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__setuid)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__sigsuspend)
.text
.type __sigsuspend, #function
.globl __sigsuspend
.align 4
.fnstart
__sigsuspend:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_sigsuspend
@@ -11,4 +16,4 @@ ENTRY(__sigsuspend)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__sigsuspend)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__statfs64)
.text
.type __statfs64, #function
.globl __statfs64
.align 4
.fnstart
__statfs64:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_statfs64
@@ -11,4 +16,4 @@ ENTRY(__statfs64)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__statfs64)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__sys_clone)
.text
.type __sys_clone, #function
.globl __sys_clone
.align 4
.fnstart
__sys_clone:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(__sys_clone)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__sys_clone)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__syslog)
.text
.type __syslog, #function
.globl __syslog
.align 4
.fnstart
__syslog:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_syslog
@@ -11,4 +16,4 @@ ENTRY(__syslog)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__syslog)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__timer_create)
.text
.type __timer_create, #function
.globl __timer_create
.align 4
.fnstart
__timer_create:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_timer_create
@@ -11,4 +16,4 @@ ENTRY(__timer_create)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__timer_create)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__timer_delete)
.text
.type __timer_delete, #function
.globl __timer_delete
.align 4
.fnstart
__timer_delete:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_timer_delete
@@ -11,4 +16,4 @@ ENTRY(__timer_delete)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__timer_delete)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__timer_getoverrun)
.text
.type __timer_getoverrun, #function
.globl __timer_getoverrun
.align 4
.fnstart
__timer_getoverrun:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_timer_getoverrun
@@ -11,4 +16,4 @@ ENTRY(__timer_getoverrun)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__timer_getoverrun)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__timer_gettime)
.text
.type __timer_gettime, #function
.globl __timer_gettime
.align 4
.fnstart
__timer_gettime:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_timer_gettime
@@ -11,4 +16,4 @@ ENTRY(__timer_gettime)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__timer_gettime)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__timer_settime)
.text
.type __timer_settime, #function
.globl __timer_settime
.align 4
.fnstart
__timer_settime:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_timer_settime
@@ -11,4 +16,4 @@ ENTRY(__timer_settime)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__timer_settime)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__wait4)
.text
.type __wait4, #function
.globl __wait4
.align 4
.fnstart
__wait4:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_wait4
@@ -11,4 +16,4 @@ ENTRY(__wait4)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__wait4)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(__waitid)
.text
.type __waitid, #function
.globl __waitid
.align 4
.fnstart
__waitid:
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -13,4 +18,4 @@ ENTRY(__waitid)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(__waitid)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(_exit)
.text
.type _exit, #function
.globl _exit
.align 4
.fnstart
_exit:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_exit_group
@@ -11,4 +16,4 @@ ENTRY(_exit)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(_exit)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(_exit_thread)
.text
.type _exit_thread, #function
.globl _exit_thread
.align 4
.fnstart
_exit_thread:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_exit
@@ -11,4 +16,4 @@ ENTRY(_exit_thread)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(_exit_thread)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(accept)
.text
.type accept, #function
.globl accept
.align 4
.fnstart
accept:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_accept
@@ -11,4 +16,4 @@ ENTRY(accept)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(accept)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(access)
.text
.type access, #function
.globl access
.align 4
.fnstart
access:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_access
@@ -11,4 +16,4 @@ ENTRY(access)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(access)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(acct)
.text
.type acct, #function
.globl acct
.align 4
.fnstart
acct:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_acct
@@ -11,4 +16,4 @@ ENTRY(acct)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(acct)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(bind)
.text
.type bind, #function
.globl bind
.align 4
.fnstart
bind:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_bind
@@ -11,4 +16,4 @@ ENTRY(bind)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(bind)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(cacheflush)
.text
.type cacheflush, #function
.globl cacheflush
.align 4
.fnstart
cacheflush:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_ARM_cacheflush
@@ -11,4 +16,4 @@ ENTRY(cacheflush)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(cacheflush)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(capget)
.text
.type capget, #function
.globl capget
.align 4
.fnstart
capget:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_capget
@@ -11,4 +16,4 @@ ENTRY(capget)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(capget)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(capset)
.text
.type capset, #function
.globl capset
.align 4
.fnstart
capset:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_capset
@@ -11,4 +16,4 @@ ENTRY(capset)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(capset)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(chdir)
.text
.type chdir, #function
.globl chdir
.align 4
.fnstart
chdir:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_chdir
@@ -11,4 +16,4 @@ ENTRY(chdir)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(chdir)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(chmod)
.text
.type chmod, #function
.globl chmod
.align 4
.fnstart
chmod:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_chmod
@@ -11,4 +16,4 @@ ENTRY(chmod)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(chmod)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(chown)
.text
.type chown, #function
.globl chown
.align 4
.fnstart
chown:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_chown32
@@ -11,4 +16,4 @@ ENTRY(chown)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(chown)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(chroot)
.text
.type chroot, #function
.globl chroot
.align 4
.fnstart
chroot:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_chroot
@@ -11,4 +16,4 @@ ENTRY(chroot)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(chroot)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(clock_getres)
.text
.type clock_getres, #function
.globl clock_getres
.align 4
.fnstart
clock_getres:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_clock_getres
@@ -11,4 +16,4 @@ ENTRY(clock_getres)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(clock_getres)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(clock_gettime)
.text
.type clock_gettime, #function
.globl clock_gettime
.align 4
.fnstart
clock_gettime:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_clock_gettime
@@ -11,4 +16,4 @@ ENTRY(clock_gettime)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(clock_gettime)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(clock_nanosleep)
.text
.type clock_nanosleep, #function
.globl clock_nanosleep
.align 4
.fnstart
clock_nanosleep:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_clock_nanosleep
@@ -11,4 +16,4 @@ ENTRY(clock_nanosleep)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(clock_nanosleep)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(clock_settime)
.text
.type clock_settime, #function
.globl clock_settime
.align 4
.fnstart
clock_settime:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_clock_settime
@@ -11,4 +16,4 @@ ENTRY(clock_settime)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(clock_settime)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(close)
.text
.type close, #function
.globl close
.align 4
.fnstart
close:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_close
@@ -11,4 +16,4 @@ ENTRY(close)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(close)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(connect)
.text
.type connect, #function
.globl connect
.align 4
.fnstart
connect:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_connect
@@ -11,4 +16,4 @@ ENTRY(connect)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(connect)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(delete_module)
.text
.type delete_module, #function
.globl delete_module
.align 4
.fnstart
delete_module:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_delete_module
@@ -11,4 +16,4 @@ ENTRY(delete_module)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(delete_module)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(dup)
.text
.type dup, #function
.globl dup
.align 4
.fnstart
dup:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_dup
@@ -11,4 +16,4 @@ ENTRY(dup)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(dup)
.fnend

View File

@@ -1,8 +1,13 @@
/* autogenerated by gensyscalls.py */
#include <machine/asm.h>
#include <sys/linux-syscalls.h>
ENTRY(dup2)
.text
.type dup2, #function
.globl dup2
.align 4
.fnstart
dup2:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_dup2
@@ -11,4 +16,4 @@ ENTRY(dup2)
movs r0, r0
bxpl lr
b __set_syscall_errno
END(dup2)
.fnend

Some files were not shown because too many files have changed in this diff Show More