Compare commits
3 Commits
jb-dev
...
gingerbrea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c222c4906 | ||
|
|
f0e5b680ba | ||
|
|
30983c9ab9 |
@@ -16,4 +16,9 @@
|
|||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
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
|
||||||
|
|||||||
114
libc/Android.mk
114
libc/Android.mk
@@ -187,6 +187,7 @@ libc_common_src_files := \
|
|||||||
string/strcat.c \
|
string/strcat.c \
|
||||||
string/strchr.c \
|
string/strchr.c \
|
||||||
string/strcoll.c \
|
string/strcoll.c \
|
||||||
|
string/strcpy.c \
|
||||||
string/strcspn.c \
|
string/strcspn.c \
|
||||||
string/strdup.c \
|
string/strdup.c \
|
||||||
string/strerror.c \
|
string/strerror.c \
|
||||||
@@ -229,7 +230,6 @@ libc_common_src_files := \
|
|||||||
wchar/wcsstr.c \
|
wchar/wcsstr.c \
|
||||||
wchar/wcstok.c \
|
wchar/wcstok.c \
|
||||||
wchar/wcswidth.c \
|
wchar/wcswidth.c \
|
||||||
wchar/wcsxfrm.c \
|
|
||||||
wchar/wmemchr.c \
|
wchar/wmemchr.c \
|
||||||
wchar/wmemcmp.c \
|
wchar/wmemcmp.c \
|
||||||
wchar/wmemcpy.c \
|
wchar/wmemcpy.c \
|
||||||
@@ -241,14 +241,13 @@ libc_common_src_files := \
|
|||||||
inet/inet_ntoa.c \
|
inet/inet_ntoa.c \
|
||||||
inet/inet_ntop.c \
|
inet/inet_ntop.c \
|
||||||
inet/inet_pton.c \
|
inet/inet_pton.c \
|
||||||
inet/ether_aton.c \
|
|
||||||
inet/ether_ntoa.c \
|
|
||||||
tzcode/asctime.c \
|
tzcode/asctime.c \
|
||||||
tzcode/difftime.c \
|
tzcode/difftime.c \
|
||||||
tzcode/localtime.c \
|
tzcode/localtime.c \
|
||||||
tzcode/strftime.c \
|
tzcode/strftime.c \
|
||||||
tzcode/strptime.c \
|
tzcode/strptime.c \
|
||||||
bionic/__set_errno.c \
|
bionic/__set_errno.c \
|
||||||
|
bionic/_rand48.c \
|
||||||
bionic/cpuacct.c \
|
bionic/cpuacct.c \
|
||||||
bionic/arc4random.c \
|
bionic/arc4random.c \
|
||||||
bionic/basename.c \
|
bionic/basename.c \
|
||||||
@@ -269,24 +268,15 @@ libc_common_src_files := \
|
|||||||
bionic/libc_init_common.c \
|
bionic/libc_init_common.c \
|
||||||
bionic/logd_write.c \
|
bionic/logd_write.c \
|
||||||
bionic/md5.c \
|
bionic/md5.c \
|
||||||
bionic/memmove_words.c \
|
|
||||||
bionic/pututline.c \
|
bionic/pututline.c \
|
||||||
bionic/realpath.c \
|
bionic/realpath.c \
|
||||||
bionic/sched_getaffinity.c \
|
|
||||||
bionic/sched_getcpu.c \
|
|
||||||
bionic/sched_cpualloc.c \
|
|
||||||
bionic/sched_cpucount.c \
|
|
||||||
bionic/semaphore.c \
|
bionic/semaphore.c \
|
||||||
bionic/sha1.c \
|
bionic/sha1.c \
|
||||||
bionic/ssp.c \
|
bionic/ssp.c \
|
||||||
bionic/stubs.c \
|
bionic/stubs.c \
|
||||||
bionic/system_properties.c \
|
bionic/system_properties.c \
|
||||||
bionic/tdelete.c \
|
|
||||||
bionic/tdestroy.c \
|
|
||||||
bionic/time64.c \
|
bionic/time64.c \
|
||||||
bionic/tfind.c \
|
|
||||||
bionic/thread_atexit.c \
|
bionic/thread_atexit.c \
|
||||||
bionic/tsearch.c \
|
|
||||||
bionic/utime.c \
|
bionic/utime.c \
|
||||||
bionic/utmp.c \
|
bionic/utmp.c \
|
||||||
netbsd/gethnamaddr.c \
|
netbsd/gethnamaddr.c \
|
||||||
@@ -350,16 +340,13 @@ libc_common_src_files += \
|
|||||||
arch-arm/bionic/__get_sp.S \
|
arch-arm/bionic/__get_sp.S \
|
||||||
arch-arm/bionic/_exit_with_stack_teardown.S \
|
arch-arm/bionic/_exit_with_stack_teardown.S \
|
||||||
arch-arm/bionic/_setjmp.S \
|
arch-arm/bionic/_setjmp.S \
|
||||||
arch-arm/bionic/abort_arm.S \
|
arch-arm/bionic/atomics_arm.S \
|
||||||
arch-arm/bionic/atomics_arm.c \
|
|
||||||
arch-arm/bionic/clone.S \
|
arch-arm/bionic/clone.S \
|
||||||
arch-arm/bionic/eabi.c \
|
arch-arm/bionic/eabi.c \
|
||||||
arch-arm/bionic/ffs.S \
|
arch-arm/bionic/ffs.S \
|
||||||
arch-arm/bionic/futex_arm.S \
|
|
||||||
arch-arm/bionic/kill.S \
|
arch-arm/bionic/kill.S \
|
||||||
arch-arm/bionic/libgcc_compat.c \
|
arch-arm/bionic/libgcc_compat.c \
|
||||||
arch-arm/bionic/tkill.S \
|
arch-arm/bionic/tkill.S \
|
||||||
arch-arm/bionic/tgkill.S \
|
|
||||||
arch-arm/bionic/memcmp.S \
|
arch-arm/bionic/memcmp.S \
|
||||||
arch-arm/bionic/memcmp16.S \
|
arch-arm/bionic/memcmp16.S \
|
||||||
arch-arm/bionic/memcpy.S \
|
arch-arm/bionic/memcpy.S \
|
||||||
@@ -367,11 +354,10 @@ libc_common_src_files += \
|
|||||||
arch-arm/bionic/setjmp.S \
|
arch-arm/bionic/setjmp.S \
|
||||||
arch-arm/bionic/sigsetjmp.S \
|
arch-arm/bionic/sigsetjmp.S \
|
||||||
arch-arm/bionic/strlen.c.arm \
|
arch-arm/bionic/strlen.c.arm \
|
||||||
arch-arm/bionic/strcpy.S \
|
|
||||||
arch-arm/bionic/strcmp.S \
|
|
||||||
arch-arm/bionic/syscall.S \
|
arch-arm/bionic/syscall.S \
|
||||||
string/memmove.c.arm \
|
string/memmove.c.arm \
|
||||||
string/bcopy.c \
|
string/bcopy.c \
|
||||||
|
string/strcmp.c \
|
||||||
string/strncmp.c \
|
string/strncmp.c \
|
||||||
unistd/socketcalls.c
|
unistd/socketcalls.c
|
||||||
|
|
||||||
@@ -379,7 +365,6 @@ libc_common_src_files += \
|
|||||||
# can set breakpoints in them without messing
|
# can set breakpoints in them without messing
|
||||||
# up any thumb code.
|
# up any thumb code.
|
||||||
libc_common_src_files += \
|
libc_common_src_files += \
|
||||||
bionic/pthread-atfork.c.arm \
|
|
||||||
bionic/pthread-rwlocks.c.arm \
|
bionic/pthread-rwlocks.c.arm \
|
||||||
bionic/pthread-timers.c.arm \
|
bionic/pthread-timers.c.arm \
|
||||||
bionic/ptrace.c.arm
|
bionic/ptrace.c.arm
|
||||||
@@ -401,12 +386,11 @@ libc_common_src_files += \
|
|||||||
arch-x86/bionic/__get_sp.S \
|
arch-x86/bionic/__get_sp.S \
|
||||||
arch-x86/bionic/__get_tls.c \
|
arch-x86/bionic/__get_tls.c \
|
||||||
arch-x86/bionic/__set_tls.c \
|
arch-x86/bionic/__set_tls.c \
|
||||||
|
arch-x86/bionic/atomics_x86.S \
|
||||||
arch-x86/bionic/clone.S \
|
arch-x86/bionic/clone.S \
|
||||||
arch-x86/bionic/_exit_with_stack_teardown.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/_setjmp.S \
|
arch-x86/bionic/_setjmp.S \
|
||||||
arch-x86/bionic/sigsetjmp.S \
|
|
||||||
arch-x86/bionic/vfork.S \
|
arch-x86/bionic/vfork.S \
|
||||||
arch-x86/bionic/syscall.S \
|
arch-x86/bionic/syscall.S \
|
||||||
arch-x86/string/bcopy_wrapper.S \
|
arch-x86/string/bcopy_wrapper.S \
|
||||||
@@ -418,8 +402,6 @@ libc_common_src_files += \
|
|||||||
arch-x86/string/strcmp_wrapper.S \
|
arch-x86/string/strcmp_wrapper.S \
|
||||||
arch-x86/string/strncmp_wrapper.S \
|
arch-x86/string/strncmp_wrapper.S \
|
||||||
arch-x86/string/strlen_wrapper.S \
|
arch-x86/string/strlen_wrapper.S \
|
||||||
string/strcpy.c \
|
|
||||||
bionic/pthread-atfork.c \
|
|
||||||
bionic/pthread-rwlocks.c \
|
bionic/pthread-rwlocks.c \
|
||||||
bionic/pthread-timers.c \
|
bionic/pthread-timers.c \
|
||||||
bionic/ptrace.c
|
bionic/ptrace.c
|
||||||
@@ -434,6 +416,41 @@ libc_arch_static_src_files := \
|
|||||||
libc_arch_dynamic_src_files :=
|
libc_arch_dynamic_src_files :=
|
||||||
else # !x86
|
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/strcmp.c \
|
||||||
|
string/strncmp.c \
|
||||||
|
string/memcmp.c \
|
||||||
|
string/strlen.c \
|
||||||
|
bionic/pthread-rwlocks.c \
|
||||||
|
bionic/pthread-timers.c \
|
||||||
|
bionic/ptrace.c \
|
||||||
|
unistd/socketcalls.c
|
||||||
|
|
||||||
|
libc_static_common_src_files += \
|
||||||
|
bionic/pthread.c \
|
||||||
|
|
||||||
|
endif # sh
|
||||||
|
|
||||||
endif # !x86
|
endif # !x86
|
||||||
endif # !arm
|
endif # !arm
|
||||||
|
|
||||||
@@ -450,8 +467,7 @@ libc_common_cflags := \
|
|||||||
-DINET6 \
|
-DINET6 \
|
||||||
-I$(LOCAL_PATH)/private \
|
-I$(LOCAL_PATH)/private \
|
||||||
-DUSE_DL_PREFIX \
|
-DUSE_DL_PREFIX \
|
||||||
-DPOSIX_MISTAKE \
|
-DPOSIX_MISTAKE
|
||||||
-DLOG_ON_HEAP_ERROR \
|
|
||||||
|
|
||||||
# these macro definitions are required to implement the
|
# these macro definitions are required to implement the
|
||||||
# 'timezone' and 'daylight' global variables, as well as
|
# 'timezone' and 'daylight' global variables, as well as
|
||||||
@@ -478,18 +494,13 @@ ifeq ($(TARGET_ARCH),arm)
|
|||||||
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
|
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
|
||||||
libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
|
libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
|
||||||
endif
|
endif
|
||||||
ifeq ($(ARCH_ARM_USE_NON_NEON_MEMCPY),true)
|
|
||||||
libc_common_cflags += -DARCH_ARM_USE_NON_NEON_MEMCPY
|
|
||||||
endif
|
|
||||||
else # !arm
|
else # !arm
|
||||||
ifeq ($(TARGET_ARCH),x86)
|
ifeq ($(TARGET_ARCH),x86)
|
||||||
libc_crt_target_cflags :=
|
libc_crt_target_cflags := -m32
|
||||||
ifeq ($(ARCH_X86_HAVE_SSE2),true)
|
|
||||||
libc_crt_target_cflags += -DUSE_SSE2=1
|
# Enable recent IA friendly memory routines (such as for Atom)
|
||||||
endif
|
# These will not work on the earlier x86 machines
|
||||||
ifeq ($(ARCH_X86_HAVE_SSSE3),true)
|
libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
|
||||||
libc_crt_target_cflags += -DUSE_SSSE3=1
|
|
||||||
endif
|
|
||||||
endif # x86
|
endif # x86
|
||||||
endif # !arm
|
endif # !arm
|
||||||
|
|
||||||
@@ -516,11 +527,6 @@ libc_common_c_includes := \
|
|||||||
$(LOCAL_PATH)/string \
|
$(LOCAL_PATH)/string \
|
||||||
$(LOCAL_PATH)/stdio
|
$(LOCAL_PATH)/stdio
|
||||||
|
|
||||||
# Needed to access private/__dso_handle.S from
|
|
||||||
# crtbegin_xxx.S and crtend_xxx.S
|
|
||||||
# and machine/asm.h
|
|
||||||
#
|
|
||||||
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,
|
# 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
|
# which are needed to build all other objects (shared/static libs and
|
||||||
@@ -656,19 +662,7 @@ include $(BUILD_STATIC_LIBRARY)
|
|||||||
# ========================================================
|
# ========================================================
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
# pthread deadlock prediction:
|
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||||
# 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
|
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
|
||||||
# TODO: At some point, we need to remove this custom linker script.
|
|
||||||
LOCAL_LDFLAGS := -Wl,-T,$(BUILD_SYSTEM)/armelf.xsc
|
|
||||||
endif
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
@@ -676,7 +670,6 @@ LOCAL_SRC_FILES := \
|
|||||||
$(libc_static_common_src_files) \
|
$(libc_static_common_src_files) \
|
||||||
bionic/dlmalloc.c \
|
bionic/dlmalloc.c \
|
||||||
bionic/malloc_debug_common.c \
|
bionic/malloc_debug_common.c \
|
||||||
bionic/pthread_debug.c \
|
|
||||||
bionic/libc_init_dynamic.c
|
bionic/libc_init_dynamic.c
|
||||||
|
|
||||||
LOCAL_MODULE:= libc
|
LOCAL_MODULE:= libc
|
||||||
@@ -716,10 +709,7 @@ LOCAL_CFLAGS := \
|
|||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
bionic/malloc_debug_leak.c \
|
bionic/malloc_debug_leak.c
|
||||||
bionic/malloc_debug_check.c \
|
|
||||||
bionic/malloc_debug_check_mapinfo.c \
|
|
||||||
bionic/malloc_debug_stacktrace.c
|
|
||||||
|
|
||||||
LOCAL_MODULE:= libc_malloc_debug_leak
|
LOCAL_MODULE:= libc_malloc_debug_leak
|
||||||
|
|
||||||
@@ -727,7 +717,8 @@ LOCAL_SHARED_LIBRARIES := libc
|
|||||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||||
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
||||||
|
# Don't prelink
|
||||||
|
LOCAL_PRELINK_MODULE := false
|
||||||
# Don't install on release build
|
# Don't install on release build
|
||||||
LOCAL_MODULE_TAGS := eng debug
|
LOCAL_MODULE_TAGS := eng debug
|
||||||
|
|
||||||
@@ -750,10 +741,11 @@ LOCAL_SRC_FILES := \
|
|||||||
|
|
||||||
LOCAL_MODULE:= libc_malloc_debug_qemu
|
LOCAL_MODULE:= libc_malloc_debug_qemu
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := libc libdl
|
LOCAL_SHARED_LIBRARIES := libc
|
||||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||||
|
# Don't prelink
|
||||||
|
LOCAL_PRELINK_MODULE := false
|
||||||
# Don't install on release build
|
# Don't install on release build
|
||||||
LOCAL_MODULE_TAGS := eng debug
|
LOCAL_MODULE_TAGS := eng debug
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Copyright (c) 2005-2010, The Android Open Source Project
|
Copyright (c) 2005-2008, The Android Open Source Project
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# each non comment line has the following format:
|
# 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:
|
# note that:
|
||||||
# - syscall_name correspond to the name of the syscall, which may differ from
|
# - syscall_name correspond to the name of the syscall, which may differ from
|
||||||
@@ -22,15 +22,15 @@
|
|||||||
# assembler template for the syscall; it's up to the bionic implementation to provide
|
# assembler template for the syscall; it's up to the bionic implementation to provide
|
||||||
# a relevant C stub
|
# a relevant C stub
|
||||||
#
|
#
|
||||||
# - additionally, if the syscall number is different amoung ARM, and x86, use:
|
# - additionally, if the syscall number is different amoung ARM, x86 and SuperH, use:
|
||||||
# return_type funcname[:syscall_name](parameters) arm_number,x86_number
|
# return_type funcname[:syscall_name](parameters) arm_number,x86_number,superh_number
|
||||||
#
|
#
|
||||||
# the file is processed by a python script named gensyscalls.py
|
# the file is processed by a python script named gensyscalls.py
|
||||||
#
|
#
|
||||||
|
|
||||||
# process management
|
# process management
|
||||||
void _exit:exit_group (int) 248,252
|
void _exit:exit_group (int) 248,252
|
||||||
void _exit_thread:exit (int) 1
|
void _exit_thread:exit (int) 1
|
||||||
pid_t __fork:fork (void) 2
|
pid_t __fork:fork (void) 2
|
||||||
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7
|
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
|
int __waitid:waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284
|
||||||
@@ -47,13 +47,12 @@ uid_t getuid:getuid32 () 199
|
|||||||
gid_t getgid:getgid32 () 200
|
gid_t getgid:getgid32 () 200
|
||||||
uid_t geteuid:geteuid32 () 201
|
uid_t geteuid:geteuid32 () 201
|
||||||
gid_t getegid:getegid32 () 202
|
gid_t getegid:getegid32 () 202
|
||||||
uid_t getresuid:getresuid32 (uid_t *ruid, uid_t *euid, uid_t *suid) 209
|
uid_t getresuid:getresuid32 () 209
|
||||||
gid_t getresgid:getresgid32 (gid_t *rgid, gid_t *egid, gid_t *sgid) 211
|
gid_t getresgid:getresgid32 () 211
|
||||||
pid_t gettid() 224
|
pid_t gettid() 224
|
||||||
ssize_t readahead(int, off64_t, size_t) 225
|
|
||||||
int getgroups:getgroups32(int, gid_t *) 205
|
int getgroups:getgroups32(int, gid_t *) 205
|
||||||
pid_t getpgid(pid_t) 132
|
pid_t getpgid(pid_t) 132
|
||||||
pid_t getppid() 64
|
pid_t getppid() 64
|
||||||
pid_t setsid() 66
|
pid_t setsid() 66
|
||||||
int setgid:setgid32(gid_t) 214
|
int setgid:setgid32(gid_t) 214
|
||||||
int seteuid:seteuid32(uid_t) stub
|
int seteuid:seteuid32(uid_t) stub
|
||||||
@@ -64,7 +63,6 @@ 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
|
# 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
|
int kill(pid_t, int) -1,37
|
||||||
int tkill(pid_t tid, int sig) -1,238
|
int tkill(pid_t tid, int sig) -1,238
|
||||||
int tgkill(pid_t tgid, pid_t tid, int sig) -1,270
|
|
||||||
int __ptrace:ptrace(int request, int pid, void* addr, void* data) 26
|
int __ptrace:ptrace(int request, int pid, void* addr, void* data) 26
|
||||||
int __set_thread_area:set_thread_area(void* user_desc) -1,243
|
int __set_thread_area:set_thread_area(void* user_desc) -1,243
|
||||||
int __getpriority:getpriority(int, int) 96
|
int __getpriority:getpriority(int, int) 96
|
||||||
@@ -78,8 +76,6 @@ int setpgid(pid_t, pid_t) 57
|
|||||||
pid_t vfork(void) 190,-1,190
|
pid_t vfork(void) 190,-1,190
|
||||||
int setregid:setregid32(gid_t, gid_t) 204
|
int setregid:setregid32(gid_t, gid_t) 204
|
||||||
int chroot(const char *) 61
|
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
|
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 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 capset(cap_user_header_t header, const cap_user_data_t data) 185
|
||||||
@@ -89,8 +85,8 @@ int acct(const char* filepath) 51
|
|||||||
# file descriptors
|
# file descriptors
|
||||||
ssize_t read (int, void*, size_t) 3
|
ssize_t read (int, void*, size_t) 3
|
||||||
ssize_t write (int, const void*, size_t) 4
|
ssize_t write (int, const void*, size_t) 4
|
||||||
ssize_t pread64 (int, void *, size_t, off64_t) 180
|
ssize_t __pread64:pread64 (int, void *, size_t, off_t, off_t) 180
|
||||||
ssize_t pwrite64 (int, void *, size_t, off64_t) 181
|
ssize_t __pwrite64:pwrite64 (int, void *, size_t, off_t, off_t) 181
|
||||||
int __open:open (const char*, int, mode_t) 5
|
int __open:open (const char*, int, mode_t) 5
|
||||||
int __openat:openat (int, const char*, int, mode_t) 322,295
|
int __openat:openat (int, const char*, int, mode_t) 322,295
|
||||||
int close (int) 6
|
int close (int) 6
|
||||||
@@ -115,12 +111,11 @@ int __fcntl:fcntl(int, int, void*) 55
|
|||||||
int flock(int, int) 143
|
int flock(int, int) 143
|
||||||
int fchmod(int, mode_t) 94
|
int fchmod(int, mode_t) 94
|
||||||
int dup(int) 41
|
int dup(int) 41
|
||||||
int pipe(int *) 42,42
|
int pipe(int *) 42,42,-1
|
||||||
int pipe2(int *, int) 359,331
|
int pipe2(int *, int) 359,331
|
||||||
int dup2(int, int) 63
|
int dup2(int, int) 63
|
||||||
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
|
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
|
||||||
int ftruncate(int, off_t) 93
|
int ftruncate(int, off_t) 93
|
||||||
int ftruncate64(int, off64_t) 194
|
|
||||||
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220
|
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220
|
||||||
int fsync(int) 118
|
int fsync(int) 118
|
||||||
int fdatasync(int) 148
|
int fdatasync(int) 148
|
||||||
@@ -134,10 +129,6 @@ 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 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 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
|
int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath) 329,302
|
||||||
int fsetxattr(int, const char *, const void *, size_t, int) 228
|
|
||||||
ssize_t fgetxattr(int, const char *, void *, size_t) 231
|
|
||||||
ssize_t flistxattr(int, char *, size_t) 234
|
|
||||||
int fremovexattr(int, const char *) 237
|
|
||||||
|
|
||||||
# file system
|
# file system
|
||||||
int link (const char*, const char*) 9
|
int link (const char*, const char*) 9
|
||||||
@@ -160,20 +151,10 @@ int rmdir(const char *) 40
|
|||||||
int rename(const char *, const char *) 38
|
int rename(const char *, const char *) 38
|
||||||
int __getcwd:getcwd(char * buf, size_t size) 183
|
int __getcwd:getcwd(char * buf, size_t size) 183
|
||||||
int access(const char *, int) 33
|
int access(const char *, int) 33
|
||||||
int faccessat(int, const char *, int, int) 334,307
|
|
||||||
int symlink(const char *, const char *) 83
|
int symlink(const char *, const char *) 83
|
||||||
int fchdir(int) 133
|
int fchdir(int) 133
|
||||||
int truncate(const char*, off_t) 92
|
int truncate(const char*, off_t) 92
|
||||||
int setxattr(const char *, const char *, const void *, size_t, int) 226
|
|
||||||
int lsetxattr(const char *, const char *, const void *, size_t, int) 227
|
|
||||||
ssize_t getxattr(const char *, const char *, void *, size_t) 229
|
|
||||||
ssize_t lgetxattr(const char *, const char *, void *, size_t) 230
|
|
||||||
ssize_t listxattr(const char *, char *, size_t) 232
|
|
||||||
ssize_t llistxattr(const char *, char *, size_t) 233
|
|
||||||
int removexattr(const char *, const char *) 235
|
|
||||||
int lremovexattr(const char *, const char *) 236
|
|
||||||
int __statfs64:statfs64(const char *, size_t, struct statfs *) 266,268
|
int __statfs64:statfs64(const char *, size_t, struct statfs *) 266,268
|
||||||
|
|
||||||
# time
|
# time
|
||||||
int pause () 29
|
int pause () 29
|
||||||
int gettimeofday(struct timeval*, struct timezone*) 78
|
int gettimeofday(struct timeval*, struct timezone*) 78
|
||||||
@@ -183,7 +164,7 @@ int nanosleep(const struct timespec *, struct timespec *) 162
|
|||||||
int clock_gettime(clockid_t clk_id, struct timespec *tp) 263,265
|
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_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_getres(clockid_t clk_id, struct timespec *res) 264,266
|
||||||
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *req, struct timespec *rem) 265,267
|
int clock_nanosleep(const struct timespec *req, struct timespec *rem) 265,267
|
||||||
int getitimer(int, const struct itimerval *) 105
|
int getitimer(int, const struct itimerval *) 105
|
||||||
int setitimer(int, const struct itimerval *, struct itimerval *) 104
|
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
|
int __timer_create:timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) 257,259
|
||||||
@@ -192,7 +173,6 @@ int __timer_gettime:timer_gettime(timer_t, struct itimerspec*)
|
|||||||
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262
|
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262
|
||||||
int __timer_delete:timer_delete(timer_t) 261,263
|
int __timer_delete:timer_delete(timer_t) 261,263
|
||||||
int utimes(const char*, const struct timeval tvp[2]) 269, 271
|
int utimes(const char*, const struct timeval tvp[2]) 269, 271
|
||||||
int utimensat(int, const char *, const struct timespec times[2], int) 348, 320, 320
|
|
||||||
|
|
||||||
# signals
|
# signals
|
||||||
int sigaction(int, const struct sigaction *, struct sigaction *) 67
|
int sigaction(int, const struct sigaction *, struct sigaction *) 67
|
||||||
@@ -221,21 +201,24 @@ int sendmsg(int, const struct msghdr *, unsigned int) 296,-1
|
|||||||
int recvmsg(int, struct msghdr *, unsigned int) 297,-1
|
int recvmsg(int, struct msghdr *, unsigned int) 297,-1
|
||||||
|
|
||||||
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
|
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
|
||||||
int socket:socketcall:1 (int, int, int) -1,102
|
int socket:socketcall:1 (int, int, int) -1,102,-1
|
||||||
int bind:socketcall:2 (int, struct sockaddr *, int) -1,102
|
int bind:socketcall:2 (int, struct sockaddr *, int) -1,102,-1
|
||||||
int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,102
|
int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,102,-1
|
||||||
int listen:socketcall:4(int, int) -1,102
|
int listen:socketcall:4(int, int) -1,102,-1
|
||||||
int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,102
|
int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,102,-1
|
||||||
int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,102
|
int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,102,-1
|
||||||
int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,102
|
int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,102,-1
|
||||||
int socketpair:socketcall:8(int, int, int, int*) -1,102
|
int socketpair:socketcall:8(int, int, int, int*) -1,102,-1
|
||||||
int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,102
|
int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,102,-1
|
||||||
int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,102
|
int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,102,-1
|
||||||
int shutdown:socketcall:13(int, int) -1,102,-1
|
int shutdown:socketcall:13(int, int) -1,102,-1
|
||||||
int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,102
|
int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,102,-1
|
||||||
int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,102
|
int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,102,-1
|
||||||
int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102
|
int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102,-1
|
||||||
int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,102
|
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
|
# scheduler & real-time
|
||||||
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156
|
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156
|
||||||
@@ -246,13 +229,10 @@ int sched_getparam(pid_t pid, struct sched_param *param) 155
|
|||||||
int sched_get_priority_max(int policy) 159
|
int sched_get_priority_max(int policy) 159
|
||||||
int sched_get_priority_min(int policy) 160
|
int sched_get_priority_min(int policy) 160
|
||||||
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
|
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
|
||||||
int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) 241
|
|
||||||
int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) 242
|
|
||||||
int __getcpu:getcpu(unsigned *cpu, unsigned *node, void *unused) 345,318
|
|
||||||
|
|
||||||
# io priorities
|
# io priorities
|
||||||
int ioprio_set(int which, int who, int ioprio) 314,289
|
int ioprio_set(int which, int who, int ioprio) 314,289,288
|
||||||
int ioprio_get(int which, int who) 315,290
|
int ioprio_get(int which, int who) 315,290,289
|
||||||
|
|
||||||
# other
|
# other
|
||||||
int uname(struct utsname *) 122
|
int uname(struct utsname *) 122
|
||||||
@@ -264,8 +244,6 @@ int init_module(void *, unsigned long, const char *) 128
|
|||||||
int delete_module(const char*, unsigned int) 129
|
int delete_module(const char*, unsigned int) 129
|
||||||
int klogctl:syslog(int, char *, int) 103
|
int klogctl:syslog(int, char *, int) 103
|
||||||
int sysinfo(struct sysinfo *) 116
|
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
|
# futex
|
||||||
int futex(void *, int, int, void *, void *, int) 240
|
int futex(void *, int, int, void *, void *, int) 240
|
||||||
@@ -276,8 +254,8 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 251,25
|
|||||||
int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256
|
int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256
|
||||||
|
|
||||||
int inotify_init(void) 316,291,290
|
int inotify_init(void) 316,291,290
|
||||||
int inotify_add_watch(int, const char *, unsigned int) 317,292
|
int inotify_add_watch(int, const char *, unsigned int) 317,292,291
|
||||||
int inotify_rm_watch(int, unsigned int) 318,293
|
int inotify_rm_watch(int, unsigned int) 318,293,292
|
||||||
|
|
||||||
int poll(struct pollfd *, unsigned int, long) 168
|
int poll(struct pollfd *, unsigned int, long) 168
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,15 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include <asm/unistd.h>
|
#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)
|
@ void _exit_with_stack_teardown(void * stackBase, int stackSize, int retCode)
|
||||||
ENTRY(_exit_with_stack_teardown)
|
|
||||||
|
_exit_with_stack_teardown:
|
||||||
|
|
||||||
#if __ARM_EABI__
|
#if __ARM_EABI__
|
||||||
mov lr, r2
|
mov lr, r2
|
||||||
@@ -48,4 +53,3 @@ ENTRY(_exit_with_stack_teardown)
|
|||||||
@ exit() should never return, cause a crash if it does
|
@ exit() should never return, cause a crash if it does
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
END(_exit_with_stack_teardown)
|
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ ENTRY(_setjmp)
|
|||||||
|
|
||||||
mov r0, #0x00000000
|
mov r0, #0x00000000
|
||||||
bx lr
|
bx lr
|
||||||
END(_setjmp)
|
|
||||||
|
|
||||||
.L_setjmp_magic:
|
.L_setjmp_magic:
|
||||||
.word _JB_MAGIC__SETJMP
|
.word _JB_MAGIC__SETJMP
|
||||||
@@ -110,4 +109,3 @@ botch:
|
|||||||
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
||||||
bl PIC_SYM(_C_LABEL(abort), PLT)
|
bl PIC_SYM(_C_LABEL(abort), PLT)
|
||||||
b . - 8 /* Cannot get here */
|
b . - 8 /* Cannot get here */
|
||||||
END(_longjmp)
|
|
||||||
|
|||||||
@@ -37,10 +37,16 @@
|
|||||||
.eabi_attribute 26, 2
|
.eabi_attribute 26, 2
|
||||||
.eabi_attribute 30, 4
|
.eabi_attribute 30, 4
|
||||||
.eabi_attribute 18, 4
|
.eabi_attribute 18, 4
|
||||||
|
.code 16
|
||||||
|
.section .text.atexit,"ax",%progbits
|
||||||
|
.align 2
|
||||||
|
.global atexit
|
||||||
.hidden atexit
|
.hidden atexit
|
||||||
.code 16
|
.code 16
|
||||||
.thumb_func
|
.thumb_func
|
||||||
ENTRY(atexit)
|
.type atexit, %function
|
||||||
|
atexit:
|
||||||
|
.fnstart
|
||||||
.LFB0:
|
.LFB0:
|
||||||
.save {r4, lr}
|
.save {r4, lr}
|
||||||
push {r4, lr}
|
push {r4, lr}
|
||||||
@@ -58,5 +64,6 @@ ENTRY(atexit)
|
|||||||
.L3:
|
.L3:
|
||||||
.word __dso_handle-(.LPIC0+4)
|
.word __dso_handle-(.LPIC0+4)
|
||||||
.LFE0:
|
.LFE0:
|
||||||
END(atexit)
|
.fnend
|
||||||
|
.size atexit, .-atexit
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
251
libc/arch-arm/bionic/atomics_arm.S
Normal file
251
libc/arch-arm/bionic/atomics_arm.S
Normal 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
|
||||||
@@ -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);
|
|
||||||
}
|
|
||||||
@@ -26,9 +26,14 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include <sys/linux-syscalls.h>
|
#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
|
@ insert the args onto the new stack
|
||||||
str r0, [r1, #-4]
|
str r0, [r1, #-4]
|
||||||
str r3, [r1, #-8]
|
str r3, [r1, #-8]
|
||||||
@@ -68,7 +73,7 @@ ENTRY(__pthread_clone)
|
|||||||
__error:
|
__error:
|
||||||
mov r0, #-1
|
mov r0, #-1
|
||||||
bx lr
|
bx lr
|
||||||
END(__pthread_clone)
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -83,8 +88,12 @@ END(__pthread_clone)
|
|||||||
# at the end of the parameter list makes the
|
# at the end of the parameter list makes the
|
||||||
# implementation much simpler.
|
# implementation much simpler.
|
||||||
#
|
#
|
||||||
|
.type __bionic_clone, #function
|
||||||
|
.globl __bionic_clone
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
ENTRY(__bionic_clone)
|
__bionic_clone:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
|
|
||||||
@@ -115,4 +124,5 @@ ENTRY(__bionic_clone)
|
|||||||
ldr r0, [sp, #-4]
|
ldr r0, [sp, #-4]
|
||||||
ldr r1, [sp, #-8]
|
ldr r1, [sp, #-8]
|
||||||
b __bionic_clone_entry
|
b __bionic_clone_entry
|
||||||
END(__bionic_clone)
|
|
||||||
|
.fnend
|
||||||
|
|||||||
@@ -43,19 +43,21 @@
|
|||||||
# - address of an "onexit" function, not used on any
|
# - address of an "onexit" function, not used on any
|
||||||
# platform supported by Bionic
|
# 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
|
# - address of the constructor list
|
||||||
#
|
#
|
||||||
_start:
|
_start:
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
ldr r2, =main
|
adr r2, 0f
|
||||||
adr r3, 1f
|
adr r3, 1f
|
||||||
ldr r4, =__libc_init
|
b __libc_init
|
||||||
blx r4
|
|
||||||
mov r0, #0
|
0: b main
|
||||||
bx r0
|
|
||||||
|
|
||||||
1: .long __PREINIT_ARRAY__
|
1: .long __PREINIT_ARRAY__
|
||||||
.long __INIT_ARRAY__
|
.long __INIT_ARRAY__
|
||||||
|
|||||||
@@ -26,8 +26,6 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <machine/asm.h>
|
|
||||||
|
|
||||||
# Implement static C++ destructors when the shared
|
# Implement static C++ destructors when the shared
|
||||||
# library is unloaded through dlclose().
|
# library is unloaded through dlclose().
|
||||||
#
|
#
|
||||||
@@ -35,11 +33,10 @@
|
|||||||
# in the .fini_array. See 3.3.5.3.C of C++ ABI
|
# in the .fini_array. See 3.3.5.3.C of C++ ABI
|
||||||
# standard.
|
# standard.
|
||||||
#
|
#
|
||||||
ENTRY(__on_dlclose)
|
__on_dlclose:
|
||||||
adr r0, 0f
|
adr r0, 0f
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
b __cxa_finalize
|
b __cxa_finalize
|
||||||
END(__on_dlclose)
|
|
||||||
|
|
||||||
0:
|
0:
|
||||||
.long __dso_handle
|
.long __dso_handle
|
||||||
|
|||||||
@@ -43,19 +43,21 @@
|
|||||||
# - address of an "onexit" function, not used on any
|
# - address of an "onexit" function, not used on any
|
||||||
# platform supported by Bionic
|
# 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
|
# - address of the constructor list
|
||||||
#
|
#
|
||||||
_start:
|
_start:
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
ldr r2, =main
|
adr r2, 0f
|
||||||
adr r3, 1f
|
adr r3, 1f
|
||||||
ldr r4, =__libc_init
|
b __libc_init
|
||||||
blx r4
|
|
||||||
mov r0, #0
|
0: b main
|
||||||
bx r0
|
|
||||||
|
|
||||||
1: .long __PREINIT_ARRAY__
|
1: .long __PREINIT_ARRAY__
|
||||||
.long __INIT_ARRAY__
|
.long __INIT_ARRAY__
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
#include <machine/cpu-features.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ffs - find first set bit, this algorithm isolates the first set
|
* 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
|
* 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.
|
* over the checking each bit in turn as per the C compiled version.
|
||||||
*
|
*
|
||||||
* Some newer ARM architectures have an instruction named
|
* under ARMv5 there's an instruction called CLZ (count leading Zero's) that
|
||||||
* CLZ (count leading Zero's) that is used
|
* could be used
|
||||||
*
|
*
|
||||||
* This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on
|
* This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on
|
||||||
* 16 Feb 1994.
|
* 16 Feb 1994.
|
||||||
@@ -48,7 +47,7 @@ ENTRY(ffs)
|
|||||||
/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
|
/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
|
||||||
rsb r1, r0, #0
|
rsb r1, r0, #0
|
||||||
ands r0, r0, r1
|
ands r0, r0, r1
|
||||||
#ifndef __ARM_HAVE_CLZ
|
#ifndef __ARM_ARCH_5__
|
||||||
/*
|
/*
|
||||||
* now r0 has at most one set bit, call this X
|
* now r0 has at most one set bit, call this X
|
||||||
* if X = 0, all further instructions are skipped
|
* if X = 0, all further instructions are skipped
|
||||||
@@ -62,7 +61,6 @@ ENTRY(ffs)
|
|||||||
ldrneb r0, [ r2, r0, lsr #26 ]
|
ldrneb r0, [ r2, r0, lsr #26 ]
|
||||||
|
|
||||||
bx lr
|
bx lr
|
||||||
END(ffs)
|
|
||||||
|
|
||||||
.text;
|
.text;
|
||||||
.type .L_ffs_table, _ASM_TYPE_OBJECT;
|
.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 10, 0, 0, 25, 0, 0, 21, 27 /* 40-47 */
|
||||||
.byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */
|
.byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */
|
||||||
.byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */
|
.byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */
|
||||||
#else /* !defined(__ARM_HAVE_CLZ) */
|
#else
|
||||||
clzne r0, r0
|
clzne r0, r0
|
||||||
rsbne r0, r0, #32
|
rsbne r0, r0, #32
|
||||||
bx lr
|
bx lr
|
||||||
END(ffs)
|
#endif
|
||||||
#endif /* !defined(__ARM_HAVE_CLZ) */
|
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -33,13 +33,17 @@
|
|||||||
of a corrupted malloc heap).
|
of a corrupted malloc heap).
|
||||||
*/
|
*/
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
#include <machine/asm.h>
|
|
||||||
|
|
||||||
#ifndef __NR_kill
|
#ifndef __NR_kill
|
||||||
#define __NR_kill 37
|
#define __NR_kill 37
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(kill)
|
.text
|
||||||
|
.type kill, #function
|
||||||
|
.globl kill
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
kill:
|
||||||
stmfd sp!, {r4-r7, ip, lr}
|
stmfd sp!, {r4-r7, ip, lr}
|
||||||
ldr r7, =__NR_kill
|
ldr r7, =__NR_kill
|
||||||
swi #0
|
swi #0
|
||||||
@@ -47,4 +51,3 @@ ENTRY(kill)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(kill)
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
* dynamic linker to copy their definition into the final libc.so binary.
|
* dynamic linker to copy their definition into the final libc.so binary.
|
||||||
*
|
*
|
||||||
* They are required to ensure backwards binary compatibility with
|
* 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.
|
* using the NDK require them to be here.
|
||||||
*
|
*
|
||||||
* Now, for a more elaborate description of the issue:
|
* 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
|
* any native shared library generated with it should now be safe from that
|
||||||
* problem. On the other hand, existing shared libraries distributed with
|
* problem. On the other hand, existing shared libraries distributed with
|
||||||
* applications that were generated with a previous version of the NDK
|
* 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
|
* still need all 1.5/1.6 helper functions in libc.so and libn.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.
|
|
||||||
*
|
*
|
||||||
* Final note: some of the functions below should really be in libm.so to
|
* 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,
|
* completely reflect the state of 1.5/1.6 system images. However,
|
||||||
@@ -101,7 +96,6 @@
|
|||||||
XX(__aeabi_dsub) \
|
XX(__aeabi_dsub) \
|
||||||
XX(__aeabi_f2d) \
|
XX(__aeabi_f2d) \
|
||||||
XX(__aeabi_f2iz) \
|
XX(__aeabi_f2iz) \
|
||||||
XX(__aeabi_f2uiz) \
|
|
||||||
XX(__aeabi_fadd) \
|
XX(__aeabi_fadd) \
|
||||||
XX(__aeabi_fcmpun) \
|
XX(__aeabi_fcmpun) \
|
||||||
XX(__aeabi_fdiv) \
|
XX(__aeabi_fdiv) \
|
||||||
@@ -113,8 +107,6 @@
|
|||||||
XX(__aeabi_l2d) \
|
XX(__aeabi_l2d) \
|
||||||
XX(__aeabi_l2f) \
|
XX(__aeabi_l2f) \
|
||||||
XX(__aeabi_lmul) \
|
XX(__aeabi_lmul) \
|
||||||
XX(__aeabi_llsl) \
|
|
||||||
XX(__aeabi_llsr) \
|
|
||||||
XX(__aeabi_ui2d) \
|
XX(__aeabi_ui2d) \
|
||||||
XX(__aeabi_ui2f) \
|
XX(__aeabi_ui2f) \
|
||||||
XX(__aeabi_ul2d) \
|
XX(__aeabi_ul2d) \
|
||||||
|
|||||||
@@ -27,7 +27,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <machine/cpu-features.h>
|
#include <machine/cpu-features.h>
|
||||||
#include <machine/asm.h>
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.global memcmp
|
||||||
|
.type memcmp, %function
|
||||||
|
.align 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optimized memcmp() for ARM9.
|
* Optimized memcmp() for ARM9.
|
||||||
@@ -38,7 +43,8 @@
|
|||||||
* (2) The loads are scheduled in a way they won't stall
|
* (2) The loads are scheduled in a way they won't stall
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ENTRY(memcmp)
|
memcmp:
|
||||||
|
.fnstart
|
||||||
PLD (r0, #0)
|
PLD (r0, #0)
|
||||||
PLD (r1, #0)
|
PLD (r1, #0)
|
||||||
|
|
||||||
@@ -170,7 +176,7 @@ ENTRY(memcmp)
|
|||||||
9: /* restore registers and return */
|
9: /* restore registers and return */
|
||||||
ldmfd sp!, {r4, lr}
|
ldmfd sp!, {r4, lr}
|
||||||
bx lr
|
bx lr
|
||||||
END(memcmp)
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <machine/cpu-features.h>
|
#include <machine/cpu-features.h>
|
||||||
#include <machine/asm.h>
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.global __memcmp16
|
||||||
|
.type __memcmp16, %function
|
||||||
|
.align 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optimized memcmp16() for ARM9.
|
* Optimized memcmp16() for ARM9.
|
||||||
@@ -38,7 +43,8 @@
|
|||||||
* (2) The loads are scheduled in a way they won't stall
|
* (2) The loads are scheduled in a way they won't stall
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ENTRY(__memcmp16)
|
__memcmp16:
|
||||||
|
.fnstart
|
||||||
PLD (r0, #0)
|
PLD (r0, #0)
|
||||||
PLD (r1, #0)
|
PLD (r1, #0)
|
||||||
|
|
||||||
@@ -89,6 +95,8 @@ ENTRY(__memcmp16)
|
|||||||
/* restore registers and return */
|
/* restore registers and return */
|
||||||
ldmnefd sp!, {r4, lr}
|
ldmnefd sp!, {r4, lr}
|
||||||
bxne lr
|
bxne lr
|
||||||
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0: /* here the first pointer is aligned, and we have at least 3 words
|
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... */
|
7: /* fix up the 2 pointers and fallthrough... */
|
||||||
sub r1, r1, #2
|
sub r1, r1, #2
|
||||||
b 2b
|
b 2b
|
||||||
END(__memcmp16)
|
|
||||||
|
|||||||
@@ -27,18 +27,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <machine/cpu-features.h>
|
#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
|
.text
|
||||||
.fpu neon
|
.fpu neon
|
||||||
|
|
||||||
|
.global memcpy
|
||||||
|
.type memcpy, %function
|
||||||
|
.align 4
|
||||||
|
|
||||||
/* a prefetch distance of 4 cache-lines works best experimentally */
|
/* a prefetch distance of 4 cache-lines works best experimentally */
|
||||||
#define CACHE_LINE_SIZE 64
|
#define CACHE_LINE_SIZE 64
|
||||||
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4)
|
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4)
|
||||||
|
|
||||||
ENTRY(memcpy)
|
memcpy:
|
||||||
|
.fnstart
|
||||||
.save {r0, lr}
|
.save {r0, lr}
|
||||||
stmfd sp!, {r0, lr}
|
stmfd sp!, {r0, lr}
|
||||||
|
|
||||||
@@ -139,12 +143,18 @@ ENTRY(memcpy)
|
|||||||
|
|
||||||
ldmfd sp!, {r0, lr}
|
ldmfd sp!, {r0, lr}
|
||||||
bx lr
|
bx lr
|
||||||
END(memcpy)
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
#else /* __ARM_ARCH__ < 7 */
|
#else /* __ARM_ARCH__ < 7 */
|
||||||
|
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.global memcpy
|
||||||
|
.type memcpy, %function
|
||||||
|
.align 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optimized memcpy() for ARM.
|
* Optimized memcpy() for ARM.
|
||||||
*
|
*
|
||||||
@@ -152,11 +162,12 @@ END(memcpy)
|
|||||||
* so we have to preserve R0.
|
* so we have to preserve R0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ENTRY(memcpy)
|
memcpy:
|
||||||
/* The stack must always be 64-bits aligned to be compliant with the
|
/* 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
|
* 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
|
* which we can use for better pipelining of the reads below
|
||||||
*/
|
*/
|
||||||
|
.fnstart
|
||||||
.save {r0, r4, lr}
|
.save {r0, r4, lr}
|
||||||
stmfd sp!, {r0, r4, lr}
|
stmfd sp!, {r0, r4, lr}
|
||||||
/* Making room for r5-r11 which will be spilled later */
|
/* Making room for r5-r11 which will be spilled later */
|
||||||
@@ -493,7 +504,7 @@ copy_last_3_and_return:
|
|||||||
add sp, sp, #28
|
add sp, sp, #28
|
||||||
ldmfd sp!, {r0, r4, lr}
|
ldmfd sp!, {r0, r4, lr}
|
||||||
bx lr
|
bx lr
|
||||||
END(memcpy)
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ARM_ARCH__ < 7 */
|
#endif /* __ARM_ARCH__ < 7 */
|
||||||
|
|||||||
@@ -25,8 +25,15 @@
|
|||||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
.text
|
||||||
|
|
||||||
#include <machine/asm.h>
|
.global memset
|
||||||
|
.type memset, %function
|
||||||
|
|
||||||
|
.global bzero
|
||||||
|
.type bzero, %function
|
||||||
|
|
||||||
|
.align
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optimized memset() for ARM.
|
* Optimized memset() for ARM.
|
||||||
@@ -34,15 +41,15 @@
|
|||||||
* memset() returns its first argument.
|
* memset() returns its first argument.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ENTRY(bzero)
|
bzero:
|
||||||
mov r2, r1
|
mov r2, r1
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
END(bzero)
|
|
||||||
|
|
||||||
ENTRY(memset)
|
memset:
|
||||||
/* compute the offset to align the destination
|
/* compute the offset to align the destination
|
||||||
* offset = (4-(src&3))&3 = -src & 3
|
* offset = (4-(src&3))&3 = -src & 3
|
||||||
*/
|
*/
|
||||||
|
.fnstart
|
||||||
.save {r0, r4-r7, lr}
|
.save {r0, r4-r7, lr}
|
||||||
stmfd sp!, {r0, r4-r7, lr}
|
stmfd sp!, {r0, r4-r7, lr}
|
||||||
rsb r3, r0, #0
|
rsb r3, r0, #0
|
||||||
@@ -106,4 +113,5 @@ ENTRY(memset)
|
|||||||
strcsb r1, [r0]
|
strcsb r1, [r0]
|
||||||
ldmfd sp!, {r0, r4-r7, lr}
|
ldmfd sp!, {r0, r4-r7, lr}
|
||||||
bx lr
|
bx lr
|
||||||
END(memset)
|
.fnend
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ ENTRY(setjmp)
|
|||||||
|
|
||||||
mov r0, #0x00000000
|
mov r0, #0x00000000
|
||||||
bx lr
|
bx lr
|
||||||
END(setjmp)
|
|
||||||
|
|
||||||
.Lsetjmp_magic:
|
.Lsetjmp_magic:
|
||||||
.word _JB_MAGIC_SETJMP
|
.word _JB_MAGIC_SETJMP
|
||||||
@@ -139,4 +138,3 @@ botch:
|
|||||||
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
||||||
bl PIC_SYM(_C_LABEL(abort), PLT)
|
bl PIC_SYM(_C_LABEL(abort), PLT)
|
||||||
b . - 8 /* Cannot get here */
|
b . - 8 /* Cannot get here */
|
||||||
END(longjmp)
|
|
||||||
|
|||||||
@@ -33,8 +33,6 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _ALIGN_TEXT .align 0
|
|
||||||
|
|
||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
#include <machine/setjmp.h>
|
#include <machine/setjmp.h>
|
||||||
|
|
||||||
@@ -52,7 +50,6 @@ ENTRY(sigsetjmp)
|
|||||||
teq r1, #0
|
teq r1, #0
|
||||||
beq PIC_SYM(_C_LABEL(_setjmp), PLT)
|
beq PIC_SYM(_C_LABEL(_setjmp), PLT)
|
||||||
b PIC_SYM(_C_LABEL(setjmp), PLT)
|
b PIC_SYM(_C_LABEL(setjmp), PLT)
|
||||||
END(sigsetjmp)
|
|
||||||
|
|
||||||
.L_setjmp_magic:
|
.L_setjmp_magic:
|
||||||
.word _JB_MAGIC__SETJMP
|
.word _JB_MAGIC__SETJMP
|
||||||
@@ -63,4 +60,3 @@ ENTRY(siglongjmp)
|
|||||||
teq r2, r3
|
teq r2, r3
|
||||||
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
|
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
|
||||||
b PIC_SYM(_C_LABEL(longjmp), PLT)
|
b PIC_SYM(_C_LABEL(longjmp), PLT)
|
||||||
END(siglongjmp)
|
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -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)
|
|
||||||
@@ -32,15 +32,18 @@
|
|||||||
abort due to a fatal runtime error (e.g. detection
|
abort due to a fatal runtime error (e.g. detection
|
||||||
of a corrupted malloc heap).
|
of a corrupted malloc heap).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
#include <machine/asm.h>
|
|
||||||
|
|
||||||
#ifndef __NR_tkill
|
#ifndef __NR_tkill
|
||||||
#define __NR_tkill 238
|
#define __NR_tkill 238
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(tkill)
|
.text
|
||||||
|
.type tkill, #function
|
||||||
|
.globl tkill
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
tkill:
|
||||||
stmfd sp!, {r4-r7, ip, lr}
|
stmfd sp!, {r4-r7, ip, lr}
|
||||||
ldr r7, =__NR_tkill
|
ldr r7, =__NR_tkill
|
||||||
swi #0
|
swi #0
|
||||||
@@ -48,4 +51,3 @@ ENTRY(tkill)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(tkill)
|
|
||||||
|
|||||||
@@ -1,89 +1,10 @@
|
|||||||
/* $OpenBSD: endian.h,v 1.3 2005/12/13 00:35:23 millert Exp $ */
|
/* $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__
|
#ifdef __ARMEB__
|
||||||
#define _BYTE_ORDER _BIG_ENDIAN
|
#define _BYTE_ORDER _BIG_ENDIAN
|
||||||
#else
|
#else
|
||||||
#define _BYTE_ORDER _LITTLE_ENDIAN
|
#define _BYTE_ORDER _LITTLE_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
#define __STRICT_ALIGNMENT
|
#define __STRICT_ALIGNMENT
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
|
|
||||||
#endif /* !_ARM_ENDIAN_H_ */
|
|
||||||
|
|||||||
@@ -70,13 +70,7 @@
|
|||||||
#define _ASM_TYPE_FUNCTION #function
|
#define _ASM_TYPE_FUNCTION #function
|
||||||
#define _ASM_TYPE_OBJECT #object
|
#define _ASM_TYPE_OBJECT #object
|
||||||
#define _ENTRY(x) \
|
#define _ENTRY(x) \
|
||||||
.text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .fnstart
|
.text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
|
||||||
|
|
||||||
#define _ASM_SIZE(x) .size x, .-x;
|
|
||||||
|
|
||||||
#define _END(x) \
|
|
||||||
.fnend; \
|
|
||||||
_ASM_SIZE(x)
|
|
||||||
|
|
||||||
#ifdef GPROF
|
#ifdef GPROF
|
||||||
# ifdef __ELF__
|
# ifdef __ELF__
|
||||||
@@ -92,16 +86,8 @@
|
|||||||
|
|
||||||
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
|
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
|
||||||
#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
|
#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(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
|
||||||
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
|
#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
|
#define ASMSTR .asciz
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Assembly-only macros */
|
/* Assembly-only macros */
|
||||||
#ifdef __ASSEMBLY__
|
|
||||||
|
|
||||||
/* define a handy PLD(address) macro since the cache preload
|
/* define a handy PLD(address) macro since the cache preload
|
||||||
* is an optional opcode
|
* is an optional opcode
|
||||||
@@ -196,6 +195,4 @@
|
|||||||
# define PLD(reg,offset) /* nothing */
|
# define PLD(reg,offset) /* nothing */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ! __ASSEMBLY__ */
|
|
||||||
|
|
||||||
#endif /* _ARM_MACHINE_CPU_FEATURES_H */
|
#endif /* _ARM_MACHINE_CPU_FEATURES_H */
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ syscall_src += arch-arm/syscalls/getegid.S
|
|||||||
syscall_src += arch-arm/syscalls/getresuid.S
|
syscall_src += arch-arm/syscalls/getresuid.S
|
||||||
syscall_src += arch-arm/syscalls/getresgid.S
|
syscall_src += arch-arm/syscalls/getresgid.S
|
||||||
syscall_src += arch-arm/syscalls/gettid.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/getgroups.S
|
||||||
syscall_src += arch-arm/syscalls/getpgid.S
|
syscall_src += arch-arm/syscalls/getpgid.S
|
||||||
syscall_src += arch-arm/syscalls/getppid.S
|
syscall_src += arch-arm/syscalls/getppid.S
|
||||||
@@ -42,8 +41,8 @@ syscall_src += arch-arm/syscalls/sigaltstack.S
|
|||||||
syscall_src += arch-arm/syscalls/acct.S
|
syscall_src += arch-arm/syscalls/acct.S
|
||||||
syscall_src += arch-arm/syscalls/read.S
|
syscall_src += arch-arm/syscalls/read.S
|
||||||
syscall_src += arch-arm/syscalls/write.S
|
syscall_src += arch-arm/syscalls/write.S
|
||||||
syscall_src += arch-arm/syscalls/pread64.S
|
syscall_src += arch-arm/syscalls/__pread64.S
|
||||||
syscall_src += arch-arm/syscalls/pwrite64.S
|
syscall_src += arch-arm/syscalls/__pwrite64.S
|
||||||
syscall_src += arch-arm/syscalls/__open.S
|
syscall_src += arch-arm/syscalls/__open.S
|
||||||
syscall_src += arch-arm/syscalls/__openat.S
|
syscall_src += arch-arm/syscalls/__openat.S
|
||||||
syscall_src += arch-arm/syscalls/close.S
|
syscall_src += arch-arm/syscalls/close.S
|
||||||
@@ -71,7 +70,6 @@ syscall_src += arch-arm/syscalls/pipe2.S
|
|||||||
syscall_src += arch-arm/syscalls/dup2.S
|
syscall_src += arch-arm/syscalls/dup2.S
|
||||||
syscall_src += arch-arm/syscalls/select.S
|
syscall_src += arch-arm/syscalls/select.S
|
||||||
syscall_src += arch-arm/syscalls/ftruncate.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/getdents.S
|
||||||
syscall_src += arch-arm/syscalls/fsync.S
|
syscall_src += arch-arm/syscalls/fsync.S
|
||||||
syscall_src += arch-arm/syscalls/fdatasync.S
|
syscall_src += arch-arm/syscalls/fdatasync.S
|
||||||
@@ -85,10 +83,6 @@ syscall_src += arch-arm/syscalls/mkdirat.S
|
|||||||
syscall_src += arch-arm/syscalls/fchownat.S
|
syscall_src += arch-arm/syscalls/fchownat.S
|
||||||
syscall_src += arch-arm/syscalls/fchmodat.S
|
syscall_src += arch-arm/syscalls/fchmodat.S
|
||||||
syscall_src += arch-arm/syscalls/renameat.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/link.S
|
||||||
syscall_src += arch-arm/syscalls/unlink.S
|
syscall_src += arch-arm/syscalls/unlink.S
|
||||||
syscall_src += arch-arm/syscalls/unlinkat.S
|
syscall_src += arch-arm/syscalls/unlinkat.S
|
||||||
@@ -108,18 +102,9 @@ syscall_src += arch-arm/syscalls/rmdir.S
|
|||||||
syscall_src += arch-arm/syscalls/rename.S
|
syscall_src += arch-arm/syscalls/rename.S
|
||||||
syscall_src += arch-arm/syscalls/__getcwd.S
|
syscall_src += arch-arm/syscalls/__getcwd.S
|
||||||
syscall_src += arch-arm/syscalls/access.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/symlink.S
|
||||||
syscall_src += arch-arm/syscalls/fchdir.S
|
syscall_src += arch-arm/syscalls/fchdir.S
|
||||||
syscall_src += arch-arm/syscalls/truncate.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/__statfs64.S
|
||||||
syscall_src += arch-arm/syscalls/pause.S
|
syscall_src += arch-arm/syscalls/pause.S
|
||||||
syscall_src += arch-arm/syscalls/gettimeofday.S
|
syscall_src += arch-arm/syscalls/gettimeofday.S
|
||||||
@@ -138,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_getoverrun.S
|
||||||
syscall_src += arch-arm/syscalls/__timer_delete.S
|
syscall_src += arch-arm/syscalls/__timer_delete.S
|
||||||
syscall_src += arch-arm/syscalls/utimes.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/sigaction.S
|
||||||
syscall_src += arch-arm/syscalls/sigprocmask.S
|
syscall_src += arch-arm/syscalls/sigprocmask.S
|
||||||
syscall_src += arch-arm/syscalls/__sigsuspend.S
|
syscall_src += arch-arm/syscalls/__sigsuspend.S
|
||||||
@@ -169,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_max.S
|
||||||
syscall_src += arch-arm/syscalls/sched_get_priority_min.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_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_set.S
|
||||||
syscall_src += arch-arm/syscalls/ioprio_get.S
|
syscall_src += arch-arm/syscalls/ioprio_get.S
|
||||||
syscall_src += arch-arm/syscalls/uname.S
|
syscall_src += arch-arm/syscalls/uname.S
|
||||||
@@ -183,8 +164,6 @@ syscall_src += arch-arm/syscalls/init_module.S
|
|||||||
syscall_src += arch-arm/syscalls/delete_module.S
|
syscall_src += arch-arm/syscalls/delete_module.S
|
||||||
syscall_src += arch-arm/syscalls/klogctl.S
|
syscall_src += arch-arm/syscalls/klogctl.S
|
||||||
syscall_src += arch-arm/syscalls/sysinfo.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/futex.S
|
||||||
syscall_src += arch-arm/syscalls/epoll_create.S
|
syscall_src += arch-arm/syscalls/epoll_create.S
|
||||||
syscall_src += arch-arm/syscalls/epoll_ctl.S
|
syscall_src += arch-arm/syscalls/epoll_ctl.S
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__brk)
|
.text
|
||||||
|
.type __brk, #function
|
||||||
|
.globl __brk
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__brk:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_brk
|
ldr r7, =__NR_brk
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__brk)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__brk)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__fcntl)
|
.text
|
||||||
|
.type __fcntl, #function
|
||||||
|
.globl __fcntl
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__fcntl:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fcntl
|
ldr r7, =__NR_fcntl
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__fcntl)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__fcntl)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__fcntl64)
|
.text
|
||||||
|
.type __fcntl64, #function
|
||||||
|
.globl __fcntl64
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__fcntl64:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fcntl64
|
ldr r7, =__NR_fcntl64
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__fcntl64)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__fcntl64)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__fork)
|
.text
|
||||||
|
.type __fork, #function
|
||||||
|
.globl __fork
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__fork:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fork
|
ldr r7, =__NR_fork
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__fork)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__fork)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__fstatfs64)
|
.text
|
||||||
|
.type __fstatfs64, #function
|
||||||
|
.globl __fstatfs64
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__fstatfs64:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fstatfs64
|
ldr r7, =__NR_fstatfs64
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__fstatfs64)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__fstatfs64)
|
.fnend
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__getcwd)
|
.text
|
||||||
|
.type __getcwd, #function
|
||||||
|
.globl __getcwd
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__getcwd:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_getcwd
|
ldr r7, =__NR_getcwd
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__getcwd)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__getcwd)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__getpriority)
|
.text
|
||||||
|
.type __getpriority, #function
|
||||||
|
.globl __getpriority
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__getpriority:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_getpriority
|
ldr r7, =__NR_getpriority
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__getpriority)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__getpriority)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__ioctl)
|
.text
|
||||||
|
.type __ioctl, #function
|
||||||
|
.globl __ioctl
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__ioctl:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_ioctl
|
ldr r7, =__NR_ioctl
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__ioctl)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__ioctl)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__llseek)
|
.text
|
||||||
|
.type __llseek, #function
|
||||||
|
.globl __llseek
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__llseek:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(__llseek)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__llseek)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__mmap2)
|
.text
|
||||||
|
.type __mmap2, #function
|
||||||
|
.globl __mmap2
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__mmap2:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(__mmap2)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__mmap2)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__open)
|
.text
|
||||||
|
.type __open, #function
|
||||||
|
.globl __open
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__open:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_open
|
ldr r7, =__NR_open
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__open)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__open)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__openat)
|
.text
|
||||||
|
.type __openat, #function
|
||||||
|
.globl __openat
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__openat:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_openat
|
ldr r7, =__NR_openat
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__openat)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__openat)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(pread64)
|
.text
|
||||||
|
.type __pread64, #function
|
||||||
|
.globl __pread64
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__pread64:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(pread64)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(pread64)
|
.fnend
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__ptrace)
|
.text
|
||||||
|
.type __ptrace, #function
|
||||||
|
.globl __ptrace
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__ptrace:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_ptrace
|
ldr r7, =__NR_ptrace
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__ptrace)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__ptrace)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(pwrite64)
|
.text
|
||||||
|
.type __pwrite64, #function
|
||||||
|
.globl __pwrite64
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__pwrite64:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(pwrite64)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(pwrite64)
|
.fnend
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__reboot)
|
.text
|
||||||
|
.type __reboot, #function
|
||||||
|
.globl __reboot
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__reboot:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_reboot
|
ldr r7, =__NR_reboot
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__reboot)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__reboot)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_rt_sigaction
|
ldr r7, =__NR_rt_sigaction
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__rt_sigaction)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__rt_sigaction)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_rt_sigprocmask
|
ldr r7, =__NR_rt_sigprocmask
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__rt_sigprocmask)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__rt_sigprocmask)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_rt_sigtimedwait
|
ldr r7, =__NR_rt_sigtimedwait
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__rt_sigtimedwait)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__rt_sigtimedwait)
|
.fnend
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_ARM_set_tls
|
ldr r7, =__NR_ARM_set_tls
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__set_tls)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__set_tls)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__setresuid)
|
.text
|
||||||
|
.type __setresuid, #function
|
||||||
|
.globl __setresuid
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__setresuid:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_setresuid32
|
ldr r7, =__NR_setresuid32
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__setresuid)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__setresuid)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__setreuid)
|
.text
|
||||||
|
.type __setreuid, #function
|
||||||
|
.globl __setreuid
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__setreuid:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_setreuid32
|
ldr r7, =__NR_setreuid32
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__setreuid)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__setreuid)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__setuid)
|
.text
|
||||||
|
.type __setuid, #function
|
||||||
|
.globl __setuid
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__setuid:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_setuid32
|
ldr r7, =__NR_setuid32
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__setuid)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__setuid)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__sigsuspend)
|
.text
|
||||||
|
.type __sigsuspend, #function
|
||||||
|
.globl __sigsuspend
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__sigsuspend:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_sigsuspend
|
ldr r7, =__NR_sigsuspend
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__sigsuspend)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__sigsuspend)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__statfs64)
|
.text
|
||||||
|
.type __statfs64, #function
|
||||||
|
.globl __statfs64
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__statfs64:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_statfs64
|
ldr r7, =__NR_statfs64
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__statfs64)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__statfs64)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(__sys_clone)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__sys_clone)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__syslog)
|
.text
|
||||||
|
.type __syslog, #function
|
||||||
|
.globl __syslog
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__syslog:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_syslog
|
ldr r7, =__NR_syslog
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__syslog)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__syslog)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_timer_create
|
ldr r7, =__NR_timer_create
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__timer_create)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__timer_create)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_timer_delete
|
ldr r7, =__NR_timer_delete
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__timer_delete)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__timer_delete)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_timer_getoverrun
|
ldr r7, =__NR_timer_getoverrun
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__timer_getoverrun)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__timer_getoverrun)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_timer_gettime
|
ldr r7, =__NR_timer_gettime
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__timer_gettime)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__timer_gettime)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_timer_settime
|
ldr r7, =__NR_timer_settime
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__timer_settime)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__timer_settime)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__wait4)
|
.text
|
||||||
|
.type __wait4, #function
|
||||||
|
.globl __wait4
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__wait4:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_wait4
|
ldr r7, =__NR_wait4
|
||||||
@@ -11,4 +16,4 @@ ENTRY(__wait4)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__wait4)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(__waitid)
|
.text
|
||||||
|
.type __waitid, #function
|
||||||
|
.globl __waitid
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
__waitid:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(__waitid)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(__waitid)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(_exit)
|
.text
|
||||||
|
.type _exit, #function
|
||||||
|
.globl _exit
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
_exit:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_exit_group
|
ldr r7, =__NR_exit_group
|
||||||
@@ -11,4 +16,4 @@ ENTRY(_exit)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(_exit)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_exit
|
ldr r7, =__NR_exit
|
||||||
@@ -11,4 +16,4 @@ ENTRY(_exit_thread)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(_exit_thread)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(accept)
|
.text
|
||||||
|
.type accept, #function
|
||||||
|
.globl accept
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
accept:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_accept
|
ldr r7, =__NR_accept
|
||||||
@@ -11,4 +16,4 @@ ENTRY(accept)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(accept)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(access)
|
.text
|
||||||
|
.type access, #function
|
||||||
|
.globl access
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
access:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_access
|
ldr r7, =__NR_access
|
||||||
@@ -11,4 +16,4 @@ ENTRY(access)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(access)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(acct)
|
.text
|
||||||
|
.type acct, #function
|
||||||
|
.globl acct
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
acct:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_acct
|
ldr r7, =__NR_acct
|
||||||
@@ -11,4 +16,4 @@ ENTRY(acct)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(acct)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(bind)
|
.text
|
||||||
|
.type bind, #function
|
||||||
|
.globl bind
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
bind:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_bind
|
ldr r7, =__NR_bind
|
||||||
@@ -11,4 +16,4 @@ ENTRY(bind)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(bind)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(cacheflush)
|
.text
|
||||||
|
.type cacheflush, #function
|
||||||
|
.globl cacheflush
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
cacheflush:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_ARM_cacheflush
|
ldr r7, =__NR_ARM_cacheflush
|
||||||
@@ -11,4 +16,4 @@ ENTRY(cacheflush)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(cacheflush)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(capget)
|
.text
|
||||||
|
.type capget, #function
|
||||||
|
.globl capget
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
capget:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_capget
|
ldr r7, =__NR_capget
|
||||||
@@ -11,4 +16,4 @@ ENTRY(capget)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(capget)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(capset)
|
.text
|
||||||
|
.type capset, #function
|
||||||
|
.globl capset
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
capset:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_capset
|
ldr r7, =__NR_capset
|
||||||
@@ -11,4 +16,4 @@ ENTRY(capset)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(capset)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(chdir)
|
.text
|
||||||
|
.type chdir, #function
|
||||||
|
.globl chdir
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
chdir:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_chdir
|
ldr r7, =__NR_chdir
|
||||||
@@ -11,4 +16,4 @@ ENTRY(chdir)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(chdir)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(chmod)
|
.text
|
||||||
|
.type chmod, #function
|
||||||
|
.globl chmod
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
chmod:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_chmod
|
ldr r7, =__NR_chmod
|
||||||
@@ -11,4 +16,4 @@ ENTRY(chmod)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(chmod)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(chown)
|
.text
|
||||||
|
.type chown, #function
|
||||||
|
.globl chown
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
chown:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_chown32
|
ldr r7, =__NR_chown32
|
||||||
@@ -11,4 +16,4 @@ ENTRY(chown)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(chown)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(chroot)
|
.text
|
||||||
|
.type chroot, #function
|
||||||
|
.globl chroot
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
chroot:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_chroot
|
ldr r7, =__NR_chroot
|
||||||
@@ -11,4 +16,4 @@ ENTRY(chroot)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(chroot)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_clock_getres
|
ldr r7, =__NR_clock_getres
|
||||||
@@ -11,4 +16,4 @@ ENTRY(clock_getres)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(clock_getres)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_clock_gettime
|
ldr r7, =__NR_clock_gettime
|
||||||
@@ -11,4 +16,4 @@ ENTRY(clock_gettime)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(clock_gettime)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_clock_nanosleep
|
ldr r7, =__NR_clock_nanosleep
|
||||||
@@ -11,4 +16,4 @@ ENTRY(clock_nanosleep)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(clock_nanosleep)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_clock_settime
|
ldr r7, =__NR_clock_settime
|
||||||
@@ -11,4 +16,4 @@ ENTRY(clock_settime)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(clock_settime)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(close)
|
.text
|
||||||
|
.type close, #function
|
||||||
|
.globl close
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
close:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_close
|
ldr r7, =__NR_close
|
||||||
@@ -11,4 +16,4 @@ ENTRY(close)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(close)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(connect)
|
.text
|
||||||
|
.type connect, #function
|
||||||
|
.globl connect
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
connect:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_connect
|
ldr r7, =__NR_connect
|
||||||
@@ -11,4 +16,4 @@ ENTRY(connect)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(connect)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.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}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_delete_module
|
ldr r7, =__NR_delete_module
|
||||||
@@ -11,4 +16,4 @@ ENTRY(delete_module)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(delete_module)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(dup)
|
.text
|
||||||
|
.type dup, #function
|
||||||
|
.globl dup
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
dup:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_dup
|
ldr r7, =__NR_dup
|
||||||
@@ -11,4 +16,4 @@ ENTRY(dup)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(dup)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(dup2)
|
.text
|
||||||
|
.type dup2, #function
|
||||||
|
.globl dup2
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
dup2:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_dup2
|
ldr r7, =__NR_dup2
|
||||||
@@ -11,4 +16,4 @@ ENTRY(dup2)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(dup2)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(epoll_create)
|
.text
|
||||||
|
.type epoll_create, #function
|
||||||
|
.globl epoll_create
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
epoll_create:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_epoll_create
|
ldr r7, =__NR_epoll_create
|
||||||
@@ -11,4 +16,4 @@ ENTRY(epoll_create)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(epoll_create)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(epoll_ctl)
|
.text
|
||||||
|
.type epoll_ctl, #function
|
||||||
|
.globl epoll_ctl
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
epoll_ctl:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_epoll_ctl
|
ldr r7, =__NR_epoll_ctl
|
||||||
@@ -11,4 +16,4 @@ ENTRY(epoll_ctl)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(epoll_ctl)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(epoll_wait)
|
.text
|
||||||
|
.type epoll_wait, #function
|
||||||
|
.globl epoll_wait
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
epoll_wait:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_epoll_wait
|
ldr r7, =__NR_epoll_wait
|
||||||
@@ -11,4 +16,4 @@ ENTRY(epoll_wait)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(epoll_wait)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(eventfd)
|
.text
|
||||||
|
.type eventfd, #function
|
||||||
|
.globl eventfd
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
eventfd:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_eventfd2
|
ldr r7, =__NR_eventfd2
|
||||||
@@ -11,4 +16,4 @@ ENTRY(eventfd)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(eventfd)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(execve)
|
.text
|
||||||
|
.type execve, #function
|
||||||
|
.globl execve
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
execve:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_execve
|
ldr r7, =__NR_execve
|
||||||
@@ -11,4 +16,4 @@ ENTRY(execve)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(execve)
|
.fnend
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
|
||||||
|
|
||||||
ENTRY(faccessat)
|
|
||||||
.save {r4, r7}
|
|
||||||
stmfd sp!, {r4, r7}
|
|
||||||
ldr r7, =__NR_faccessat
|
|
||||||
swi #0
|
|
||||||
ldmfd sp!, {r4, r7}
|
|
||||||
movs r0, r0
|
|
||||||
bxpl lr
|
|
||||||
b __set_syscall_errno
|
|
||||||
END(faccessat)
|
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fchdir)
|
.text
|
||||||
|
.type fchdir, #function
|
||||||
|
.globl fchdir
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fchdir:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fchdir
|
ldr r7, =__NR_fchdir
|
||||||
@@ -11,4 +16,4 @@ ENTRY(fchdir)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fchdir)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fchmod)
|
.text
|
||||||
|
.type fchmod, #function
|
||||||
|
.globl fchmod
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fchmod:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fchmod
|
ldr r7, =__NR_fchmod
|
||||||
@@ -11,4 +16,4 @@ ENTRY(fchmod)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fchmod)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fchmodat)
|
.text
|
||||||
|
.type fchmodat, #function
|
||||||
|
.globl fchmodat
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fchmodat:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fchmodat
|
ldr r7, =__NR_fchmodat
|
||||||
@@ -11,4 +16,4 @@ ENTRY(fchmodat)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fchmodat)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fchown)
|
.text
|
||||||
|
.type fchown, #function
|
||||||
|
.globl fchown
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fchown:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fchown32
|
ldr r7, =__NR_fchown32
|
||||||
@@ -11,4 +16,4 @@ ENTRY(fchown)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fchown)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fchownat)
|
.text
|
||||||
|
.type fchownat, #function
|
||||||
|
.globl fchownat
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fchownat:
|
||||||
mov ip, sp
|
mov ip, sp
|
||||||
.save {r4, r5, r6, r7}
|
.save {r4, r5, r6, r7}
|
||||||
stmfd sp!, {r4, r5, r6, r7}
|
stmfd sp!, {r4, r5, r6, r7}
|
||||||
@@ -13,4 +18,4 @@ ENTRY(fchownat)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fchownat)
|
.fnend
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
/* autogenerated by gensyscalls.py */
|
/* autogenerated by gensyscalls.py */
|
||||||
#include <machine/asm.h>
|
|
||||||
#include <sys/linux-syscalls.h>
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
ENTRY(fdatasync)
|
.text
|
||||||
|
.type fdatasync, #function
|
||||||
|
.globl fdatasync
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
fdatasync:
|
||||||
.save {r4, r7}
|
.save {r4, r7}
|
||||||
stmfd sp!, {r4, r7}
|
stmfd sp!, {r4, r7}
|
||||||
ldr r7, =__NR_fdatasync
|
ldr r7, =__NR_fdatasync
|
||||||
@@ -11,4 +16,4 @@ ENTRY(fdatasync)
|
|||||||
movs r0, r0
|
movs r0, r0
|
||||||
bxpl lr
|
bxpl lr
|
||||||
b __set_syscall_errno
|
b __set_syscall_errno
|
||||||
END(fdatasync)
|
.fnend
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user