author | Calin Juravle <calin@google.com> | |
Tue, 25 Feb 2014 10:44:25 +0000 (10:44 +0000) | ||
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | |
Tue, 25 Feb 2014 10:44:26 +0000 (10:44 +0000) |
689 files changed:
diff --git a/HACKING.txt b/HACKING.txt
--- /dev/null
+++ b/HACKING.txt
@@ -0,0 +1,163 @@
+Working on bionic
+=================
+
+What are the big pieces of bionic?
+----------------------------------
+
+libc/ --- libc.so, libc.a
+ The C library. Stuff like fopen(3) and kill(2).
+libm/ --- libm.so, libm.a
+ The math library. Traditionally Unix systems kept stuff like sin(3) and
+ cos(3) in a separate library to save space in the days before shared
+ libraries.
+libdl/ --- libdl.so
+ The dynamic linker interface library. This is actually just a bunch of
+ stubs that the dynamic linker replaces with pointers to its own
+ implementation at runtime. This is where stuff like dlopen(3) lives.
+libstdc++/ --- libstdc++.so
+ The C++ ABI support functions. The C++ compiler doesn't know how to
+ implement thread-safe static initialization and the like, so it just calls
+ functions that are supplied by the system. Stuff like __cxa_guard_acquire
+ and __cxa_pure_virtual live here.
+
+linker/ --- /system/bin/linker and /system/bin/linker64
+ The dynamic linker. When you run a dynamically-linked executable, its ELF
+ file has a DT_INTERP entry that says "use the following program to start me".
+ On Android, that's either linker or linker64 (depending on whether it's a
+ 32-bit or 64-bit executable). It's responsible for loading the ELF executable
+ into memory and resolving references to symbols (so that when your code tries
+ to jump to fopen(3), say, it lands in the right place).
+
+tests/ --- unit tests
+ The tests/ directory contains unit tests. Roughly arranged as one file per
+ publicly-exported header file.
+benchmarks/ --- benchmarks
+ The benchmarks/ directory contains benchmarks.
+
+
+What's in libc/?
+----------------
+
+libc/
+ arch-arm/
+ arch-arm64/
+ arch-common/
+ arch-mips/
+ arch-mips64/
+ arch-x86/
+ arch-x86_64/
+ # Each architecture has its own subdirectory for stuff that isn't shared
+ # because it's architecture-specific. There will be a .mk file in here that
+ # drags in all the architecture-specific files.
+ bionic/
+ # Every architecture needs a handful of machine-specific assembler files.
+ # They live here.
+ include/
+ machine/
+ # The majority of header files are actually in libc/include/, but many
+ # of them pull in a <machine/something.h> for things like limits,
+ # endianness, and how floating point numbers are represented. Those
+ # headers live here.
+ string/
+ # Most architectures have a handful of optional assembler files
+ # implementing optimized versions of various routines. The <string.h>
+ # functions are particular favorites.
+ syscalls/
+ # The syscalls directories contain script-generated assembler files.
+ # See 'Adding system calls' later.
+
+ include/
+ # The public header files on everyone's include path. These are a mixture of
+ # files written by us and files taken from BSD.
+
+ kernel/
+ # The kernel uapi header files. These are scrubbed copies of the originals
+ # in external/kernel-headers/. These files must not be edited directly. The
+ # generate_uapi_headers.sh script should be used to go from a kernel tree to
+ # external/kernel-headers/ --- this takes care of the architecture-specific
+ # details. The update_all.py script should be used to regenerate bionic's
+ # scrubbed headers from external/kernel-headers/.
+
+ private/
+ # These are private header files meant for use within bionic itself.
+
+ netbsd/
+ stdio/
+ stdlib/
+ string/
+ unistd/
+ wchar/
+ # These are legacy files of unknown provenance. In the past, bionic was a
+ # mess of random versions of random files from all three of FreeBSD, NetBSD,
+ # and OpenBSD! We've been working to clean that up, but these directories
+ # are basically where all the stuff we haven't got to yet lives.
+ # The 'netbsd' directory misleadingly contains the DNS resolver (which will
+ # probably be forked sometime soon, and that directory simply renamed).
+ # The other directories contain stuff that still needs to be sorted.
+
+ upstream-dlmalloc/
+ upstream-freebsd/
+ upstream-netbsd/
+ upstream-openbsd/
+ # These directories contain unmolested upstream source. Any time we can
+ # just use a BSD implementation of something unmodified, we should.
+ # See files like netbsd-compat.h for various ways in which we manage to
+ # build BSD source in bionic.
+
+ bionic/
+ # This is the biggest mess. The C++ files are files we own, typically
+ # because the Linux kernel interface is sufficiently different that we
+ # can't use any of the BSD implementations. The C files are usually
+ # legacy mess that needs to be sorted out, either by replacing it with
+ # current upstream source in one of the upstream directories or by
+ # switching the file to C++ and cleaning it up.
+
+ tools/
+ # Various tools used to maintain bionic.
+
+ tzcode/
+ # A modified superset of the IANA tzcode. Most of the modifications relate
+ # to Android's use of a single file (with corresponding index) to contain
+ # time zone data.
+ zoneinfo/
+ # Android-format time zone data.
+ # See 'Updating tzdata' later.
+
+
+Adding system calls
+-------------------
+
+Adding a system call usually involves:
+
+ 1. Add entries to SYSCALLS.TXT.
+ See SYSCALLS.TXT itself for documentation on the format.
+ 2. Run the gensyscalls.py script.
+ 3. Add constants (and perhaps types) to the appropriate header file.
+ Note that you should check to see whether the constants are already in
+ kernel uapi header files, in which case you just need to make sure that
+ the appropriate POSIX header file in libc/include/ includes the
+ relevant file or files.
+ 4. Add function declarations to the appropriate header file.
+ 5. Add at least basic tests. Even a test that deliberately supplies
+ an invalid argument helps check that we're generating the right symbol
+ and have the right declaration in the header file. (And strace(1) can
+ confirm that the correct system call is being made.)
+
+
+Updating kernel header files
+----------------------------
+
+As mentioned above, this is currently a two-step process:
+
+ 1. Use generate_uapi_headers.sh to go from a Linux source tree to appropriate
+ contents for external/kernel-headers/.
+ 2. Run update_all.py to scrub those headers and import them into bionic.
+
+
+Updating tzdata
+---------------
+
+This is fully automated:
+
+ 1. Run update-tzdata.py.
+
diff --git a/libc/Android.mk b/libc/Android.mk
index 41b1b82161086f86810e9da7fe0f069e160b33a8..1bee427e72116c0ab2b90f9c8dc31462dee771d3 100644 (file)
--- a/libc/Android.mk
+++ b/libc/Android.mk
# =========================================================
libc_common_src_files := \
bionic/arc4random.c \
- bionic/atoi.c \
- bionic/atol.c \
- bionic/atoll.c \
bionic/bindresvport.c \
bionic/clearenv.c \
bionic/daemon.c \
bionic/fdprintf.c \
bionic/flockfile.c \
bionic/ftime.c \
- bionic/ftok.c \
bionic/fts.c \
bionic/getdtablesize.c \
bionic/gethostname.c \
bionic/memmem.c \
bionic/memswap.c \
bionic/pathconf.c \
- bionic/perror.c \
bionic/ptsname.c \
bionic/ptsname_r.c \
bionic/pututline.c \
bionic/sigblock.c \
bionic/siginterrupt.c \
bionic/sigsetmask.c \
- bionic/strndup.c \
bionic/strntoimax.c \
bionic/strntoumax.c \
bionic/strtotimeval.c \
- bionic/system_properties.c \
bionic/system_properties_compat.c \
bionic/tcgetpgrp.c \
bionic/tcsetpgrp.c \
bionic/utmp.c \
bionic/wcscoll.c \
stdio/asprintf.c \
- stdio/fflush.c \
- stdio/fgetc.c \
stdio/findfp.c \
stdio/fprintf.c \
- stdio/fputc.c \
stdio/fread.c \
stdio/freopen.c \
- stdio/fscanf.c \
- stdio/fseek.c \
- stdio/ftell.c \
stdio/fvwrite.c \
- stdio/gets.c \
- stdio/printf.c \
- stdio/refill.c \
- stdio/rewind.c \
- stdio/scanf.c \
stdio/snprintf.c\
stdio/sprintf.c \
stdio/sscanf.c \
- stdio/stdio.c \
- stdio/ungetc.c \
- stdio/vasprintf.c \
stdio/vfprintf.c \
stdio/vfscanf.c \
- stdio/vprintf.c \
- stdio/vscanf.c \
- stdio/vsnprintf.c \
- stdio/vsprintf.c \
stdio/vsscanf.c \
- stdio/wbuf.c \
stdlib/atexit.c \
stdlib/ctype_.c \
stdlib/getenv.c \
stdlib/putenv.c \
stdlib/setenv.c \
stdlib/strtod.c \
- stdlib/strtoimax.c \
- stdlib/strtol.c \
- stdlib/strtoll.c \
- stdlib/strtoul.c \
- stdlib/strtoull.c \
- stdlib/strtoumax.c \
- stdlib/tolower_.c \
- stdlib/toupper_.c \
- string/strcasecmp.c \
- string/strcspn.c \
- string/strdup.c \
- string/strpbrk.c \
- string/strsep.c \
- string/strspn.c \
- string/strstr.c \
- string/strtok.c \
unistd/alarm.c \
- unistd/exec.c \
- unistd/fnmatch.c \
unistd/syslog.c \
unistd/system.c \
unistd/time.c \
wchar/wcswidth.c \
wchar/wcsxfrm.c \
-
-libc_dns_src_files += \
- netbsd/gethnamaddr.c \
- netbsd/inet/nsap_addr.c \
- netbsd/nameser/ns_name.c \
- netbsd/nameser/ns_netint.c \
- netbsd/nameser/ns_parse.c \
- netbsd/nameser/ns_print.c \
- netbsd/nameser/ns_samedomain.c \
- netbsd/nameser/ns_ttl.c \
- netbsd/net/base64.c \
- netbsd/net/getaddrinfo.c \
- netbsd/net/getnameinfo.c \
- netbsd/net/getservbyname.c \
- netbsd/net/getservbyport.c \
- netbsd/net/getservent.c \
- netbsd/net/nsdispatch.c \
- netbsd/resolv/__dn_comp.c \
- netbsd/resolv/herror.c \
- netbsd/resolv/res_cache.c \
- netbsd/resolv/__res_close.c \
- netbsd/resolv/res_comp.c \
- netbsd/resolv/res_data.c \
- netbsd/resolv/res_debug.c \
- netbsd/resolv/res_init.c \
- netbsd/resolv/res_mkquery.c \
- netbsd/resolv/res_query.c \
- netbsd/resolv/__res_send.c \
- netbsd/resolv/res_send.c \
- netbsd/resolv/res_state.c \
-
-
# Fortify implementations of libc functions.
libc_common_src_files += \
bionic/__FD_chk.cpp \
bionic/stubs.cpp \
bionic/symlink.cpp \
bionic/sysconf.cpp \
+ bionic/system_properties.cpp \
bionic/sys_siglist.c \
bionic/sys_signame.c \
bionic/tdestroy.cpp \
bionic/wait.cpp \
bionic/wchar.cpp \
-
libc_upstream_freebsd_src_files := \
upstream-freebsd/lib/libc/gen/sleep.c \
upstream-freebsd/lib/libc/gen/usleep.c \
- upstream-freebsd/lib/libc/stdio/clrerr.c \
upstream-freebsd/lib/libc/stdio/fclose.c \
- upstream-freebsd/lib/libc/stdio/fdopen.c \
- upstream-freebsd/lib/libc/stdio/feof.c \
- upstream-freebsd/lib/libc/stdio/ferror.c \
- upstream-freebsd/lib/libc/stdio/fgetln.c \
- upstream-freebsd/lib/libc/stdio/fgetpos.c \
- upstream-freebsd/lib/libc/stdio/fgets.c \
- upstream-freebsd/lib/libc/stdio/fileno.c \
upstream-freebsd/lib/libc/stdio/flags.c \
upstream-freebsd/lib/libc/stdio/fopen.c \
- upstream-freebsd/lib/libc/stdio/fpurge.c \
- upstream-freebsd/lib/libc/stdio/fputs.c \
- upstream-freebsd/lib/libc/stdio/fsetpos.c \
- upstream-freebsd/lib/libc/stdio/funopen.c \
- upstream-freebsd/lib/libc/stdio/fwalk.c \
upstream-freebsd/lib/libc/stdio/fwrite.c \
- upstream-freebsd/lib/libc/stdio/getc.c \
- upstream-freebsd/lib/libc/stdio/getchar.c \
upstream-freebsd/lib/libc/stdio/makebuf.c \
upstream-freebsd/lib/libc/stdio/mktemp.c \
- upstream-freebsd/lib/libc/stdio/putc.c \
- upstream-freebsd/lib/libc/stdio/putchar.c \
- upstream-freebsd/lib/libc/stdio/puts.c \
upstream-freebsd/lib/libc/stdio/putw.c \
- upstream-freebsd/lib/libc/stdio/remove.c \
- upstream-freebsd/lib/libc/stdio/rget.c \
- upstream-freebsd/lib/libc/stdio/setbuf.c \
- upstream-freebsd/lib/libc/stdio/setbuffer.c \
upstream-freebsd/lib/libc/stdio/setvbuf.c \
- upstream-freebsd/lib/libc/stdio/tempnam.c \
- upstream-freebsd/lib/libc/stdio/tmpnam.c \
upstream-freebsd/lib/libc/stdio/wsetup.c \
upstream-freebsd/lib/libc/stdlib/abs.c \
upstream-freebsd/lib/libc/stdlib/getopt_long.c \
libc_upstream_netbsd_src_files := \
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
upstream-netbsd/common/lib/libc/inet/inet_addr.c \
- upstream-netbsd/libc/gen/ftw.c \
- upstream-netbsd/libc/gen/nftw.c \
- upstream-netbsd/libc/gen/nice.c \
- upstream-netbsd/libc/gen/popen.c \
- upstream-netbsd/libc/gen/psignal.c \
- upstream-netbsd/libc/gen/setjmperr.c \
- upstream-netbsd/libc/gen/utime.c \
- upstream-netbsd/libc/inet/inet_ntoa.c \
- upstream-netbsd/libc/inet/inet_ntop.c \
- upstream-netbsd/libc/inet/inet_pton.c \
- upstream-netbsd/libc/isc/ev_streams.c \
- upstream-netbsd/libc/isc/ev_timers.c \
- upstream-netbsd/libc/regex/regcomp.c \
- upstream-netbsd/libc/regex/regerror.c \
- upstream-netbsd/libc/regex/regexec.c \
- upstream-netbsd/libc/regex/regfree.c \
- upstream-netbsd/libc/stdio/getdelim.c \
- upstream-netbsd/libc/stdio/getline.c \
- upstream-netbsd/libc/stdlib/bsearch.c \
- upstream-netbsd/libc/stdlib/div.c \
- upstream-netbsd/libc/stdlib/drand48.c \
- upstream-netbsd/libc/stdlib/erand48.c \
- upstream-netbsd/libc/stdlib/exit.c \
- upstream-netbsd/libc/stdlib/jrand48.c \
- upstream-netbsd/libc/stdlib/ldiv.c \
- upstream-netbsd/libc/stdlib/lldiv.c \
- upstream-netbsd/libc/stdlib/lrand48.c \
- upstream-netbsd/libc/stdlib/mrand48.c \
- upstream-netbsd/libc/stdlib/nrand48.c \
- upstream-netbsd/libc/stdlib/_rand48.c \
- upstream-netbsd/libc/stdlib/seed48.c \
- upstream-netbsd/libc/stdlib/srand48.c \
- upstream-netbsd/libc/stdlib/tdelete.c \
- upstream-netbsd/libc/stdlib/tfind.c \
- upstream-netbsd/libc/stdlib/tsearch.c \
- upstream-netbsd/libc/string/memccpy.c \
- upstream-netbsd/libc/string/strcasestr.c \
- upstream-netbsd/libc/string/strcoll.c \
- upstream-netbsd/libc/string/strxfrm.c \
- upstream-netbsd/libc/thread-stub/__isthreaded.c \
- upstream-netbsd/libc/unistd/killpg.c \
+ upstream-netbsd/lib/libc/gen/ftw.c \
+ upstream-netbsd/lib/libc/gen/nftw.c \
+ upstream-netbsd/lib/libc/gen/nice.c \
+ upstream-netbsd/lib/libc/gen/popen.c \
+ upstream-netbsd/lib/libc/gen/psignal.c \
+ upstream-netbsd/lib/libc/gen/setjmperr.c \
+ upstream-netbsd/lib/libc/gen/utime.c \
+ upstream-netbsd/lib/libc/inet/inet_ntoa.c \
+ upstream-netbsd/lib/libc/inet/inet_ntop.c \
+ upstream-netbsd/lib/libc/inet/inet_pton.c \
+ upstream-netbsd/lib/libc/isc/ev_streams.c \
+ upstream-netbsd/lib/libc/isc/ev_timers.c \
+ upstream-netbsd/lib/libc/regex/regcomp.c \
+ upstream-netbsd/lib/libc/regex/regerror.c \
+ upstream-netbsd/lib/libc/regex/regexec.c \
+ upstream-netbsd/lib/libc/regex/regfree.c \
+ upstream-netbsd/lib/libc/stdlib/bsearch.c \
+ upstream-netbsd/lib/libc/stdlib/div.c \
+ upstream-netbsd/lib/libc/stdlib/drand48.c \
+ upstream-netbsd/lib/libc/stdlib/erand48.c \
+ upstream-netbsd/lib/libc/stdlib/exit.c \
+ upstream-netbsd/lib/libc/stdlib/jrand48.c \
+ upstream-netbsd/lib/libc/stdlib/ldiv.c \
+ upstream-netbsd/lib/libc/stdlib/lldiv.c \
+ upstream-netbsd/lib/libc/stdlib/lrand48.c \
+ upstream-netbsd/lib/libc/stdlib/mrand48.c \
+ upstream-netbsd/lib/libc/stdlib/nrand48.c \
+ upstream-netbsd/lib/libc/stdlib/_rand48.c \
+ upstream-netbsd/lib/libc/stdlib/seed48.c \
+ upstream-netbsd/lib/libc/stdlib/srand48.c \
+ upstream-netbsd/lib/libc/stdlib/tdelete.c \
+ upstream-netbsd/lib/libc/stdlib/tfind.c \
+ upstream-netbsd/lib/libc/stdlib/tsearch.c \
+ upstream-netbsd/lib/libc/string/memccpy.c \
+ upstream-netbsd/lib/libc/string/strcasestr.c \
+ upstream-netbsd/lib/libc/string/strcoll.c \
+ upstream-netbsd/lib/libc/string/strxfrm.c \
+ upstream-netbsd/lib/libc/thread-stub/__isthreaded.c \
+ upstream-netbsd/lib/libc/unistd/killpg.c \
libc_arch_static_src_files := \
bionic/dl_iterate_phdr_static.cpp \
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- tzcode/asctime.c \
- tzcode/difftime.c \
- tzcode/localtime.c \
- tzcode/strftime.c \
- tzcode/strptime.c \
-
+LOCAL_SRC_FILES := $(call all-c-files-under,tzcode)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
-DSTD_INSPIRED=1 \
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(libc_dns_src_files)
+LOCAL_SRC_FILES := $(call all-c-files-under,netbsd)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
-DINET6 \
-I$(LOCAL_PATH)/private \
- -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers
-
+ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include # for NetBSD private headers
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
LOCAL_C_INCLUDES := $(libc_common_c_includes)
$(libc_common_cflags) \
-DPOSIX_MISTAKE \
-I$(LOCAL_PATH)/upstream-netbsd \
- -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
+ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
-include upstream-netbsd/netbsd-compat.h
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
include $(BUILD_STATIC_LIBRARY)
+# ========================================================
+# libc_openbsd.a - upstream OpenBSD C library code
+# ========================================================
+#
+# These files are built with the openbsd-compat.h header file
+# automatically included.
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-c-files-under,upstream-openbsd)
+LOCAL_CFLAGS := \
+ $(libc_common_cflags) \
+ -I$(LOCAL_PATH)/upstream-openbsd \
+ -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
+ -include upstream-openbsd/openbsd-compat.h
+LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
+LOCAL_CPPFLAGS := $(libc_common_cppflags)
+LOCAL_C_INCLUDES := $(libc_common_c_includes)
+LOCAL_MODULE := libc_openbsd
+LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
+LOCAL_SYSTEM_SHARED_LIBRARIES :=
+
+$(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
+include $(BUILD_STATIC_LIBRARY)
+
+
# ========================================================
# libc_bionic.a - home-grown C library code
# ========================================================
libc_dns \
libc_freebsd \
libc_netbsd \
+ libc_openbsd \
libc_syscalls \
libc_tzcode \
diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk
index ccdf5a1d07618446489124e36186f052ff6ca8fe..55f99783ab28efa65cda5c55acb84357c12ad353 100644 (file)
--- a/libc/arch-arm/arm.mk
+++ b/libc/arch-arm/arm.mk
# bionic/__strcpy_chk.cpp \
# bionic/__strcat_chk.cpp \
-# cflags
-libc_common_cflags_arm := \
- -DSOFTFLOAT \
- -fstrict-aliasing
+libc_common_cflags_arm := -DSOFTFLOAT
##########################################
### CPU specific source files
arch-arm/bionic/sigsetjmp.S \
arch-arm/bionic/syscall.S \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_arm := \
- arch-arm/bionic/exidx_static.c \
-
-libc_arch_dynamic_src_files_arm := \
- arch-arm/bionic/exidx_dynamic.c \
+libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
+libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
## CPU variant specific source files
ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
cpu_variant_mk :=
-##########################################
-# crt-related
+
libc_crt_target_cflags_arm := \
-I$(LOCAL_PATH)/arch-arm/include \
-mthumb-interwork
index 2a7e7b7716e6a7aa207f4b5a9b5bfefc74b24f92..aabec6d8cc819dd4b07b5063f82b17f7cbf705ae 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov r0, sp
index 6b8aa503a635c2e03e1c06e72330c610ca198bcb..64a0a31c93dc8fa49ca778e4faeb6365508d9636 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
#include <machine/cpu-features.h>
/* validation failed, die die die. */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(_longjmp)
index 1aaf21ad88b17b075817a449e5e626aca6c88fa9..6b181efb753f2ce0592453fad36efce0c0268799 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* Coding the abort function in assembly so that registers are guaranteed to
.cfi_def_cfa_offset 8
.cfi_rel_offset r3, 0
.cfi_rel_offset r14, 4
- bl PIC_SYM(_C_LABEL(__libc_android_abort), PLT)
+ bl PIC_SYM(__libc_android_abort, PLT)
END(abort)
index f694060e6963103a5f12205ec255d6f5c32f2e8a..c45e6e2cabd87ee9617d6950bdbe78343e5e3839 100644 (file)
-/*
- * 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.
- */
-
-/* This file contains dummy references to libgcc.a functions to force the
- * dynamic linker to copy their definition into the final libc.so binary.
- *
- * They are required to ensure backwards binary compatibility with
- * libc.so provided by the platform and binaries built with the NDK or
- * different versions/configurations of toolchains.
- *
- * Now, for a more elaborate description of the issue:
- *
- * libgcc.a is a compiler-specific library containing various helper
- * functions used to implement certain operations that are not necessarily
- * supported by the target CPU. For example, integer division doesn't have a
- * corresponding CPU instruction on ARMv5, and is instead implemented in the
- * compiler-generated machine code as a call to an __idiv helper function.
- *
- * Normally, one has to place libgcc.a in the link command used to generate
- * target binaries (shared libraries and executables) after all objects and
- * static libraries, but before dependent shared libraries, i.e. something
- * like:
- * gcc <options> -o libfoo.so foo.a libgcc.a -lc -lm
- *
- * This ensures that any helper function needed by the code in foo.a is copied
- * into the final libfoo.so. However, doing so will link a bunch of other __cxa
- * functions from libgcc.a into each .so and executable, causing 4k+ increase
- * in every binary. Therefore the Android platform build system has been
- * using this instead:
- *
- * gcc <options> -o libfoo.so foo.a -lc -lm libgcc.a
- *
- * The problem with this is that if one helper function needed by foo.a has
- * already been copied into libc.so or libm.so, then nothing will be copied
- * into libfoo.so. Instead, a symbol import definition will be added to it
- * so libfoo.so can directly call the one in libc.so at runtime.
- *
- * When refreshing toolchains for new versions or using different architecture
- * flags, the set of helper functions copied to libc.so may change, which
- * resulted in some native shared libraries generated with the NDK or prebuilts
- * from vendors to fail to load properly.
- *
- * The NDK has been fixed after 1.6_r1 to use the correct link command, so
- * any native shared library generated with it should now be safe from that
- * problem. On the other hand, existing shared libraries distributed with
- * applications that were generated with a previous version of the NDK
- * still need all 1.5/1.6 helper functions in libc.so and libm.so
- *
- * After 3.2, the toolchain was updated again, adding __aeabi_f2uiz to the
- * list of requirements. Technically, this is due to mis-linked NDK libraries
- * but it is easier to add a single function here than asking several app
- * developers to fix their build.
- *
- * The __aeabi_idiv function is added to the list since cortex-a15 supports
- * HW idiv instructions so the system libc.so doesn't pull in the reference to
- * __aeabi_idiv but legacy libraries built against cortex-a9 targets still need
- * it.
- *
- * 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,
- * since libm.so depends on libc.so, it's easier to put all of
- * these in libc.so instead, since the dynamic linker will always
- * search in libc.so before libm.so for dependencies.
- */
+/* Generated by genlibgcc_compat.py */
#define COMPAT_FUNCTIONS_LIST \
- XX(__adddf3) \
- XX(__addsf3) \
- XX(__aeabi_cdcmpeq) \
- XX(__aeabi_cdcmple) \
- XX(__aeabi_cdrcmple) \
- XX(__aeabi_d2f) \
- XX(__aeabi_d2iz) \
- XX(__aeabi_dadd) \
- XX(__aeabi_dcmpeq) \
- XX(__aeabi_dcmpge) \
- XX(__aeabi_dcmpgt) \
- XX(__aeabi_dcmple) \
- XX(__aeabi_dcmplt) \
- XX(__aeabi_dcmpun) \
- XX(__aeabi_ddiv) \
- XX(__aeabi_dmul) \
- XX(__aeabi_drsub) \
- XX(__aeabi_dsub) \
- XX(__aeabi_f2d) \
- XX(__aeabi_f2iz) \
- XX(__aeabi_f2uiz) \
- XX(__aeabi_fadd) \
- XX(__aeabi_fcmpun) \
- XX(__aeabi_fdiv) \
- XX(__aeabi_fmul) \
- XX(__aeabi_frsub) \
- XX(__aeabi_fsub) \
- XX(__aeabi_i2d) \
- XX(__aeabi_i2f) \
- XX(__aeabi_idiv) \
- XX(__aeabi_idivmod) \
- XX(__aeabi_l2d) \
- XX(__aeabi_l2f) \
- XX(__aeabi_lasr) \
- XX(__aeabi_ldivmod) \
- XX(__aeabi_llsl) \
- XX(__aeabi_llsr) \
- XX(__aeabi_lmul) \
- XX(__aeabi_ui2d) \
- XX(__aeabi_ui2f) \
- XX(__aeabi_uidiv) \
- XX(__aeabi_uidivmod) \
- XX(__aeabi_ul2d) \
- XX(__aeabi_ul2f) \
- XX(__aeabi_uldivmod) \
- XX(__cmpdf2) \
- XX(__divdf3) \
- XX(__divsf3) \
- XX(__eqdf2) \
- XX(__extendsfdf2) \
- XX(__fixdfsi) \
- XX(__fixsfsi) \
- XX(__floatdidf) \
- XX(__floatdisf) \
- XX(__floatsidf) \
- XX(__floatsisf) \
- XX(__floatundidf) \
- XX(__floatundisf) \
- XX(__floatunsidf) \
- XX(__floatunsisf) \
- XX(__gedf2) \
- XX(__gtdf2) \
- XX(__ledf2) \
- XX(__ltdf2) \
- XX(__muldf3) \
- XX(__muldi3) \
- XX(__mulsf3) \
- XX(__nedf2) \
- XX(__popcountsi2) \
- XX(__popcount_tab) \
- XX(__subdf3) \
- XX(__subsf3) \
- XX(__truncdfsf2) \
- XX(__unorddf2) \
- XX(__unordsf2) \
+ XX(__adddf3) \
+ XX(__addsf3) \
+ XX(__aeabi_cdcmpeq) \
+ XX(__aeabi_cdcmple) \
+ XX(__aeabi_cdrcmple) \
+ XX(__aeabi_d2f) \
+ XX(__aeabi_d2iz) \
+ XX(__aeabi_dadd) \
+ XX(__aeabi_dcmpeq) \
+ XX(__aeabi_dcmpge) \
+ XX(__aeabi_dcmpgt) \
+ XX(__aeabi_dcmple) \
+ XX(__aeabi_dcmplt) \
+ XX(__aeabi_dcmpun) \
+ XX(__aeabi_ddiv) \
+ XX(__aeabi_dmul) \
+ XX(__aeabi_drsub) \
+ XX(__aeabi_dsub) \
+ XX(__aeabi_f2d) \
+ XX(__aeabi_f2iz) \
+ XX(__aeabi_f2uiz) \
+ XX(__aeabi_fadd) \
+ XX(__aeabi_fcmpun) \
+ XX(__aeabi_fdiv) \
+ XX(__aeabi_fmul) \
+ XX(__aeabi_frsub) \
+ XX(__aeabi_fsub) \
+ XX(__aeabi_i2d) \
+ XX(__aeabi_i2f) \
+ XX(__aeabi_idiv) \
+ XX(__aeabi_idivmod) \
+ XX(__aeabi_l2d) \
+ XX(__aeabi_l2f) \
+ XX(__aeabi_lasr) \
+ XX(__aeabi_ldivmod) \
+ XX(__aeabi_llsl) \
+ XX(__aeabi_llsr) \
+ XX(__aeabi_lmul) \
+ XX(__aeabi_ui2d) \
+ XX(__aeabi_ui2f) \
+ XX(__aeabi_uidiv) \
+ XX(__aeabi_uidivmod) \
+ XX(__aeabi_ul2d) \
+ XX(__aeabi_ul2f) \
+ XX(__aeabi_uldivmod) \
+ XX(__aeabi_unwind_cpp_pr0) \
+ XX(__aeabi_unwind_cpp_pr1) \
+ XX(__cmpdf2) \
+ XX(__divdf3) \
+ XX(__divsf3) \
+ XX(__eqdf2) \
+ XX(__extendsfdf2) \
+ XX(__fixdfsi) \
+ XX(__fixsfsi) \
+ XX(__floatdidf) \
+ XX(__floatdisf) \
+ XX(__floatsidf) \
+ XX(__floatsisf) \
+ XX(__floatundidf) \
+ XX(__floatundisf) \
+ XX(__floatunsidf) \
+ XX(__floatunsisf) \
+ XX(__gedf2) \
+ XX(__gtdf2) \
+ XX(__ledf2) \
+ XX(__ltdf2) \
+ XX(__muldf3) \
+ XX(__muldi3) \
+ XX(__mulsf3) \
+ XX(__nedf2) \
+ XX(__popcount_tab) \
+ XX(__popcountsi2) \
+ XX(__subdf3) \
+ XX(__subsf3) \
+ XX(__truncdfsf2) \
+ XX(__unorddf2) \
+ XX(__unordsf2) \
+
#define XX(f) extern void f(void);
COMPAT_FUNCTIONS_LIST
#undef XX
-void __bionic_libgcc_compat_hooks(void)
-{
+void __bionic_libgcc_compat_hooks(void) {
#define XX(f) f();
COMPAT_FUNCTIONS_LIST
#undef XX
index 0dc3af0cabbafe4448957e1fcfa10d39686dac29..70a2a58ce3a4dbb45b56de2e4e90e56e91df7506 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef HAVE_32_BYTE_CACHE_LINE
index afbb1b047b4568c7bd782e8a85d6c5533f17e9dc..3f2f2f12dfe8dc0d40a4e24f321d38807f55c509 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* Optimized memcmp16() for ARM9.
index f25b3e3565a0073d1082a4e5132aba17f1a330df..2c9b10c1efcabb359f6eab06a12eb44216464964 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#if defined(__ARM_NEON__) && !defined(ARCH_ARM_USE_NON_NEON_MEMCPY)
index 2ba1ff51d705584a7e9eeaa51f78fd6015443c37..259701d677bda07b2efb6928e9d6cd3dc5b803a4 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
/* This implementation requires ARM state. */
index 65b93fdec68ccfd5fd85c674caf7aad7c910aa4c..ed59d07f13af94d149e9dd7e9422d44e6d5b697c 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
#include <machine/cpu-features.h>
.cfi_rel_offset r14, 4
mov r0, #0x00000000
- bl PIC_SYM(_C_LABEL(sigblock), PLT)
+ bl PIC_SYM(sigblock, PLT)
mov r1, r0
ldmfd sp!, {r0, r14}
.cfi_adjust_cfa_offset 4
mov r0, r2
- bl PIC_SYM(_C_LABEL(sigsetmask), PLT)
+ bl PIC_SYM(sigsetmask, PLT)
add sp, sp, #4 /* unalign the stack */
.cfi_adjust_cfa_offset -4
- ldmfd sp!, {r0, r1, r14}
+ ldmfd sp!, {r0, r1, r14}
.cfi_def_cfa_offset 0
#ifdef __ARM_HAVE_VFP
/* validation failed, die die die. */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(longjmp)
index 12311e586cc1e1f8c4d51ea012a5e558b087bf9a..7016f500c3f7ec41ef9c599568fc41b07cccf1bb 100644 (file)
#define _ALIGN_TEXT .align 0
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
ENTRY(sigsetjmp)
teq r1, #0
- beq PIC_SYM(_C_LABEL(_setjmp), PLT)
- b PIC_SYM(_C_LABEL(setjmp), PLT)
+ beq PIC_SYM(_setjmp, PLT)
+ b PIC_SYM(setjmp, PLT)
END(sigsetjmp)
.L_setjmp_magic:
ldr r2, .L_setjmp_magic
ldr r3, [r0]
teq r2, r3
- beq PIC_SYM(_C_LABEL(_longjmp), PLT)
- b PIC_SYM(_C_LABEL(longjmp), PLT)
+ beq PIC_SYM(_longjmp, PLT)
+ b PIC_SYM(longjmp, PLT)
END(siglongjmp)
index 42d41d1432cbe5601e27fea3f53c4d330df3ded4..6dba942d04fe8795f08727b083bb9fd29feb9569 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.text
diff --git a/libc/arch-arm/cortex-a15/bionic/__strcat_chk.S b/libc/arch-arm/cortex-a15/bionic/__strcat_chk.S
index dc86150d590df4d301a613638a27efcf1892ab2e..36da2d9d84392322c6e77519fcd9e89a6b1e643d 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
diff --git a/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S b/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S
index 95aaf4f56b065f5f84b6a5b30b0db3ede5d65e4d..c3e3e14fad6fe4e43aac302ca61b7055516a3375 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index badc93bf11235ca0815e66d910709ed96d862feb..da4f3dd7914fad5421759d3eb468b0feb573439b 100644 (file)
// Prototype: void *memcpy (void *dst, const void *src, size_t count).
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.text
.syntax unified
index 4e6d322d606cc608d4df7ee8222789f5d1e4a642..12c68d6a99174529de7733389089c59b76df426c 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memset() for ARM.
index 72d4e9eb045440b740695d46d2e92a2460854d30..b95be940e04305aee67a917e27a5d49ce9212631 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 0cccf06c9b8d2edced063aba4631035b57e53098..12da1158dc0a7c32449fbbc8a1b6eb637b466efd 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 577354034b1f4c279d3d8fc031efdd4258271170..cb878c44fa3bfa88d87511d3fdd67a639e922ef1 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 08f6d193bbac9dc3e8298d5ba342bcd06464d11a..9a0ce62a9da1f80fc0ae176f473a2397b48e03fb 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
diff --git a/libc/arch-arm/cortex-a9/bionic/__strcat_chk.S b/libc/arch-arm/cortex-a9/bionic/__strcat_chk.S
index 7009168227fd112296ee691a855d4afedcc74201..651aefc7d4214111951b0d5eef797622ccf12f02 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
.fpu neon
diff --git a/libc/arch-arm/cortex-a9/bionic/__strcpy_chk.S b/libc/arch-arm/cortex-a9/bionic/__strcpy_chk.S
index 908eec4c0f6ee2ee52706a32a65e675525d25736..2447780249ea8d8c3ba660f230d61422fa559a77 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
.fpu neon
index 72c1a668ccc7f8d283757baf74d76daf4b662d87..8dcd937fc0d0e9cc142448e326125af4bdfd36ad 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 7f77dad42f3d059445059e49d0f6c7f700ac7882..a5057eb04c4443e969f5614839803b7d066bc740 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 0f5baef4c0d11b0cec7e82eadb4885e5e91c4620..f5a855e399dd9b7a519e78e7bade1c6594b2a318 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index eacdb89049cd9424d1dfb14ab8a0274f5e0b7cad..2411c654c03c8d2cbfc8c2af8b155f9d3fc927a3 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 9aa4f883ded960e3aa8b4c412202c3498312adef..9e9610bf34b54eb0a2d3b55553365aa1ecf4b7cb 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 259eda0c4dcc1527fa0fa353554cbd2459ac1ece..b92b043525cf04a5aaf5a02866773457d9d72719 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 699b88d7c8dc6f535c8a1d4d52759c193abe9c5f..cd4a13d128a0ec5691ed11b77d399d75aff209d1 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memcpy() for ARM.
index baeb519662cbb158bf7e1267eaa7469c99d702ca..be35de9ff760ad00553de4324bbd43fd060e117a 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memset() for ARM.
index 42d41d1432cbe5601e27fea3f53c4d330df3ded4..6dba942d04fe8795f08727b083bb9fd29feb9569 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.text
index cc997f448cf8306268fde8459797b6be1ddafd5a..802a62da897d6f58c9be79d5c05959cb68685a5d 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(strcpy)
pld [r1, #0]
index f16baf882f94a92920a63e96985759abcb336b61..7954f05f1b1b4a9069a346e347e107a5fd001a2d 100644 (file)
#ifndef _ARM32_ASM_H_
#define _ARM32_ASM_H_
-#ifdef __ELF__
-# define _C_LABEL(x) x
-#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
-#endif
-#define _ASM_LABEL(x) x
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
#ifndef _ALIGN_TEXT
# define _ALIGN_TEXT .align 0
#endif
-/*
- * gas/arm uses @ as a single comment character and thus cannot be used here
- * Instead it recognised the # instead of an @ symbols in .type directives
- * We define a couple of macros so that assembly code will not be dependant
- * on one or the other.
- */
-#define _ASM_TYPE_FUNCTION #function
-#define _ASM_TYPE_OBJECT #object
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .fnstart; .cfi_startproc;
-
-#define _ASM_SIZE(x) .size x, .-x;
-
-#define _END(x) \
- .fnend; .cfi_endproc; \
- _ASM_SIZE(x)
-
-#ifdef GPROF
-# ifdef __ELF__
-# define _PROF_PROLOGUE \
- mov ip, lr; bl __mcount
-# else
-# define _PROF_PROLOGUE \
- mov ip,lr; bl mcount
-# endif
-#else
-# define _PROF_PROLOGUE
-#endif
-
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
-#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
-#define END(y) _END(_C_LABEL(y))
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
-#define ASEND(y) _END(_ASM_LABEL(y))
-
-#ifdef __ELF__
-#define ENTRY_PRIVATE(y) ENTRY(y); .hidden _C_LABEL(y)
-#else
-#define ENTRY_PRIVATE(y) ENTRY(y)
-#endif
+#undef __bionic_asm_custom_entry
+#undef __bionic_asm_custom_end
+#define __bionic_asm_custom_entry(f) .fnstart
+#define __bionic_asm_custom_end(f) .fnend
-#define ASMSTR .asciz
+#undef __bionic_asm_function_type
+#define __bionic_asm_function_type #function
#if defined(__ELF__) && defined(PIC)
-#ifdef __STDC__
-#define PIC_SYM(x,y) x ## ( ## y ## )
+#define PIC_SYM(x,y) x ## ( ## y ## )
#else
-#define PIC_SYM(x,y) x/**/(/**/y/**/)
+#define PIC_SYM(x,y) x
#endif
-#else
-#define PIC_SYM(x,y) x
-#endif
-
-#ifdef __ELF__
-#define RCSID(x) .section ".ident"; .asciz x
-#else
-#define RCSID(x) .text; .asciz x
-#endif
-
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg ## ,30,0,0,0 ; \
- .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
-#elif defined(__ELF__)
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(sym),1,0,0,0
-#else
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(_/**/sym),1,0,0,0
-#endif /* __STDC__ */
#endif /* !_ARM_ASM_H_ */
index a5d06f3f826763d5e5561d6f35b5e333a7480db0..34becdbbf2f2b33d06dcacf3589eaa644c645bd6 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index 95aaf4f56b065f5f84b6a5b30b0db3ede5d65e4d..c3e3e14fad6fe4e43aac302ca61b7055516a3375 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index 54405fa9dfb18d8ff3a30b4958334cf9d875018c..0b7b27659b32e930b4cb1c0931f0bb1ec8def734 100644 (file)
/* Assumes neon instructions and a cache line size of 32 bytes. */
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 1563327c448551bbd3591231f64f0d264fae1bc4..5d1943b729a951fe08ff3dceb41ba0bc61d8ccdc 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index f735fb5e70b608577fec5276cde4bca0a1a255d0..eacb82a6eacbd5417633f55ad41027617d754bb7 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 4b47c6d170996a213ad5be97b83ac205f45f3082..a6459491707252734a51b0d1f696022ec34de600 100644 (file)
--- a/libc/arch-arm64/arm64.mk
+++ b/libc/arch-arm64/arm64.mk
arch-arm64/bionic/syscall.S \
arch-arm64/bionic/vfork.S \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_arm64 :=
-libc_arch_dynamic_src_files_arm64 :=
-
-##########################################
-# crt-related
libc_crt_target_cflags_arm64 := \
-I$(LOCAL_PATH)/arch-arm64/include
index 3cd4ceb165a3e2e5dae705d5973f66310649609b..d495b6affd5f4db58aced53c1eed9f12b9d24091 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov x0, sp
index d176ea39ff5dcc8175343b09f37366bc4767feca..8fb6f0c2859869a6199ce2a7e963409e7cbdc846 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY_PRIVATE(__rt_sigreturn)
mov x8, __NR_rt_sigreturn
index ea70a526b059c24a36bbfa1976c829439c93cbb8..dfa861b1960487775733d6311a47796b63c30bcf 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
/* validation failed, die die die */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(_longjmp)
index b1ec0a8aa78047c16a7edc6060823a02dc2dde0d..9a68d8646936388630b9e301acd85a6988ccb22b 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
stp x0, x30, [sp, #-16]!
mov x0, xzr
- bl PIC_SYM(_C_LABEL(sigblock), PLT)
+ bl PIC_SYM(sigblock, PLT)
mov w1, w0
ldp x0, x30, [sp], #16
/* validation failed, die die die */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(longjmp)
index 3afceabffab30938439f6a0a676b78872e09490c..4fdb3679dd022d76a829b874c49b066f9f103a88 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
*/
ENTRY(sigsetjmp)
- cbz w1, PIC_SYM(_C_LABEL(_setjmp), PLT)
- b PIC_SYM(_C_LABEL(setjmp), PLT)
+ cbz w1, PIC_SYM(_setjmp, PLT)
+ b PIC_SYM(setjmp, PLT)
END(sigsetjmp)
.L_setjmp_magic:
ldr w2, .L_setjmp_magic
ldr w3, [x0]
cmp w2, w3
- b.eq PIC_SYM(_C_LABEL(_longjmp), PLT)
- b PIC_SYM(_C_LABEL(longjmp), PLT)
+ b.eq PIC_SYM(_longjmp, PLT)
+ b PIC_SYM(longjmp, PLT)
END(siglongjmp)
index 3f8b908c69e08d006c9e95130e37395811f25573..4bfabaf95ee5c926ccb0b68c95b65fcd91151f45 100644 (file)
#ifndef _AARCH64_ASM_H_
#define _AARCH64_ASM_H_
-/* TODO: Add cfi directives for creating/restoring FP */
-#ifdef __ELF__
-# define _C_LABEL(x) x
-#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
-#endif
-#define _ASM_LABEL(x) x
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
#ifndef _ALIGN_TEXT
-# define _ALIGN_TEXT .align 0
+# define _ALIGN_TEXT .align 0
#endif
-#define _ASM_TYPE_FUNCTION %function
-#define _ASM_TYPE_OBJECT %object
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .cfi_startproc
-
-#define _ASM_SIZE(x) .size x, .-x;
-
-#define _END(x) \
- .cfi_endproc; \
- _ASM_SIZE(x)
-
-#define ENTRY(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_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
+#undef __bionic_asm_function_type
+#define __bionic_asm_function_type %function
#if defined(__ELF__) && defined(PIC)
-#ifdef __STDC__
-#define PIC_SYM(x,y) x ## ( ## y ## )
-#else
-#define PIC_SYM(x,y) x/**/(/**/y/**/)
-#endif
-#else
-#define PIC_SYM(x,y) x
-#endif
-
-#ifdef __ELF__
-#define RCSID(x) .section ".ident"; .asciz x
+#define PIC_SYM(x,y) x ## ( ## y ## )
#else
-#define RCSID(x) .text; .asciz x
+#define PIC_SYM(x,y) x
#endif
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg ## ,30,0,0,0 ; \
- .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
-#elif defined(__ELF__)
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(sym),1,0,0,0
-#else
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(_/**/sym),1,0,0,0
-#endif /* __STDC__ */
-
#endif /* _AARCH64_ASM_H_ */
-
index 98055cc87d2ca670451266bb002940dcac66e503..918edf059f3b9eeed940e078a9ade45129f6757e 100644 (file)
ret
END(__brk)
-.hidden _C_LABEL(__brk)
+.hidden __brk
index d512c7ce8b3fc462487672591a5f4167de32f9af..b487360921b92773cf8f37ff9f7e9cbfe6a499b6 100644 (file)
ret
END(__epoll_pwait)
-.hidden _C_LABEL(__epoll_pwait)
+.hidden __epoll_pwait
index 50cd45a5c91c0491e1978bec73590822609240b9..5e97928c939b588ee2db79129469947a3eb83518 100644 (file)
ret
END(__exit)
-.hidden _C_LABEL(__exit)
+.hidden __exit
index 698e8ff2584dd91163e9b91888a5500b5a16b7b3..a312188c855517178e32b00db368b23760acf5da 100644 (file)
ret
END(__getcpu)
-.hidden _C_LABEL(__getcpu)
+.hidden __getcpu
index f0543f01063324e31e0bb14d9469880a0f89b824..4b27a9ce9a8dce752244eed4e4ec065009284a88 100644 (file)
ret
END(__getcwd)
-.hidden _C_LABEL(__getcwd)
+.hidden __getcwd
index f7fd1b8a5785fd588c42e845f06ba0c6c6b00818..3ccd104d31df2c8eb903b3468bb4c851bb42c37c 100644 (file)
ret
END(__getpriority)
-.hidden _C_LABEL(__getpriority)
+.hidden __getpriority
index 2569fdfab11135d3659a6b5728d18fbccbe11f18..68d89bc333447a7aeb182d0d07b83bd1659582d6 100644 (file)
ret
END(__ioctl)
-.hidden _C_LABEL(__ioctl)
+.hidden __ioctl
index cca66ce299a36103654928effb07de2d53d7ad64..a49eaff124ce3beb50036ca3c9351aada4237632 100644 (file)
ret
END(__openat)
-.hidden _C_LABEL(__openat)
+.hidden __openat
index 68efc09f029544811376443a3fb8f1d09cd097cf..370e7689a94d85a39456d2b9c3e89d042cc8ef30 100644 (file)
ret
END(__ppoll)
-.hidden _C_LABEL(__ppoll)
+.hidden __ppoll
index 295b71a50f7f0b25e24b2e561421aa0b7ba631d4..193e19f6d9a657b2255e2f5579e6f5076fa01a8c 100644 (file)
ret
END(__pselect6)
-.hidden _C_LABEL(__pselect6)
+.hidden __pselect6
index aa4107185789b8ad46e2b6378e78b8fbef41e151..ee63cb0f9def2c89d6a4ffb054041f423fcdeafa 100644 (file)
ret
END(__ptrace)
-.hidden _C_LABEL(__ptrace)
+.hidden __ptrace
index 9680bdc99da16e4f2cbae24abd2b6a50701621f4..10b33ad186b89c557015a0674945c3dcca58bd39 100644 (file)
ret
END(__reboot)
-.hidden _C_LABEL(__reboot)
+.hidden __reboot
index 77f83eae270d7f90d69dc98f3a686a0d703cfaae..cea09414934ddaecb64a1fc9267d082e07f466f4 100644 (file)
ret
END(__rt_sigaction)
-.hidden _C_LABEL(__rt_sigaction)
+.hidden __rt_sigaction
diff --git a/libc/arch-arm64/syscalls/__rt_sigpending.S b/libc/arch-arm64/syscalls/__rt_sigpending.S
index 59a2e1e1ae1e266dc7f0c6c803dedd385ba8e711..97db3b984df9d6b935ffe66f50e1486b1a6c7a27 100644 (file)
ret
END(__rt_sigpending)
-.hidden _C_LABEL(__rt_sigpending)
+.hidden __rt_sigpending
diff --git a/libc/arch-arm64/syscalls/__rt_sigprocmask.S b/libc/arch-arm64/syscalls/__rt_sigprocmask.S
index c5a51ede396b96b288cd708814d0019a4c1c9fcc..97dabe10db6bf70bdf645c52a6414c1dc2cb0617 100644 (file)
ret
END(__rt_sigprocmask)
-.hidden _C_LABEL(__rt_sigprocmask)
+.hidden __rt_sigprocmask
diff --git a/libc/arch-arm64/syscalls/__rt_sigsuspend.S b/libc/arch-arm64/syscalls/__rt_sigsuspend.S
index 7a1c22e7b3c2879cccf25a2398943e56cb70c2d3..d8eaa3e53b50f815f1a0059d4b531fcc68307ddc 100644 (file)
ret
END(__rt_sigsuspend)
-.hidden _C_LABEL(__rt_sigsuspend)
+.hidden __rt_sigsuspend
diff --git a/libc/arch-arm64/syscalls/__rt_sigtimedwait.S b/libc/arch-arm64/syscalls/__rt_sigtimedwait.S
index b3d950c8cf848a9d30e2c04347813bb610fdf112..95f031a88aaec8d49b39b8a37d38d4d7cbdd89af 100644 (file)
ret
END(__rt_sigtimedwait)
-.hidden _C_LABEL(__rt_sigtimedwait)
+.hidden __rt_sigtimedwait
diff --git a/libc/arch-arm64/syscalls/__sched_getaffinity.S b/libc/arch-arm64/syscalls/__sched_getaffinity.S
index 9b785adcb3a28b4510c0f282b63bdbb545dcb323..58715d0fd573c3dce2f8fe0f929289db4e561979 100644 (file)
ret
END(__sched_getaffinity)
-.hidden _C_LABEL(__sched_getaffinity)
+.hidden __sched_getaffinity
diff --git a/libc/arch-arm64/syscalls/__set_tid_address.S b/libc/arch-arm64/syscalls/__set_tid_address.S
index b7541fcc9d78b7bf37999c25c028abad9f0a0564..3cc452cbc3fabd637c9e7622eec1b28acf2d361c 100644 (file)
ret
END(__set_tid_address)
-.hidden _C_LABEL(__set_tid_address)
+.hidden __set_tid_address
index 625a7eb4900dad5ed4c87b567936502b317a8da8..2e1fb1dcc5ee09d220f3eb03609eeb49354d3b15 100644 (file)
ret
END(__syslog)
-.hidden _C_LABEL(__syslog)
+.hidden __syslog
index bfce448fc4ebdc6e26a1b31f8c6f886ef8c8dcdc..b551048bf2790bfc528735ff4ba694d6e23c19ea 100644 (file)
ret
END(__timer_create)
-.hidden _C_LABEL(__timer_create)
+.hidden __timer_create
index 03ed44e2859da4bb38db8b14cddb0a0196e8a0e9..2aff54085dc88d7e4601ca3ec31ac44f3d5cbde3 100644 (file)
ret
END(__timer_delete)
-.hidden _C_LABEL(__timer_delete)
+.hidden __timer_delete
diff --git a/libc/arch-arm64/syscalls/__timer_getoverrun.S b/libc/arch-arm64/syscalls/__timer_getoverrun.S
index a458941398264b71a727f4d8246a5d57e561398a..b11e35620f5ab10747ead57c492b51e9e80a1819 100644 (file)
ret
END(__timer_getoverrun)
-.hidden _C_LABEL(__timer_getoverrun)
+.hidden __timer_getoverrun
diff --git a/libc/arch-arm64/syscalls/__timer_gettime.S b/libc/arch-arm64/syscalls/__timer_gettime.S
index b6ae29e44175fb08d1c3cc129110a0ca5558e5ad..c7c4d09bb7a06b35142c1e48af6ef217ccfb8051 100644 (file)
ret
END(__timer_gettime)
-.hidden _C_LABEL(__timer_gettime)
+.hidden __timer_gettime
diff --git a/libc/arch-arm64/syscalls/__timer_settime.S b/libc/arch-arm64/syscalls/__timer_settime.S
index 3c44b531822e720df5aa30aee072a0e0dcac9759..4f5f5fcf923beaebd83d2833097217c2791cae6c 100644 (file)
ret
END(__timer_settime)
-.hidden _C_LABEL(__timer_settime)
+.hidden __timer_settime
index 42440184c7769584ef220be5ff540c5760a01cb1..66e986a83b5beb17e0b767244e04721b25446b16 100644 (file)
ret
END(__waitid)
-.hidden _C_LABEL(__waitid)
+.hidden __waitid
index 8970b6ec7fa7f57a83c31cd0e0a8da261bffd545..92731347d7736a85153bb1866b855f33c37fccf6 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/errno.h>
#include <linux/sched.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
- .text
- .type __bionic_clone, @function
- .global __bionic_clone
- .align 4
- .ent __bionic_clone
-__bionic_clone:
+ENTRY(__bionic_clone)
.set noreorder
- .cpload $t9
+ .cpload t9
.set reorder
# set up child stack
- subu $a1,16
- lw $t0,20($sp) # fn
- lw $t1,24($sp) # arg
- sw $t0,0($a1) # fn
- sw $t1,4($a1) # arg
+ subu a1,16
+ lw t0,20(sp) # fn
+ lw t1,24(sp) # arg
+ sw t0,0(a1) # fn
+ sw t1,4(a1) # arg
# remainder of arguments are correct for clone system call
- li $v0,__NR_clone
+ li v0,__NR_clone
syscall
- bnez $a3,.L__error_bc
+ bnez a3,.L__error_bc
- beqz $v0,.L__thread_start_bc
+ beqz v0,.L__thread_start_bc
- j $ra
+ j ra
.L__thread_start_bc:
- lw $a0,0($sp) # fn
- lw $a1,4($sp) # arg
+ lw a0,0(sp) # fn
+ lw a1,4(sp) # arg
# void __bionic_clone_entry(int (*func)(void*), void *arg)
- la $t9,__bionic_clone_entry
- j $t9
+ la t9,__bionic_clone_entry
+ j t9
.L__error_bc:
- move $a0,$v0
- la $t9,__set_errno
- j $t9
-
- .end __bionic_clone
+ move a0,v0
+ la t9,__set_errno
+ j t9
+END(__bionic_clone)
index 834c89d82874c19e704d8dbd0df3dc222336b98e..d4b278b240163b5fb0f94e31879d352d9b879d75 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/* void *__get_sp(void) */
+#include <private/bionic_asm.h>
- .type __get_sp, @function
- .global __get_sp
- .align 4
- .ent __get_sp
-__get_sp:
- move $v0, $sp
- j $ra
- .end __get_sp
+// void* __get_sp()
+ENTRY(__get_sp)
+ move v0, sp
+ j ra
+END(__get_sp)
diff --git a/libc/arch-mips/bionic/_exit_with_stack_teardown.S b/libc/arch-mips/bionic/_exit_with_stack_teardown.S
index 8f624c3245b275f49f88a31a6755a2b0c2a5cede..129e3f9a308683304b61ce8531d50c80ff06c31b 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-
- .text
+#include <private/bionic_asm.h>
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize)
-
- .type _exit_with_stack_teardown, @function
- .global _exit_with_stack_teardown
- .align 4
- .ent _exit_with_stack_teardown
-_exit_with_stack_teardown:
- li $v0, __NR_munmap
+ENTRY(_exit_with_stack_teardown)
+ li v0, __NR_munmap
syscall
// If munmap failed, we ignore the failure and exit anyway.
- li $a0, 0
- li $v0, __NR_exit
+ li a0, 0
+ li v0, __NR_exit
syscall
// The exit syscall does not return.
- .end _exit_with_stack_teardown
+END(_exit_with_stack_teardown)
index e7083ae290d17c0366132254a211499cbb7d22a9..4465cd20ece003e828dda7d0ec12cc6fd239cbd5 100644 (file)
/*
* Copyright (c) 2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
LEAF(_setjmp, FRAMESZ)
PTR_SUBU sp, FRAMESZ
SETUP_GP64(GPOFF, _setjmp)
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
END(_longjmp)
-
index 67393455a7f7c640fe880d67e7274a330e3ba8c8..6e5d2947f012342d77967f0088c21706feb5b9fb 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/*
- * void bzero(void *s, size_t n);
- */
- .type bzero, @function
- .global bzero
- .align 4
- .ent bzero
- .set noreorder
-bzero:
- .cpload $t9
- move $a2,$a1
- la $t9,memset
- j $t9
- move $a1,$zero
- .end bzero
+#include <private/bionic_asm.h>
+// void bzero(void*, size_t);
+ENTRY(bzero)
+ .set noreorder
+ .cpload t9
+ move a2,a1
+ la t9,memset
+ j t9
+ move a1,zero
+END(bzero)
index 5247b79e108e9b8447508135627cef3af1ff5e16..7626a7ca1580cad6f19a72a675d46453e4d1ddc7 100644 (file)
#define FUTEX_WAKE 1
// int __futex_wait(volatile void* ftx, int val, const struct timespec* timeout)
- .type __futex_wait, @function
- .global __futex_wait
- .align 4
- .ent __futex_wait
-__futex_wait:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$a2 /* timespec */
- move $a2,$a1 /* val */
- li $a1,FUTEX_WAIT /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_wait)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,a2 /* timespec */
+ move a2,a1 /* val */
+ li a1,FUTEX_WAIT /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_wait
+ addu sp,4*6
+ j ra
+END(__futex_wait)
// int __futex_wake(volatile void* ftx, int count)
- .type __futex_wake, @function
- .globl __futex_wake
- .align 4
- .ent __futex_wake
-__futex_wake:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$0 /* timespec */
- move $a2,$a1 /* val */
- li $a1,FUTEX_WAKE /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_wake)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,$0 /* timespec */
+ move a2,a1 /* val */
+ li a1,FUTEX_WAKE /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_wake
+ addu sp,4*6
+ j ra
+END(__futex_wake)
// int __futex_syscall3(volatile void* ftx, int op, int count)
- .type __futex_syscall3, @function
- .global __futex_syscall3
- .align 4
- .ent __futex_syscall3
-__futex_syscall3:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$0 /* timespec */
-# move $a2,$a2 /* val */
-# li $a1,$a1 /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_syscall3)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,$0 /* timespec */
+# move a2,a2 /* val */
+# li a1,a1 /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_syscall3
+ addu sp,4*6
+ j ra
+END(__futex_syscall3)
// int __futex_syscall4(volatile void* ftx, int op, int val, const struct timespec* timeout)
- .type __futex_syscall4, @function
- .global __futex_syscall4
- .align 4
- .ent __futex_syscall4
-__futex_syscall4:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
-# move $a3,$a3 /* timespec */
-# move $a2,$a2 /* val */
-# li $a1,$a1 /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_syscall4)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+# move a3,a3 /* timespec */
+# move a2,a2 /* val */
+# li a1,a1 /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_syscall4
+ addu sp,4*6
+ j ra
+END(__futex_syscall4)
index a2b2544398843bc3ec3c3f6a41469418f05f0b44..f9d14a93aab31e6058f7d71031623c98c911f8d3 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/*
- * u4 __memcmp16(const u2* s0, const u2* s1, size_t count);
- */
- .type __memcmp16, @function
- .global __memcmp16
- .align 4
- .ent __memcmp16
-__memcmp16:
- li $t0,0
- li $t1,0
- beqz $a2,done /* 0 length string */
- beq $a0,$a1,done /* strings are identical */
+#include <private/bionic_asm.h>
+
+// u4 __memcmp16(const u2*, const u2*, size_t);
+ENTRY(__memcmp16)
+ li t0,0
+ li t1,0
+ beqz a2,done /* 0 length string */
+ beq a0,a1,done /* strings are identical */
/* Unoptimised... */
-1: lhu $t0,0($a0)
- lhu $t1,0($a1)
- addu $a1,2
- bne $t0,$t1,done
- addu $a0,2
- subu $a2,1
- bnez $a2,1b
+1: lhu t0,0(a0)
+ lhu t1,0(a1)
+ addu a1,2
+ bne t0,t1,done
+ addu a0,2
+ subu a2,1
+ bnez a2,1b
done:
- subu $v0,$t0,$t1
- j $ra
- .end __memcmp16
+ subu v0,t0,t1
+ j ra
+END(__memcmp16)
index 7c21195b6be8e5f8a46853dadf09fe0dfe4d98e8..2af1fbdce39b84a6222c1056448979513af56519 100644 (file)
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
NON_LEAF(setjmp, FRAMESZ, ra)
.mask 0x80000000, RAOFF
PTR_SUBU sp, FRAMESZ # allocate stack frame
lw a0, A0OFF(sp)
lw a1, A1OFF(sp)
- .set noreorder
+ .set noreorder
REG_L v0, SC_REGS+ZERO*REGSZ(a0)
bne v0, 0xACEDBADE, botch # jump if error
REG_L ra, SC_PC(a0)
REG_L s8, SC_REGS+S8*REGSZ(a0)
REG_L gp, SC_REGS+GP*REGSZ(a0)
REG_L sp, SC_REGS+SP*REGSZ(a0)
-
+
#if !defined(SOFTFLOAT)
- REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
+ REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
ctc1 v0, $31
#if _MIPS_FPSET == 32
FPREG64_L($f20, SC_FPREGS+((F20-F0)*REGSZ_FP), a0)
index b05454c284393f1e0678fe3d2dbd43310efd2ba8..9d2e5ea87e885cbee7d8bee23f28649b55579b1d 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/setjmp.h>
index af5bcc9ab1fdb671d5c4779b12892057c0ee46dd..db477a506bb809b7664486090287e946ed27967d 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
- .text
- .globl syscall
- .align 4
- .ent syscall
+#include <private/bionic_asm.h>
/*
* The caller is only required to allocate 16 bytes of stack for a0-a3.
*/
#define STACKSIZE 2*4
-syscall:
+ENTRY(syscall)
.set noreorder
- .cpload $t9
- move $v0, $a0
- move $a0, $a1
- move $a1, $a2
- move $a2, $a3
- lw $a3, 16($sp)
- lw $t0, 20($sp)
- lw $t1, 24($sp)
- subu $sp, STACKSIZE
- sw $t0, 16($sp)
- sw $t1, 20($sp)
+ .cpload t9
+ move v0, a0
+ move a0, a1
+ move a1, a2
+ move a2, a3
+ lw a3, 16(sp)
+ lw t0, 20(sp)
+ lw t1, 24(sp)
+ subu sp, STACKSIZE
+ sw t0, 16(sp)
+ sw t1, 20(sp)
syscall
- addu $sp, STACKSIZE
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ addu sp, STACKSIZE
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end syscall
+END(syscall)
index 414caaf4efe64fd502c1ad716865fa87bdd86e69..96de69e20d8c73fb884ee34f66553510807695f2 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/sched.h>
// TODO: mips' uapi signal.h is missing #ifndef __ASSEMBLY__.
// #include <asm/signal.h>
#define SIGCHLD 18
- .text
-
- .type vfork, @function
- .global vfork
- .align 4
- .ent vfork
-vfork:
+ENTRY(vfork)
.set noreorder
- .cpload $t9
+ .cpload t9
- li $a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
- li $a1, 0
- li $a2, 0
- li $a3, 0
- subu $sp, 8
- sw $0, 16($sp)
- li $v0, __NR_clone
+ li a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
+ li a1, 0
+ li a2, 0
+ li a3, 0
+ subu sp, 8
+ sw $0, 16(sp)
+ li v0, __NR_clone
syscall
- addu $sp, 8
- bnez $a3, 1f
- move $a0, $v0
+ addu sp, 8
+ bnez a3, 1f
+ move a0, v0
- j $ra
+ j ra
nop
1:
- la $t9, __set_errno
- j $t9
+ la t9, __set_errno
+ j t9
nop
- .end vfork
+END(vfork)
index 43dbc09a8f5b06dc378df740b33afab7ccc5a055..5eacde3df6e5967e43cf3494925b9aef4e309207 100644 (file)
#ifndef _MIPS64_ASM_H
#define _MIPS64_ASM_H
-#include <machine/regdef.h>
-
-#ifdef NEED_OLD_RM7KFIX
-#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;
-#else
-#define ITLBNOPFIX nop;nop;nop;nop
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 4
#endif
+#undef __bionic_asm_custom_entry
+#undef __bionic_asm_custom_end
+#define __bionic_asm_custom_entry(f) .ent f
+#define __bionic_asm_custom_end(f) .end f
+
+#include <machine/regdef.h>
+
#define _MIPS_ISA_MIPS1 1 /* R2000/R3000 */
#define _MIPS_ISA_MIPS2 2 /* R4000/R6000 */
#define _MIPS_ISA_MIPS3 3 /* R4000 */
#define _MIPS_ISA_MIPS4 4 /* TFP (R1x000) */
-#ifdef __linux__
#define _MIPS_ISA_MIPS5 5
#define _MIPS_ISA_MIPS32 6
#define _MIPS_ISA_MIPS64 7
-#else
-#define _MIPS_ISA_MIPS32 32 /* MIPS32 */
-#endif
#if !defined(ABICALLS) && !defined(_NO_ABICALLS)
#define ABICALLS .abicalls
ABICALLS
#endif
-#define _C_LABEL(x) x /* XXX Obsolete but keep for a while */
-
#if !defined(__MIPSEL__) && !defined(__MIPSEB__)
#error "__MIPSEL__ or __MIPSEB__ must be defined"
#endif
*/
#if defined(ABICALLS) && !defined(_KERNEL) && !defined(_STANDALONE)
-#ifndef _MIPS_SIM
-#define _MIPS_SIM 1
-#define _ABIO32 1
-#endif
-#ifndef _MIPS_ISA
-#define _MIPS_ISA 2
-#define _MIPS_ISA_MIPS2 2
-#endif
-
#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32)
#define NARGSAVE 4
#define CF_RA_OFFS 20 /* Call ra save offset */
#endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4)
+#if (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4 || _MIPS_ISA == _MIPS_ISA_MIPS64)
#define REGSZ 8 /* 64 bit mode register size */
#define LOGREGSZ 3 /* log rsize */
#define REG_S sd
#define PTR_VAL .dword
#endif
-/*
- * Define -pg profile entry code.
- */
-#if defined(XGPROF) || defined(XPROF)
-#define MCOUNT \
- PTR_SUBU sp, sp, 32; \
- SAVE_GP(16); \
- sw ra, 28(sp); \
- sw gp, 24(sp); \
- .set noat; \
- .set noreorder; \
- move AT, ra; \
- jal _mcount; \
- PTR_SUBU sp, sp, 8; \
- lw ra, 28(sp); \
- PTR_ADDU sp, sp, 32; \
- .set reorder; \
- .set at;
-#else
-#define MCOUNT
-#endif
-
/*
* LEAF(x, fsize)
*
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, ra; \
SETUP_GP \
- MCOUNT
-
-#define ALEAF(x) \
- .globl x; \
-x:
-
-/*
- * NLEAF(x)
- *
- * Declare a non-profiled leaf routine.
- */
-#define NLEAF(x, fsize) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, ra; \
- SETUP_GP
/*
* NON_LEAF(x)
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, retpc; \
SETUP_GP \
- MCOUNT
-
-/*
- * NNON_LEAF(x)
- *
- * Declare a non-profiled non-leaf routine
- * (a routine that makes other C calls).
- */
-#define NNON_LEAF(x, fsize, retpc) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, retpc \
- SETUP_GP
-
-/*
- * END(x)
- *
- * Mark end of a procedure.
- */
-#define END(x) \
- .end x
-
-/*
- * Macros to panic and printf from assembly language.
- */
-#define PANIC(msg) \
- LA a0, 9f; \
- jal panic; \
- nop ; \
- MSG(msg)
-
-#define PRINTF(msg) \
- la a0, 9f; \
- jal printf; \
- nop ; \
- MSG(msg)
-
-#define MSG(msg) \
- .rdata; \
-9: .asciiz msg; \
- .text
-
-#define ASMSTR(str) \
- .asciiz str; \
- .align 3
#endif /* !_MIPS_ASM_H */
index f02ec0d2260e21a7a9cf0d94b0eb9ca368d1a6e2..b31715ccee437cd59a2c449c96d9325c1c995285 100644 (file)
#ifndef _MIPS_SIGNAL_H_
#define _MIPS_SIGNAL_H_
-#include <machine/asm.h>
-
#define SC_REGMASK (0*REGSZ)
#define SC_STATUS (1*REGSZ)
#define SC_PC (2*REGSZ)
diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk
index 4e007e50cc1865377a1f4f801bc07e0ca9b239de..0fa1ed6ebed8532b3311225dec3bd125f5bd5cd9 100644 (file)
--- a/libc/arch-mips/mips.mk
+++ b/libc/arch-mips/mips.mk
bionic/__strcat_chk.cpp \
-# cflags
ifneq ($(ARCH_MIPS_HAS_FPU),true)
libc_common_cflags_mips := \
-DSOFTFLOAT
endif
-libc_common_cflags_mips += \
- -fstrict-aliasing
##########################################
### CPU specific source files
arch-mips/string/memset.S \
arch-mips/string/mips_strlen.c \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_mips :=
-libc_arch_dynamic_src_files_mips :=
-
-
-##########################################
-# crt-related
libc_crt_target_cflags_mips := \
$($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
-I$(LOCAL_PATH)/arch-mips/include
index aabdfcfdce6e95d768636c22572856fcab1f9d8c..dc91096bd52ee7bb027110fdde904400285e8b3b 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define LWHI lwl /* high part is left in big-endian */
# define SWHI swl /* high part is left in big-endian */
index a1c5055c4c111aa073973b66802ef02917897251..3e630caf88f5d50b7cb30e8df20a2b9b5b1e92b3 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define SWHI swl /* high part is left in big-endian */
sw a1,-36(a0)
nop
nop # the extra nop instructions help to balance
- nop # cycles needed for "store" + "fill" + "evict"
+ nop # cycles needed for "store" + "fill" + "evict"
nop # For 64byte store there are needed 8 fill
nop # and 8 evict cycles, i.e. at least 32 instr.
nop
/************************************************************************
* Implementation : Static functions
************************************************************************/
-
index 87e13bd54da68f15a7103422ec0a2b1c10e4a062..9325c26088569772668bd0185e27de75d822a8f3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __brk
- .align 4
- .ent __brk
+#include <private/bionic_asm.h>
-__brk:
+ENTRY(__brk)
.set noreorder
- .cpload $t9
- li $v0, __NR_brk
+ .cpload t9
+ li v0, __NR_brk
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __brk
+END(__brk)
index 0a5fdae1e5f4c16874fb5d478e7fbd11da90a41f..a417cdd6be86d7aa852648fbf0798f596cbab809 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __epoll_pwait
- .align 4
- .ent __epoll_pwait
+#include <private/bionic_asm.h>
-__epoll_pwait:
+ENTRY(__epoll_pwait)
.set noreorder
- .cpload $t9
- li $v0, __NR_epoll_pwait
+ .cpload t9
+ li v0, __NR_epoll_pwait
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __epoll_pwait
+END(__epoll_pwait)
index 529e49c0bd21c1d77761a32164f85f23bb3c0004..1515b41da4be942241e08e93f67870b58a74fdf2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __exit
- .align 4
- .ent __exit
+#include <private/bionic_asm.h>
-__exit:
+ENTRY(__exit)
.set noreorder
- .cpload $t9
- li $v0, __NR_exit
+ .cpload t9
+ li v0, __NR_exit
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __exit
+END(__exit)
index 39ed4cf0d0e15db7d54d5709e5a2070231c2c7d8..b9815a1f0ee2c2688f870bdb4f2c1fff5ed252b0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __fcntl64
- .align 4
- .ent __fcntl64
+#include <private/bionic_asm.h>
-__fcntl64:
+ENTRY(__fcntl64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fcntl64
+ .cpload t9
+ li v0, __NR_fcntl64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __fcntl64
+END(__fcntl64)
index 3389a8d32f681bd1f4dc708ab70449e685e7290e..8774a530cbca8a99cfed12331b84d0682e6c1323 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __fstatfs64
- .align 4
- .ent __fstatfs64
+#include <private/bionic_asm.h>
-__fstatfs64:
+ENTRY(__fstatfs64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fstatfs64
+ .cpload t9
+ li v0, __NR_fstatfs64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __fstatfs64
+END(__fstatfs64)
index d29bd6250eb3e23dc097bda89538cb89bde685a7..2352e017400b5f4a7c77aa0438b08b90bf22a2c2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getcpu
- .align 4
- .ent __getcpu
+#include <private/bionic_asm.h>
-__getcpu:
+ENTRY(__getcpu)
.set noreorder
- .cpload $t9
- li $v0, __NR_getcpu
+ .cpload t9
+ li v0, __NR_getcpu
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getcpu
+END(__getcpu)
index ce05d92e2c0baa1a021ba15e9d40ce0ea1e50ffa..e844f9a7da2d77b46f12ab718b93f7f4f257d406 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getcwd
- .align 4
- .ent __getcwd
+#include <private/bionic_asm.h>
-__getcwd:
+ENTRY(__getcwd)
.set noreorder
- .cpload $t9
- li $v0, __NR_getcwd
+ .cpload t9
+ li v0, __NR_getcwd
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getcwd
+END(__getcwd)
index 767b6d05bc0ef408d166052a40732c4f1d3b6b69..882386b12c763edaae04b7d2a8a911718f81c2e9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getpriority
- .align 4
- .ent __getpriority
+#include <private/bionic_asm.h>
-__getpriority:
+ENTRY(__getpriority)
.set noreorder
- .cpload $t9
- li $v0, __NR_getpriority
+ .cpload t9
+ li v0, __NR_getpriority
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getpriority
+END(__getpriority)
index 3d83c6092f3bc097ec9050d30eb709dad1f4859a..ddf532325d5e5909eb98426c3cf1779ef4ebdbbb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ioctl
- .align 4
- .ent __ioctl
+#include <private/bionic_asm.h>
-__ioctl:
+ENTRY(__ioctl)
.set noreorder
- .cpload $t9
- li $v0, __NR_ioctl
+ .cpload t9
+ li v0, __NR_ioctl
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ioctl
+END(__ioctl)
index 9a3753ba8d639aa0b53ba883a6f8b2486c184b66..10819f7a31df473b1f26aaa9841602300665827c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __llseek
- .align 4
- .ent __llseek
+#include <private/bionic_asm.h>
-__llseek:
+ENTRY(__llseek)
.set noreorder
- .cpload $t9
- li $v0, __NR__llseek
+ .cpload t9
+ li v0, __NR__llseek
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __llseek
+END(__llseek)
index 723e80ef8e8d8b93890a490436ae8c8e91a8e592..53728178fc36ab95ffbbde1f76ad5486075cff68 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __mmap2
- .align 4
- .ent __mmap2
+#include <private/bionic_asm.h>
-__mmap2:
+ENTRY(__mmap2)
.set noreorder
- .cpload $t9
- li $v0, __NR_mmap2
+ .cpload t9
+ li v0, __NR_mmap2
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __mmap2
+END(__mmap2)
index e55e71d6a84593cb7469aef4e397bd54ec6b9634..f833dd878c9f37c2d6048dc73fc3acd7a7b53ee8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __openat
- .align 4
- .ent __openat
+#include <private/bionic_asm.h>
-__openat:
+ENTRY(__openat)
.set noreorder
- .cpload $t9
- li $v0, __NR_openat
+ .cpload t9
+ li v0, __NR_openat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __openat
+END(__openat)
index ef6d3438026b897f1f66f8353d28954b43ece594..a5711d9af45615afa359d50530d2b94734900958 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ppoll
- .align 4
- .ent __ppoll
+#include <private/bionic_asm.h>
-__ppoll:
+ENTRY(__ppoll)
.set noreorder
- .cpload $t9
- li $v0, __NR_ppoll
+ .cpload t9
+ li v0, __NR_ppoll
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ppoll
+END(__ppoll)
index 26af92a103d637f54fd583f9b24451f6eae6086c..4c0a0a53eca7ea5999a518e9fe7f65cbcf5c7cd3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __pselect6
- .align 4
- .ent __pselect6
+#include <private/bionic_asm.h>
-__pselect6:
+ENTRY(__pselect6)
.set noreorder
- .cpload $t9
- li $v0, __NR_pselect6
+ .cpload t9
+ li v0, __NR_pselect6
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __pselect6
+END(__pselect6)
index f2ea8c79bc5513a9aee46e5350e7fc4296c82497..fcbe5293f78d444a7813e1df2fd89afd0cbb27e6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ptrace
- .align 4
- .ent __ptrace
+#include <private/bionic_asm.h>
-__ptrace:
+ENTRY(__ptrace)
.set noreorder
- .cpload $t9
- li $v0, __NR_ptrace
+ .cpload t9
+ li v0, __NR_ptrace
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ptrace
+END(__ptrace)
index 95ba5d8893e0d6c107aa01365ece33a81f800fa3..4aa0e7a76a10e7218e4055d0bad2b447db06dbd9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __reboot
- .align 4
- .ent __reboot
+#include <private/bionic_asm.h>
-__reboot:
+ENTRY(__reboot)
.set noreorder
- .cpload $t9
- li $v0, __NR_reboot
+ .cpload t9
+ li v0, __NR_reboot
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __reboot
+END(__reboot)
index 73253d612b82ae47ef206770c2bc08a3f85dea4f..6c5bc37f21393ee548ce607623329bef535238c1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigaction
- .align 4
- .ent __rt_sigaction
+#include <private/bionic_asm.h>
-__rt_sigaction:
+ENTRY(__rt_sigaction)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigaction
+ .cpload t9
+ li v0, __NR_rt_sigaction
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigaction
+END(__rt_sigaction)
index 90357b3f626b767718bb086aecaa847314764ed3..e62f0795440f13918d9b7fba4e0794eec692a2cc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigpending
- .align 4
- .ent __rt_sigpending
+#include <private/bionic_asm.h>
-__rt_sigpending:
+ENTRY(__rt_sigpending)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigpending
+ .cpload t9
+ li v0, __NR_rt_sigpending
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigpending
+END(__rt_sigpending)
diff --git a/libc/arch-mips/syscalls/__rt_sigprocmask.S b/libc/arch-mips/syscalls/__rt_sigprocmask.S
index 0d34e3775b80ff392cf414ad7f6cd36805881e7d..94ef493fbab3c84a36af14241c2c2f0b41809e3a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigprocmask
- .align 4
- .ent __rt_sigprocmask
+#include <private/bionic_asm.h>
-__rt_sigprocmask:
+ENTRY(__rt_sigprocmask)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigprocmask
+ .cpload t9
+ li v0, __NR_rt_sigprocmask
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigprocmask
+END(__rt_sigprocmask)
index 3ff47234744783b3849ccc5498dd8a88f98c6876..077746f7a61e6937a5652d26be778e86da2ca96b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigsuspend
- .align 4
- .ent __rt_sigsuspend
+#include <private/bionic_asm.h>
-__rt_sigsuspend:
+ENTRY(__rt_sigsuspend)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigsuspend
+ .cpload t9
+ li v0, __NR_rt_sigsuspend
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigsuspend
+END(__rt_sigsuspend)
diff --git a/libc/arch-mips/syscalls/__rt_sigtimedwait.S b/libc/arch-mips/syscalls/__rt_sigtimedwait.S
index 19a5ce95a701152c50a66bbe38c184411b14fe3b..404eab72bb73f24b6af7109b3f1eab7d1d243495 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigtimedwait
- .align 4
- .ent __rt_sigtimedwait
+#include <private/bionic_asm.h>
-__rt_sigtimedwait:
+ENTRY(__rt_sigtimedwait)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigtimedwait
+ .cpload t9
+ li v0, __NR_rt_sigtimedwait
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigtimedwait
+END(__rt_sigtimedwait)
diff --git a/libc/arch-mips/syscalls/__sched_getaffinity.S b/libc/arch-mips/syscalls/__sched_getaffinity.S
index 0038ff9d62b3989d8378114a53f8d8306e670e78..da7170954fbc36793c12fa0b81629ae6248ff339 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __sched_getaffinity
- .align 4
- .ent __sched_getaffinity
+#include <private/bionic_asm.h>
-__sched_getaffinity:
+ENTRY(__sched_getaffinity)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_getaffinity
+ .cpload t9
+ li v0, __NR_sched_getaffinity
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __sched_getaffinity
+END(__sched_getaffinity)
diff --git a/libc/arch-mips/syscalls/__set_thread_area.S b/libc/arch-mips/syscalls/__set_thread_area.S
index 69383e9813d49563e681e9567a9b7b37beb97586..f83249efc8bc6b92ecf29c6bebdf35691d080fe6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __set_thread_area
- .align 4
- .ent __set_thread_area
+#include <private/bionic_asm.h>
-__set_thread_area:
+ENTRY(__set_thread_area)
.set noreorder
- .cpload $t9
- li $v0, __NR_set_thread_area
+ .cpload t9
+ li v0, __NR_set_thread_area
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __set_thread_area
+END(__set_thread_area)
diff --git a/libc/arch-mips/syscalls/__set_tid_address.S b/libc/arch-mips/syscalls/__set_tid_address.S
index 4fcc82a5e1c2ed479f851f89a3c45d687701104b..146cd0d80f5293150b760591b210ca4ce5f472b3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __set_tid_address
- .align 4
- .ent __set_tid_address
+#include <private/bionic_asm.h>
-__set_tid_address:
+ENTRY(__set_tid_address)
.set noreorder
- .cpload $t9
- li $v0, __NR_set_tid_address
+ .cpload t9
+ li v0, __NR_set_tid_address
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __set_tid_address
+END(__set_tid_address)
index cc53ab41716301238cde97df414eb74d5f65a080..03dd9da0c09e19396a4ecfa71abf9d6b38ff6abf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __sigaction
- .align 4
- .ent __sigaction
+#include <private/bionic_asm.h>
-__sigaction:
+ENTRY(__sigaction)
.set noreorder
- .cpload $t9
- li $v0, __NR_sigaction
+ .cpload t9
+ li v0, __NR_sigaction
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __sigaction
+END(__sigaction)
index 4b3351c65bb96c31ad0f382395be4e4705e35472..9f94e6a2830ec857cc3590938113692d0d257d53 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __statfs64
- .align 4
- .ent __statfs64
+#include <private/bionic_asm.h>
-__statfs64:
+ENTRY(__statfs64)
.set noreorder
- .cpload $t9
- li $v0, __NR_statfs64
+ .cpload t9
+ li v0, __NR_statfs64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __statfs64
+END(__statfs64)
index 61a32423172836c3dac4486cfc5c42cd348c90ee..ace69c70197205822fa85bfa009ced6def23d04d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __syslog
- .align 4
- .ent __syslog
+#include <private/bionic_asm.h>
-__syslog:
+ENTRY(__syslog)
.set noreorder
- .cpload $t9
- li $v0, __NR_syslog
+ .cpload t9
+ li v0, __NR_syslog
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __syslog
+END(__syslog)
index 054c1b9697c6e28a66a790759e319f5fc4565c2d..449bd28375d1056cc978be4e53e5ed99b47c8f40 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_create
- .align 4
- .ent __timer_create
+#include <private/bionic_asm.h>
-__timer_create:
+ENTRY(__timer_create)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_create
+ .cpload t9
+ li v0, __NR_timer_create
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_create
+END(__timer_create)
index 2fa6e5018ceced3fafb418f5c4a8a65111c35962..7bc5e05980c20ec8df39c5627de0184bc71a2095 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_delete
- .align 4
- .ent __timer_delete
+#include <private/bionic_asm.h>
-__timer_delete:
+ENTRY(__timer_delete)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_delete
+ .cpload t9
+ li v0, __NR_timer_delete
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_delete
+END(__timer_delete)
diff --git a/libc/arch-mips/syscalls/__timer_getoverrun.S b/libc/arch-mips/syscalls/__timer_getoverrun.S
index 269ac4d52baa26384bf72a25c62fa5a9a1195dc8..7382c91501b60d2a7ed86befbe49c425f40b7516 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_getoverrun
- .align 4
- .ent __timer_getoverrun
+#include <private/bionic_asm.h>
-__timer_getoverrun:
+ENTRY(__timer_getoverrun)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_getoverrun
+ .cpload t9
+ li v0, __NR_timer_getoverrun
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_getoverrun
+END(__timer_getoverrun)
index 3a18e3de0d77ccd69835904d630d710eff289508..d6195b9bac30f8f105bbb6d66a169f29bff87879 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_gettime
- .align 4
- .ent __timer_gettime
+#include <private/bionic_asm.h>
-__timer_gettime:
+ENTRY(__timer_gettime)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_gettime
+ .cpload t9
+ li v0, __NR_timer_gettime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_gettime
+END(__timer_gettime)
index daf671f080bbaaeb2e35a59c446be2efd059806e..9fbab8625c2288575d9d1c8affc2725c05d658ae 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_settime
- .align 4
- .ent __timer_settime
+#include <private/bionic_asm.h>
-__timer_settime:
+ENTRY(__timer_settime)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_settime
+ .cpload t9
+ li v0, __NR_timer_settime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_settime
+END(__timer_settime)
index 9442ca6c9fc5fadab332c1f0873e50cb092daf0f..4c9142e84325e1f73fb536a981e274329dd8422c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __waitid
- .align 4
- .ent __waitid
+#include <private/bionic_asm.h>
-__waitid:
+ENTRY(__waitid)
.set noreorder
- .cpload $t9
- li $v0, __NR_waitid
+ .cpload t9
+ li v0, __NR_waitid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __waitid
+END(__waitid)
index 220876af6d8f1639f2eb63b09ef99b3c05112e16..5a0877da310a58daaa2509b75ec4d9a480ab93b1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl _exit
- .align 4
- .ent _exit
+#include <private/bionic_asm.h>
-_exit:
+ENTRY(_exit)
.set noreorder
- .cpload $t9
- li $v0, __NR_exit_group
+ .cpload t9
+ li v0, __NR_exit_group
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end _exit
+END(_exit)
index 0ac25761e2f52eb1d48d66715617bea0caba6088..64967fe1a5cc8febb42a8da5b5c2058ecc9e71e9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl _flush_cache
- .align 4
- .ent _flush_cache
+#include <private/bionic_asm.h>
-_flush_cache:
+ENTRY(_flush_cache)
.set noreorder
- .cpload $t9
- li $v0, __NR_cacheflush
+ .cpload t9
+ li v0, __NR_cacheflush
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end _flush_cache
+END(_flush_cache)
index f4da4d88a52cb44fc3d9b0c2676cb1b640c0e56a..09496abdc7578feb7bdd14529f744fbce4bf62a8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl accept
- .align 4
- .ent accept
+#include <private/bionic_asm.h>
-accept:
+ENTRY(accept)
.set noreorder
- .cpload $t9
- li $v0, __NR_accept
+ .cpload t9
+ li v0, __NR_accept
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end accept
+END(accept)
index c641b9c316c677afbd6c3c2cd9978488388fdc21..6e4a4f21b6b4d496892f01bb4afd75f3149ffaa6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl acct
- .align 4
- .ent acct
+#include <private/bionic_asm.h>
-acct:
+ENTRY(acct)
.set noreorder
- .cpload $t9
- li $v0, __NR_acct
+ .cpload t9
+ li v0, __NR_acct
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end acct
+END(acct)
index 912b161702199c50ad7205a0b7ae751c23f25563..9119aa8526f9fc26368784a4e1b1331449a99f08 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl bind
- .align 4
- .ent bind
+#include <private/bionic_asm.h>
-bind:
+ENTRY(bind)
.set noreorder
- .cpload $t9
- li $v0, __NR_bind
+ .cpload t9
+ li v0, __NR_bind
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end bind
+END(bind)
index 48f7be34531ba5e94dc89f329e72ff33263c76b5..549dc767919b109501423414c3e5912b85582041 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl capget
- .align 4
- .ent capget
+#include <private/bionic_asm.h>
-capget:
+ENTRY(capget)
.set noreorder
- .cpload $t9
- li $v0, __NR_capget
+ .cpload t9
+ li v0, __NR_capget
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end capget
+END(capget)
index 40223c296cc639263865706b27ff87d92b55d2db..637ac374c460d43b56be9b4354a3e1ae70d3c5ba 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl capset
- .align 4
- .ent capset
+#include <private/bionic_asm.h>
-capset:
+ENTRY(capset)
.set noreorder
- .cpload $t9
- li $v0, __NR_capset
+ .cpload t9
+ li v0, __NR_capset
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end capset
+END(capset)
index 4f427a12432f41cfe81f717f2bcaec7375c15e8c..752e4e7de17117c70e42327905e18f17c9d12590 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl chdir
- .align 4
- .ent chdir
+#include <private/bionic_asm.h>
-chdir:
+ENTRY(chdir)
.set noreorder
- .cpload $t9
- li $v0, __NR_chdir
+ .cpload t9
+ li v0, __NR_chdir
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end chdir
+END(chdir)
index a50145907a8c4d805fa397cbcba431a35dd1ddef..d1ffc97fe4a7c0193ec1c09cdd0ea05a0b6252db 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl chroot
- .align 4
- .ent chroot
+#include <private/bionic_asm.h>
-chroot:
+ENTRY(chroot)
.set noreorder
- .cpload $t9
- li $v0, __NR_chroot
+ .cpload t9
+ li v0, __NR_chroot
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end chroot
+END(chroot)
index d3986fcae3d0aa8fec5c6cef6a5bf40ab2ed9781..49d9bba7e6b5a5703af227ae9a2623301e4f55fb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl clock_getres
- .align 4
- .ent clock_getres
+#include <private/bionic_asm.h>
-clock_getres:
+ENTRY(clock_getres)
.set noreorder
- .cpload $t9
- li $v0, __NR_clock_getres
+ .cpload t9
+ li v0, __NR_clock_getres
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end clock_getres
+END(clock_getres)
index fa02309f16f39755cf604e748c8b91fdf90c6d02..42929e810f103683fb4f8bbaf5a8e34e7c3bad5d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl clock_gettime
- .align 4
- .ent clock_gettime
+#include <private/bionic_asm.h>
-clock_gettime:
+ENTRY(clock_gettime)
.set noreorder
- .cpload $t9
- li $v0, __NR_clock_gettime
+ .cpload t9
+ li v0, __NR_clock_gettime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end clock_gettime
+END(clock_gettime)
index 91a1418e5ceed705ca3597e59045b9278fb24e05..e7c25cef364124c0b9e046704a9e6e464784887d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl clock_nanosleep
- .align 4
- .ent clock_nanosleep
+#include <private/bionic_asm.h>
-clock_nanosleep:
+ENTRY(clock_nanosleep)
.set noreorder
- .cpload $t9
- li $v0, __NR_clock_nanosleep
+ .cpload t9
+ li v0, __NR_clock_nanosleep
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end clock_nanosleep
+END(clock_nanosleep)
index d8eb8f18c7e29de9b19faebaaab12de45db4d2ef..e7dda913c9bee0f9334e1601aeb5ae2d42916974 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl clock_settime
- .align 4
- .ent clock_settime
+#include <private/bionic_asm.h>
-clock_settime:
+ENTRY(clock_settime)
.set noreorder
- .cpload $t9
- li $v0, __NR_clock_settime
+ .cpload t9
+ li v0, __NR_clock_settime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end clock_settime
+END(clock_settime)
index 098fdd2133acbef21fd99bbe9221a3b202578758..bc2c32588432d88c0e126b95c75a42a0a15faa04 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl close
- .align 4
- .ent close
+#include <private/bionic_asm.h>
-close:
+ENTRY(close)
.set noreorder
- .cpload $t9
- li $v0, __NR_close
+ .cpload t9
+ li v0, __NR_close
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end close
+END(close)
index d3b0cea168163f6652c735f94e8e6095cc921ba2..6f106528b089dfc7949353f16e1e419e88bc1475 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl connect
- .align 4
- .ent connect
+#include <private/bionic_asm.h>
-connect:
+ENTRY(connect)
.set noreorder
- .cpload $t9
- li $v0, __NR_connect
+ .cpload t9
+ li v0, __NR_connect
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end connect
+END(connect)
index ae476978db0bf266f11eaf98b93f2a5c09bfeca8..9247f5af698810a8f24855dfdeec5a57507e6503 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl delete_module
- .align 4
- .ent delete_module
+#include <private/bionic_asm.h>
-delete_module:
+ENTRY(delete_module)
.set noreorder
- .cpload $t9
- li $v0, __NR_delete_module
+ .cpload t9
+ li v0, __NR_delete_module
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end delete_module
+END(delete_module)
index 6cb924fc8befb01f443d9423588384df2f5ea996..61b1c03fe28325236d3ef217ec5c2dc2756535ee 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl dup
- .align 4
- .ent dup
+#include <private/bionic_asm.h>
-dup:
+ENTRY(dup)
.set noreorder
- .cpload $t9
- li $v0, __NR_dup
+ .cpload t9
+ li v0, __NR_dup
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end dup
+END(dup)
index 6a3752cd160584606dfe343b3f904eb10562ab2f..d0694e8e6fb48b535d090d8ea9b7d155cfb98be5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl dup3
- .align 4
- .ent dup3
+#include <private/bionic_asm.h>
-dup3:
+ENTRY(dup3)
.set noreorder
- .cpload $t9
- li $v0, __NR_dup3
+ .cpload t9
+ li v0, __NR_dup3
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end dup3
+END(dup3)
index 0abaeda34e8018c9be34bbffa7450ed81c243ee1..2043f39820eb5c824aee800e6d984d9adaa55b67 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl epoll_create1
- .align 4
- .ent epoll_create1
+#include <private/bionic_asm.h>
-epoll_create1:
+ENTRY(epoll_create1)
.set noreorder
- .cpload $t9
- li $v0, __NR_epoll_create1
+ .cpload t9
+ li v0, __NR_epoll_create1
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end epoll_create1
+END(epoll_create1)
index 20d4367e78f2b5433999b6c62f043b3614222358..9474d3ad44150c49d7f0fa8bf7a70fa223847b37 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl epoll_ctl
- .align 4
- .ent epoll_ctl
+#include <private/bionic_asm.h>
-epoll_ctl:
+ENTRY(epoll_ctl)
.set noreorder
- .cpload $t9
- li $v0, __NR_epoll_ctl
+ .cpload t9
+ li v0, __NR_epoll_ctl
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end epoll_ctl
+END(epoll_ctl)
index f12bc7d5939db455e9e6da0898a88a12b954abc8..5282a914def41d15113f2ece6a538825db38addb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl eventfd
- .align 4
- .ent eventfd
+#include <private/bionic_asm.h>
-eventfd:
+ENTRY(eventfd)
.set noreorder
- .cpload $t9
- li $v0, __NR_eventfd2
+ .cpload t9
+ li v0, __NR_eventfd2
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end eventfd
+END(eventfd)
index 750b402425023935c7ff43c57e7b4b7114851372..fcaec0a9b58d91892749d03f9e078aa8023d9137 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl execve
- .align 4
- .ent execve
+#include <private/bionic_asm.h>
-execve:
+ENTRY(execve)
.set noreorder
- .cpload $t9
- li $v0, __NR_execve
+ .cpload t9
+ li v0, __NR_execve
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end execve
+END(execve)
index ffa4f42911aca2dcbc69bb4564ca55914ab5c2d1..e7afe2ada8db13cbdf95c1b187f90223620fa47a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl faccessat
- .align 4
- .ent faccessat
+#include <private/bionic_asm.h>
-faccessat:
+ENTRY(faccessat)
.set noreorder
- .cpload $t9
- li $v0, __NR_faccessat
+ .cpload t9
+ li v0, __NR_faccessat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end faccessat
+END(faccessat)
index e844d1690233059b92c7e3603f533ea5518838f3..d8146069500c92a63c09198ae29b4d350be392b4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fallocate64
- .align 4
- .ent fallocate64
+#include <private/bionic_asm.h>
-fallocate64:
+ENTRY(fallocate64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fallocate
+ .cpload t9
+ li v0, __NR_fallocate
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fallocate64
+END(fallocate64)
index ae0b883ffa2ed47f5951b1725287bf75fb6f5012..daac0f5d8fdbf34c78b0da73c275cd358516ede2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fchdir
- .align 4
- .ent fchdir
+#include <private/bionic_asm.h>
-fchdir:
+ENTRY(fchdir)
.set noreorder
- .cpload $t9
- li $v0, __NR_fchdir
+ .cpload t9
+ li v0, __NR_fchdir
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fchdir
+END(fchdir)
index 272964ecff249dbd21e3e349eceed55bbc5d5b4d..e947e41a18aef145b0e4d45f315eaf05b2fc06dc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fchmod
- .align 4
- .ent fchmod
+#include <private/bionic_asm.h>
-fchmod:
+ENTRY(fchmod)
.set noreorder
- .cpload $t9
- li $v0, __NR_fchmod
+ .cpload t9
+ li v0, __NR_fchmod
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fchmod
+END(fchmod)
index 388d221b47f33b42325cb93ec3213b1f5ca4d5c3..4d2a7d3a68fcc240e6debd8d3ec5930c9439ef33 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fchmodat
- .align 4
- .ent fchmodat
+#include <private/bionic_asm.h>
-fchmodat:
+ENTRY(fchmodat)
.set noreorder
- .cpload $t9
- li $v0, __NR_fchmodat
+ .cpload t9
+ li v0, __NR_fchmodat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fchmodat
+END(fchmodat)
index 52d6e590bc721270b07d156fc2608d3c76f165d9..f59c0f4e074780d401dd19aaa4d8b1cd0e89fd82 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fchown
- .align 4
- .ent fchown
+#include <private/bionic_asm.h>
-fchown:
+ENTRY(fchown)
.set noreorder
- .cpload $t9
- li $v0, __NR_fchown
+ .cpload t9
+ li v0, __NR_fchown
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fchown
+END(fchown)
index 6913d6c4ed5eecaac2d30f04d841c7136a318b90..af44cbc3dd6550efd01ec9b0ac473c10521db63e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fchownat
- .align 4
- .ent fchownat
+#include <private/bionic_asm.h>
-fchownat:
+ENTRY(fchownat)
.set noreorder
- .cpload $t9
- li $v0, __NR_fchownat
+ .cpload t9
+ li v0, __NR_fchownat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fchownat
+END(fchownat)
index a1d4056c0f7473b2f57b6bdccbec989113028be2..07e3592b6037dbd6b9d47db1e19a93fb9e8968ae 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fdatasync
- .align 4
- .ent fdatasync
+#include <private/bionic_asm.h>
-fdatasync:
+ENTRY(fdatasync)
.set noreorder
- .cpload $t9
- li $v0, __NR_fdatasync
+ .cpload t9
+ li v0, __NR_fdatasync
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fdatasync
+END(fdatasync)
index 1d645a55540cb2b61ea6552785f6ab4d9d4ea572..035e71ca5eb74971dabcb58f274f4b4be09785ce 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fgetxattr
- .align 4
- .ent fgetxattr
+#include <private/bionic_asm.h>
-fgetxattr:
+ENTRY(fgetxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_fgetxattr
+ .cpload t9
+ li v0, __NR_fgetxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fgetxattr
+END(fgetxattr)
index 2cb53c54f60c7c9d438189006085c7fe21f42900..500cd97926a79a4de52423c4aa02d20ad378a336 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl flistxattr
- .align 4
- .ent flistxattr
+#include <private/bionic_asm.h>
-flistxattr:
+ENTRY(flistxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_flistxattr
+ .cpload t9
+ li v0, __NR_flistxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end flistxattr
+END(flistxattr)
index c1723a1f16be17354051b21b57b0c690953a4f3f..7d843ab39e9e88632eaebed41ae5fb4304094051 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl flock
- .align 4
- .ent flock
+#include <private/bionic_asm.h>
-flock:
+ENTRY(flock)
.set noreorder
- .cpload $t9
- li $v0, __NR_flock
+ .cpload t9
+ li v0, __NR_flock
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end flock
+END(flock)
index 2526ae0e86e67b88f93ee6e31c9c02353bb9b2b9..9f161866f175abd91708d4f2034b1418f51b066a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fremovexattr
- .align 4
- .ent fremovexattr
+#include <private/bionic_asm.h>
-fremovexattr:
+ENTRY(fremovexattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_fremovexattr
+ .cpload t9
+ li v0, __NR_fremovexattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fremovexattr
+END(fremovexattr)
index 4552b07dcd65dbd8986031cc20f49fbf7a7a4c90..03471288bc78c1408fa7ae4760ee38813d1b396e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fsetxattr
- .align 4
- .ent fsetxattr
+#include <private/bionic_asm.h>
-fsetxattr:
+ENTRY(fsetxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_fsetxattr
+ .cpload t9
+ li v0, __NR_fsetxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fsetxattr
+END(fsetxattr)
index 904ce86036273b93520f66332eaaa11d2c8e3c5b..722854115ad09e8162d58e004cc54069f71b1be8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fstat64
- .align 4
- .ent fstat64
+#include <private/bionic_asm.h>
-fstat64:
+ENTRY(fstat64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fstat64
+ .cpload t9
+ li v0, __NR_fstat64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fstat64
+END(fstat64)
.globl fstat
.equ fstat, fstat64
index 8c81a9fcae2db5a94460eb628a997f03cca88f4b..b2903f25a1d998efb30f5b7cfcfe5cb25d6dcc52 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fstatat64
- .align 4
- .ent fstatat64
+#include <private/bionic_asm.h>
-fstatat64:
+ENTRY(fstatat64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fstatat64
+ .cpload t9
+ li v0, __NR_fstatat64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fstatat64
+END(fstatat64)
.globl fstatat
.equ fstatat, fstatat64
index 383bd0c33a3f51813b6cd7d02ec2f71541aa6340..96b417df391dc1550990b20606aed3a6cff4a5a5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl fsync
- .align 4
- .ent fsync
+#include <private/bionic_asm.h>
-fsync:
+ENTRY(fsync)
.set noreorder
- .cpload $t9
- li $v0, __NR_fsync
+ .cpload t9
+ li v0, __NR_fsync
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end fsync
+END(fsync)
index 797d239427b340729ee62d1be18f0717bbc0369c..bd428fb1a38baed7f7554f43371cfde0e808ab76 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl ftruncate
- .align 4
- .ent ftruncate
+#include <private/bionic_asm.h>
-ftruncate:
+ENTRY(ftruncate)
.set noreorder
- .cpload $t9
- li $v0, __NR_ftruncate
+ .cpload t9
+ li v0, __NR_ftruncate
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end ftruncate
+END(ftruncate)
index e7f7f81478dd8b83e53f8f1a017f7a8bdb86b750..357e9a5834c592117902367a17ea850a69394ef9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl ftruncate64
- .align 4
- .ent ftruncate64
+#include <private/bionic_asm.h>
-ftruncate64:
+ENTRY(ftruncate64)
.set noreorder
- .cpload $t9
- li $v0, __NR_ftruncate64
+ .cpload t9
+ li v0, __NR_ftruncate64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end ftruncate64
+END(ftruncate64)
index 25c88c85c7ef73052051ad8103c646bde2c4b2c1..a865fea10baea01f0a3701286614ce5ea980b515 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl futex
- .align 4
- .ent futex
+#include <private/bionic_asm.h>
-futex:
+ENTRY(futex)
.set noreorder
- .cpload $t9
- li $v0, __NR_futex
+ .cpload t9
+ li v0, __NR_futex
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end futex
+END(futex)
index 7b8006a4f2ba8b599e36eef2dd2b51eb3738ec71..ce92886f40ceff8a5139ac676f0ded7830c6592e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getdents
- .align 4
- .ent getdents
+#include <private/bionic_asm.h>
-getdents:
+ENTRY(getdents)
.set noreorder
- .cpload $t9
- li $v0, __NR_getdents64
+ .cpload t9
+ li v0, __NR_getdents64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getdents
+END(getdents)
index 5d75420df0df8359eb4fc67df54c9b522e42eef3..c3a3ac0e46edf5e60a0027f46a3003224d3d7ec4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getegid
- .align 4
- .ent getegid
+#include <private/bionic_asm.h>
-getegid:
+ENTRY(getegid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getegid
+ .cpload t9
+ li v0, __NR_getegid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getegid
+END(getegid)
index f878ea78ebbb78c0d20f89be860af941479b9933..66e6d4f0009b8ba1735f970b606cd5117a386620 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl geteuid
- .align 4
- .ent geteuid
+#include <private/bionic_asm.h>
-geteuid:
+ENTRY(geteuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_geteuid
+ .cpload t9
+ li v0, __NR_geteuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end geteuid
+END(geteuid)
index 207d1a116c434efcc1019c90906a4e0b5f5c9bdc..674d5271e7696252c1a73887454790fa621d9b66 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getgid
- .align 4
- .ent getgid
+#include <private/bionic_asm.h>
-getgid:
+ENTRY(getgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getgid
+ .cpload t9
+ li v0, __NR_getgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getgid
+END(getgid)
index d0a10a3b2489a64c15fbb9afb3d6814504a3b354..caa031bdf1e551691c151bee68292e67cfc416a8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getgroups
- .align 4
- .ent getgroups
+#include <private/bionic_asm.h>
-getgroups:
+ENTRY(getgroups)
.set noreorder
- .cpload $t9
- li $v0, __NR_getgroups
+ .cpload t9
+ li v0, __NR_getgroups
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getgroups
+END(getgroups)
index 40f90f26d79262c535c33495dd37973135b4433a..e7a655a97696d453ac35c02d112dffabd4279fd0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getitimer
- .align 4
- .ent getitimer
+#include <private/bionic_asm.h>
-getitimer:
+ENTRY(getitimer)
.set noreorder
- .cpload $t9
- li $v0, __NR_getitimer
+ .cpload t9
+ li v0, __NR_getitimer
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getitimer
+END(getitimer)
index 6d491deacbc7640609b2aa7d438763d37e3887fb..31df8adbd431266b227dc0c572e3000ea26d8187 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getpeername
- .align 4
- .ent getpeername
+#include <private/bionic_asm.h>
-getpeername:
+ENTRY(getpeername)
.set noreorder
- .cpload $t9
- li $v0, __NR_getpeername
+ .cpload t9
+ li v0, __NR_getpeername
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getpeername
+END(getpeername)
index dc6ec9690284753ee847685fbef562215db0d6ca..7e3e4398fbd18c3303fe57f6409e18a5c5e2dac1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getpgid
- .align 4
- .ent getpgid
+#include <private/bionic_asm.h>
-getpgid:
+ENTRY(getpgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getpgid
+ .cpload t9
+ li v0, __NR_getpgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getpgid
+END(getpgid)
index 244d2563701a477b241b2ad7a5daf65d65964a39..a053f5be0af08c8841b0dd8da6e1cc4d3d086a07 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getpid
- .align 4
- .ent getpid
+#include <private/bionic_asm.h>
-getpid:
+ENTRY(getpid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getpid
+ .cpload t9
+ li v0, __NR_getpid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getpid
+END(getpid)
index 1973424fd3701443ec358ae0b3a3abbaf59fd1b8..3d76fc2b172100d50f8843512e07de46b36fbb9c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getppid
- .align 4
- .ent getppid
+#include <private/bionic_asm.h>
-getppid:
+ENTRY(getppid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getppid
+ .cpload t9
+ li v0, __NR_getppid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getppid
+END(getppid)
index b78e90c25bd288024a972584757e5a85d1b7977c..235902af02d2f8b51782f9ed9dcf72cda05a65a8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getresgid
- .align 4
- .ent getresgid
+#include <private/bionic_asm.h>
-getresgid:
+ENTRY(getresgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getresgid
+ .cpload t9
+ li v0, __NR_getresgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getresgid
+END(getresgid)
index 336c0490d17cb57214b5127c9f3da7551187c911..c6c4c135bb5ebba4868fd63aa08018a877fa4f19 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getresuid
- .align 4
- .ent getresuid
+#include <private/bionic_asm.h>
-getresuid:
+ENTRY(getresuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getresuid
+ .cpload t9
+ li v0, __NR_getresuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getresuid
+END(getresuid)
index 557c2c17f0c10d9fdec8c13a9c4ec34bb763e2e2..ef4ae89acc474c52114da052d3e83fcccd668023 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getrlimit
- .align 4
- .ent getrlimit
+#include <private/bionic_asm.h>
-getrlimit:
+ENTRY(getrlimit)
.set noreorder
- .cpload $t9
- li $v0, __NR_getrlimit
+ .cpload t9
+ li v0, __NR_getrlimit
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getrlimit
+END(getrlimit)
index c2750f9f9482a2e27bd385f4af382eed9279b353..21cabfa344e9ae708f9d788289184792bcd2a714 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getrusage
- .align 4
- .ent getrusage
+#include <private/bionic_asm.h>
-getrusage:
+ENTRY(getrusage)
.set noreorder
- .cpload $t9
- li $v0, __NR_getrusage
+ .cpload t9
+ li v0, __NR_getrusage
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getrusage
+END(getrusage)
index 9ceb65db134f3a8cc4414d5d5c66b407d057732b..b0b21a0bc78612804eb9d6a11a7666a14173be17 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getsid
- .align 4
- .ent getsid
+#include <private/bionic_asm.h>
-getsid:
+ENTRY(getsid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getsid
+ .cpload t9
+ li v0, __NR_getsid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getsid
+END(getsid)
index 43b28c2f0c3587800de33ab95d1899c806f90f99..82d0b831e1e6e549e872d2fc9865dd43912f1e50 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getsockname
- .align 4
- .ent getsockname
+#include <private/bionic_asm.h>
-getsockname:
+ENTRY(getsockname)
.set noreorder
- .cpload $t9
- li $v0, __NR_getsockname
+ .cpload t9
+ li v0, __NR_getsockname
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getsockname
+END(getsockname)
index affe5390486b15fc73041c78580fa081065397ae..ad360e3df3c322a55f12c250b44ee5ac249de8f3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getsockopt
- .align 4
- .ent getsockopt
+#include <private/bionic_asm.h>
-getsockopt:
+ENTRY(getsockopt)
.set noreorder
- .cpload $t9
- li $v0, __NR_getsockopt
+ .cpload t9
+ li v0, __NR_getsockopt
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getsockopt
+END(getsockopt)
index d258ef259c37de3de58055ff6d6309f09b799d91..cfdc57b8d0c10ab55799ba424bb17ab011018d36 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl gettid
- .align 4
- .ent gettid
+#include <private/bionic_asm.h>
-gettid:
+ENTRY(gettid)
.set noreorder
- .cpload $t9
- li $v0, __NR_gettid
+ .cpload t9
+ li v0, __NR_gettid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end gettid
+END(gettid)
index 006752ef52bb604bfdad5338cbbd8991584f360a..e66fd77d14753c8939374bbabf37f725db0cb841 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl gettimeofday
- .align 4
- .ent gettimeofday
+#include <private/bionic_asm.h>
-gettimeofday:
+ENTRY(gettimeofday)
.set noreorder
- .cpload $t9
- li $v0, __NR_gettimeofday
+ .cpload t9
+ li v0, __NR_gettimeofday
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end gettimeofday
+END(gettimeofday)
index 747318a321b79d6142e0bb0be95b1e5d478c96a0..345af71810cbb54c7fb1a79b59895ab34f65d30b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getuid
- .align 4
- .ent getuid
+#include <private/bionic_asm.h>
-getuid:
+ENTRY(getuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_getuid
+ .cpload t9
+ li v0, __NR_getuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getuid
+END(getuid)
index 2f82c4c667e5a527d52a1baaf931e913db51afa4..c7e215e3f39556fe04df97bf03f626802bde32a7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl getxattr
- .align 4
- .ent getxattr
+#include <private/bionic_asm.h>
-getxattr:
+ENTRY(getxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_getxattr
+ .cpload t9
+ li v0, __NR_getxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end getxattr
+END(getxattr)
index ee644b38f08725a32662442acbceae8dc48a04d5..21ba5b169c2801dca58a64032c50c8ae5e13e704 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl init_module
- .align 4
- .ent init_module
+#include <private/bionic_asm.h>
-init_module:
+ENTRY(init_module)
.set noreorder
- .cpload $t9
- li $v0, __NR_init_module
+ .cpload t9
+ li v0, __NR_init_module
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end init_module
+END(init_module)
diff --git a/libc/arch-mips/syscalls/inotify_add_watch.S b/libc/arch-mips/syscalls/inotify_add_watch.S
index f1c4d92fddb484dd1d44d02e22042e5cc58120b3..beb70ec5c4a00cdc63a4fa6dce6d42bca747a0d5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl inotify_add_watch
- .align 4
- .ent inotify_add_watch
+#include <private/bionic_asm.h>
-inotify_add_watch:
+ENTRY(inotify_add_watch)
.set noreorder
- .cpload $t9
- li $v0, __NR_inotify_add_watch
+ .cpload t9
+ li v0, __NR_inotify_add_watch
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end inotify_add_watch
+END(inotify_add_watch)
index c3fcf489927fe7f89b0d3d77c3bc554a8158902d..6c825c60dd47779ed4e52634de8d825f68c92a72 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl inotify_init1
- .align 4
- .ent inotify_init1
+#include <private/bionic_asm.h>
-inotify_init1:
+ENTRY(inotify_init1)
.set noreorder
- .cpload $t9
- li $v0, __NR_inotify_init1
+ .cpload t9
+ li v0, __NR_inotify_init1
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end inotify_init1
+END(inotify_init1)
diff --git a/libc/arch-mips/syscalls/inotify_rm_watch.S b/libc/arch-mips/syscalls/inotify_rm_watch.S
index 13191af767e750ef8d3139cf8b156c01d5f457ff..280f2b43a8eabd57b93b7e0a18a47ea6e541e7e7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl inotify_rm_watch
- .align 4
- .ent inotify_rm_watch
+#include <private/bionic_asm.h>
-inotify_rm_watch:
+ENTRY(inotify_rm_watch)
.set noreorder
- .cpload $t9
- li $v0, __NR_inotify_rm_watch
+ .cpload t9
+ li v0, __NR_inotify_rm_watch
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end inotify_rm_watch
+END(inotify_rm_watch)
index b8bd1d35e459289c2596ca35474a067281b362c7..fbc8b17ea104f0c10c09dcfcd5960e9c064ee32d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl ioprio_get
- .align 4
- .ent ioprio_get
+#include <private/bionic_asm.h>
-ioprio_get:
+ENTRY(ioprio_get)
.set noreorder
- .cpload $t9
- li $v0, __NR_ioprio_get
+ .cpload t9
+ li v0, __NR_ioprio_get
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end ioprio_get
+END(ioprio_get)
index c5b3bdc21fe4d1f131c8d9f654ac8ec0686db1f0..d0320ed89086631c92bc6eb757cfff5ebc4d76ab 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl ioprio_set
- .align 4
- .ent ioprio_set
+#include <private/bionic_asm.h>
-ioprio_set:
+ENTRY(ioprio_set)
.set noreorder
- .cpload $t9
- li $v0, __NR_ioprio_set
+ .cpload t9
+ li v0, __NR_ioprio_set
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end ioprio_set
+END(ioprio_set)
index 20a484eb7af17499d36ee932b89c8469b3abb631..0941717db5e580a4c60230a1562ddb64d07f7dc8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl kill
- .align 4
- .ent kill
+#include <private/bionic_asm.h>
-kill:
+ENTRY(kill)
.set noreorder
- .cpload $t9
- li $v0, __NR_kill
+ .cpload t9
+ li v0, __NR_kill
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end kill
+END(kill)
index 5d30db2c7bb909bedaf1cd2a42945a1b1c4b1818..ebc88371f982c2180dbb7e2494fa5cd581c34c13 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl klogctl
- .align 4
- .ent klogctl
+#include <private/bionic_asm.h>
-klogctl:
+ENTRY(klogctl)
.set noreorder
- .cpload $t9
- li $v0, __NR_syslog
+ .cpload t9
+ li v0, __NR_syslog
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end klogctl
+END(klogctl)
index 6266aafb6ba0ddb8ad9b6e650b42a39988978980..8c4a25273b25b991ec652905d392b19d5e140204 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl lgetxattr
- .align 4
- .ent lgetxattr
+#include <private/bionic_asm.h>
-lgetxattr:
+ENTRY(lgetxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_lgetxattr
+ .cpload t9
+ li v0, __NR_lgetxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end lgetxattr
+END(lgetxattr)
index dae07dd6d6276ea582ed275a1576beadb6cb712d..cc7278de02f7d3cd704d8f9a97d4b5c3036e7652 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl linkat
- .align 4
- .ent linkat
+#include <private/bionic_asm.h>
-linkat:
+ENTRY(linkat)
.set noreorder
- .cpload $t9
- li $v0, __NR_linkat
+ .cpload t9
+ li v0, __NR_linkat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end linkat
+END(linkat)
index f2e608398b215250bab21b169afc70f18af7ac05..68eba523ac6a09d2939860841a97908424e3f20a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl listen
- .align 4
- .ent listen
+#include <private/bionic_asm.h>
-listen:
+ENTRY(listen)
.set noreorder
- .cpload $t9
- li $v0, __NR_listen
+ .cpload t9
+ li v0, __NR_listen
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end listen
+END(listen)
index e7523401276629ff2994865d52e984387f851ab2..006bfcebefa91c090bc8afa99003b352a6355942 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl listxattr
- .align 4
- .ent listxattr
+#include <private/bionic_asm.h>
-listxattr:
+ENTRY(listxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_listxattr
+ .cpload t9
+ li v0, __NR_listxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end listxattr
+END(listxattr)
index 9dc868e5a1653ceaff325c26466aa0eb7426edd7..7f833ade0c4906f12bed86cdb1909c743ab47b96 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl llistxattr
- .align 4
- .ent llistxattr
+#include <private/bionic_asm.h>
-llistxattr:
+ENTRY(llistxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_llistxattr
+ .cpload t9
+ li v0, __NR_llistxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end llistxattr
+END(llistxattr)
index d7e6609da655cb278afbd4324fe53598e14655d3..21d00ea4b9e46d817f595e1618f3e276665139c2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl lremovexattr
- .align 4
- .ent lremovexattr
+#include <private/bionic_asm.h>
-lremovexattr:
+ENTRY(lremovexattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_lremovexattr
+ .cpload t9
+ li v0, __NR_lremovexattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end lremovexattr
+END(lremovexattr)
index 269cc955b541c53e9fa6de3d7fc35fe1a493e148..82c2776dd4b3e5d91320e65c1da9d79d105aa1cc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl lseek
- .align 4
- .ent lseek
+#include <private/bionic_asm.h>
-lseek:
+ENTRY(lseek)
.set noreorder
- .cpload $t9
- li $v0, __NR_lseek
+ .cpload t9
+ li v0, __NR_lseek
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end lseek
+END(lseek)
index 2dfd24a52428b32e365a3138511a31d31f37ac6b..d54ec692854a003752c0c6e2e9753e84bd495c35 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl lsetxattr
- .align 4
- .ent lsetxattr
+#include <private/bionic_asm.h>
-lsetxattr:
+ENTRY(lsetxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_lsetxattr
+ .cpload t9
+ li v0, __NR_lsetxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end lsetxattr
+END(lsetxattr)
index 831827230a36cbcfe12418490597d16f8aa4dbfb..9aa28152d3c9381dc45b31af4e0bf518f90924b3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl madvise
- .align 4
- .ent madvise
+#include <private/bionic_asm.h>
-madvise:
+ENTRY(madvise)
.set noreorder
- .cpload $t9
- li $v0, __NR_madvise
+ .cpload t9
+ li v0, __NR_madvise
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end madvise
+END(madvise)
index 629a46845444c9fef75dd6b4d3769da3d06ec695..0db4313ff41b500f1d5e5f63b0a8aa44e7819090 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mincore
- .align 4
- .ent mincore
+#include <private/bionic_asm.h>
-mincore:
+ENTRY(mincore)
.set noreorder
- .cpload $t9
- li $v0, __NR_mincore
+ .cpload t9
+ li v0, __NR_mincore
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mincore
+END(mincore)
index 3f8bc190f591b112c82321d3e0996180cb737738..0ac98d4604611b07e890c41c4fe2f20c42621d19 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mkdirat
- .align 4
- .ent mkdirat
+#include <private/bionic_asm.h>
-mkdirat:
+ENTRY(mkdirat)
.set noreorder
- .cpload $t9
- li $v0, __NR_mkdirat
+ .cpload t9
+ li v0, __NR_mkdirat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mkdirat
+END(mkdirat)
index fc05bb3f02a9dc6db809ac20e21b00057a67b386..b85d8bfad1e3235219e826a3a1c87552352212b9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mknodat
- .align 4
- .ent mknodat
+#include <private/bionic_asm.h>
-mknodat:
+ENTRY(mknodat)
.set noreorder
- .cpload $t9
- li $v0, __NR_mknodat
+ .cpload t9
+ li v0, __NR_mknodat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mknodat
+END(mknodat)
index 20cacda9325042f4bb56bcb1a533beaddd85c05f..0ba2bca8cfc89f2b6bfbc09660b6784ad3bbd865 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mlock
- .align 4
- .ent mlock
+#include <private/bionic_asm.h>
-mlock:
+ENTRY(mlock)
.set noreorder
- .cpload $t9
- li $v0, __NR_mlock
+ .cpload t9
+ li v0, __NR_mlock
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mlock
+END(mlock)
index 0aac08783a0e4b09e2b56253dd12d317a0c1a126..642c6e29684f358275c177bfe1f1762a4e447388 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mlockall
- .align 4
- .ent mlockall
+#include <private/bionic_asm.h>
-mlockall:
+ENTRY(mlockall)
.set noreorder
- .cpload $t9
- li $v0, __NR_mlockall
+ .cpload t9
+ li v0, __NR_mlockall
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mlockall
+END(mlockall)
index 1f951cee8ea064f9ae9e6b17f809a03892e6bbd4..f0c5f6bf53371e1b2ab25a7584757cec4c5ae0a7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mount
- .align 4
- .ent mount
+#include <private/bionic_asm.h>
-mount:
+ENTRY(mount)
.set noreorder
- .cpload $t9
- li $v0, __NR_mount
+ .cpload t9
+ li v0, __NR_mount
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mount
+END(mount)
index 7d9e784df6ff5805a23085d34cc2338b69311605..c0ce98869d1344f87a684bd7d03d666e2245c48c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mprotect
- .align 4
- .ent mprotect
+#include <private/bionic_asm.h>
-mprotect:
+ENTRY(mprotect)
.set noreorder
- .cpload $t9
- li $v0, __NR_mprotect
+ .cpload t9
+ li v0, __NR_mprotect
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mprotect
+END(mprotect)
index 22ddda9225cd6559641b3c1e30570c6d23b8e086..bd4c385caf5ae8a0ebfdd3aea38b8c8ca54f8430 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl mremap
- .align 4
- .ent mremap
+#include <private/bionic_asm.h>
-mremap:
+ENTRY(mremap)
.set noreorder
- .cpload $t9
- li $v0, __NR_mremap
+ .cpload t9
+ li v0, __NR_mremap
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end mremap
+END(mremap)
index 4969433f4bbd35f2dfc4e18e30ac71f439136657..e8ecb2ab5e34f7041017c3c8cf0f3a2c4aa45021 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl msync
- .align 4
- .ent msync
+#include <private/bionic_asm.h>
-msync:
+ENTRY(msync)
.set noreorder
- .cpload $t9
- li $v0, __NR_msync
+ .cpload t9
+ li v0, __NR_msync
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end msync
+END(msync)
index 59f1d446e706369486a20c74ffb3cfe2b7c9367f..f8ddc3a6aa2272e6a4bc48859a1a235163485595 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl munlock
- .align 4
- .ent munlock
+#include <private/bionic_asm.h>
-munlock:
+ENTRY(munlock)
.set noreorder
- .cpload $t9
- li $v0, __NR_munlock
+ .cpload t9
+ li v0, __NR_munlock
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end munlock
+END(munlock)
index d0a8e9f50e53b036cd8203fc940626862922db08..5ced5c65055948091a7519754fa2f7285086c2dd 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl munlockall
- .align 4
- .ent munlockall
+#include <private/bionic_asm.h>
-munlockall:
+ENTRY(munlockall)
.set noreorder
- .cpload $t9
- li $v0, __NR_munlockall
+ .cpload t9
+ li v0, __NR_munlockall
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end munlockall
+END(munlockall)
index d4c1057a63e92ed8394dd6e459772bebd960c5b1..527825c31f66e4cb8af6cb1cd96b255705415135 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl munmap
- .align 4
- .ent munmap
+#include <private/bionic_asm.h>
-munmap:
+ENTRY(munmap)
.set noreorder
- .cpload $t9
- li $v0, __NR_munmap
+ .cpload t9
+ li v0, __NR_munmap
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end munmap
+END(munmap)
index ad3b0f95a899e049d8300744e6e57adf820fa2f6..8dc816a9d250159e9f7788778dc045cd0d994f27 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl nanosleep
- .align 4
- .ent nanosleep
+#include <private/bionic_asm.h>
-nanosleep:
+ENTRY(nanosleep)
.set noreorder
- .cpload $t9
- li $v0, __NR_nanosleep
+ .cpload t9
+ li v0, __NR_nanosleep
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end nanosleep
+END(nanosleep)
index edd8b85e2f13f0c96518775480dc90ee4c02758f..a0e441666e2a6124cbecb5ca6829a69ceb3e5207 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl perf_event_open
- .align 4
- .ent perf_event_open
+#include <private/bionic_asm.h>
-perf_event_open:
+ENTRY(perf_event_open)
.set noreorder
- .cpload $t9
- li $v0, __NR_perf_event_open
+ .cpload t9
+ li v0, __NR_perf_event_open
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end perf_event_open
+END(perf_event_open)
index 59aaeac089360a57c4b4923a2c01622e156cb8bf..e8449a71aed3b95dd1c5e95f81b7c061a8a033af 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl personality
- .align 4
- .ent personality
+#include <private/bionic_asm.h>
-personality:
+ENTRY(personality)
.set noreorder
- .cpload $t9
- li $v0, __NR_personality
+ .cpload t9
+ li v0, __NR_personality
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end personality
+END(personality)
index 798bd7b171f0db84b5670021d328661b0214a233..478d364ba1cc6b0fff1cf1681215847137330ec0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl pipe2
- .align 4
- .ent pipe2
+#include <private/bionic_asm.h>
-pipe2:
+ENTRY(pipe2)
.set noreorder
- .cpload $t9
- li $v0, __NR_pipe2
+ .cpload t9
+ li v0, __NR_pipe2
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end pipe2
+END(pipe2)
index 5e9a28df1f02226cbfe411115cd585d8bdf1e8a6..e9aff3c1172bab291f3da87ad1cdf3533997f646 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl prctl
- .align 4
- .ent prctl
+#include <private/bionic_asm.h>
-prctl:
+ENTRY(prctl)
.set noreorder
- .cpload $t9
- li $v0, __NR_prctl
+ .cpload t9
+ li v0, __NR_prctl
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end prctl
+END(prctl)
index 870b138617f9da542d6f78ca6e68c9c5ea3e89cb..55a54c6b0175f39517c8514934fb3de1c11684b3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl pread64
- .align 4
- .ent pread64
+#include <private/bionic_asm.h>
-pread64:
+ENTRY(pread64)
.set noreorder
- .cpload $t9
- li $v0, __NR_pread64
+ .cpload t9
+ li v0, __NR_pread64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end pread64
+END(pread64)
index 17e9157fa2f12a2641f755af0c737596fc5efa7d..c695d18e8ea3dc8374027575a98146f4773dfd1e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl prlimit64
- .align 4
- .ent prlimit64
+#include <private/bionic_asm.h>
-prlimit64:
+ENTRY(prlimit64)
.set noreorder
- .cpload $t9
- li $v0, __NR_prlimit64
+ .cpload t9
+ li v0, __NR_prlimit64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end prlimit64
+END(prlimit64)
index 1e808ff7f2e16b20ee91dda1392db71286e03878..64d3ee157029a49f78d280477ad2e2c30b404176 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl pwrite64
- .align 4
- .ent pwrite64
+#include <private/bionic_asm.h>
-pwrite64:
+ENTRY(pwrite64)
.set noreorder
- .cpload $t9
- li $v0, __NR_pwrite64
+ .cpload t9
+ li v0, __NR_pwrite64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end pwrite64
+END(pwrite64)
index c6498373bbb5e9232ad7df13c19d5d023be3227b..ff548ab7f621dfb36ed9b82409624050c54bde12 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl read
- .align 4
- .ent read
+#include <private/bionic_asm.h>
-read:
+ENTRY(read)
.set noreorder
- .cpload $t9
- li $v0, __NR_read
+ .cpload t9
+ li v0, __NR_read
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end read
+END(read)
index 09eab9e73e295e73e10d3302c206215fe773cad4..674286afa1038855cc3fdc342fccfa3887d6ed6e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl readahead
- .align 4
- .ent readahead
+#include <private/bionic_asm.h>
-readahead:
+ENTRY(readahead)
.set noreorder
- .cpload $t9
- li $v0, __NR_readahead
+ .cpload t9
+ li v0, __NR_readahead
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end readahead
+END(readahead)
index 3e5d72fd304818b76db5a10edfed061c53968fe1..a1c7d6b1fc22e6d674effeedce1435e68a53f214 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl readlinkat
- .align 4
- .ent readlinkat
+#include <private/bionic_asm.h>
-readlinkat:
+ENTRY(readlinkat)
.set noreorder
- .cpload $t9
- li $v0, __NR_readlinkat
+ .cpload t9
+ li v0, __NR_readlinkat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end readlinkat
+END(readlinkat)
index 1f367bed76939c86c4567d7a9a5ef0f783010c64..af5a4cb4ed910caa3e6601da4b8f66f538019199 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl readv
- .align 4
- .ent readv
+#include <private/bionic_asm.h>
-readv:
+ENTRY(readv)
.set noreorder
- .cpload $t9
- li $v0, __NR_readv
+ .cpload t9
+ li v0, __NR_readv
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end readv
+END(readv)
index 3c2303c06007524cdd4870aad215356524d69d2b..04b04f6daf55697f22f7fe71cb8d73254fef12b8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl recvfrom
- .align 4
- .ent recvfrom
+#include <private/bionic_asm.h>
-recvfrom:
+ENTRY(recvfrom)
.set noreorder
- .cpload $t9
- li $v0, __NR_recvfrom
+ .cpload t9
+ li v0, __NR_recvfrom
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end recvfrom
+END(recvfrom)
index aaf022f7d67cb4c88f00498fb6c44204ba8dcf3c..a0a3a3ff7914fecbdb95ac6ead7a7b039aad507d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl recvmsg
- .align 4
- .ent recvmsg
+#include <private/bionic_asm.h>
-recvmsg:
+ENTRY(recvmsg)
.set noreorder
- .cpload $t9
- li $v0, __NR_recvmsg
+ .cpload t9
+ li v0, __NR_recvmsg
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end recvmsg
+END(recvmsg)
index 29df5d2c2f8849366ab9112ccea3b7444d6f2199..0f72ebf0eb3f6d7741d99cd2161d283489768be5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl removexattr
- .align 4
- .ent removexattr
+#include <private/bionic_asm.h>
-removexattr:
+ENTRY(removexattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_removexattr
+ .cpload t9
+ li v0, __NR_removexattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end removexattr
+END(removexattr)
index b7c210eaf40797bb1644cc62baccf91e9b8a616f..210b439f638049a827b502c0a8db65fd74a741c4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl renameat
- .align 4
- .ent renameat
+#include <private/bionic_asm.h>
-renameat:
+ENTRY(renameat)
.set noreorder
- .cpload $t9
- li $v0, __NR_renameat
+ .cpload t9
+ li v0, __NR_renameat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end renameat
+END(renameat)
diff --git a/libc/arch-mips/syscalls/sched_get_priority_max.S b/libc/arch-mips/syscalls/sched_get_priority_max.S
index 6d63fec291184ea51eab6bbd54f9b27114f3a134..d15a8683091f4a4b235572bd7a0b3678f2babed0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_get_priority_max
- .align 4
- .ent sched_get_priority_max
+#include <private/bionic_asm.h>
-sched_get_priority_max:
+ENTRY(sched_get_priority_max)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_get_priority_max
+ .cpload t9
+ li v0, __NR_sched_get_priority_max
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_get_priority_max
+END(sched_get_priority_max)
diff --git a/libc/arch-mips/syscalls/sched_get_priority_min.S b/libc/arch-mips/syscalls/sched_get_priority_min.S
index de88b3e5f008e6437e978d7ce0a9eb15072bbf04..5ff21c657298bda4745379c4483d604baeb25ba1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_get_priority_min
- .align 4
- .ent sched_get_priority_min
+#include <private/bionic_asm.h>
-sched_get_priority_min:
+ENTRY(sched_get_priority_min)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_get_priority_min
+ .cpload t9
+ li v0, __NR_sched_get_priority_min
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_get_priority_min
+END(sched_get_priority_min)
index ae261dbe9d1ca4768b3d32d85c64611deca12f10..1cbe72093810ad0f3a1e0716a7493b62958e095b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_getparam
- .align 4
- .ent sched_getparam
+#include <private/bionic_asm.h>
-sched_getparam:
+ENTRY(sched_getparam)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_getparam
+ .cpload t9
+ li v0, __NR_sched_getparam
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_getparam
+END(sched_getparam)
diff --git a/libc/arch-mips/syscalls/sched_getscheduler.S b/libc/arch-mips/syscalls/sched_getscheduler.S
index 6a4e6f6ac5bee6c1a94ff2a3eeb708edb462baa9..88b16e0426fbad8ed5f5d6d776c57997bd6f0921 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_getscheduler
- .align 4
- .ent sched_getscheduler
+#include <private/bionic_asm.h>
-sched_getscheduler:
+ENTRY(sched_getscheduler)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_getscheduler
+ .cpload t9
+ li v0, __NR_sched_getscheduler
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_getscheduler
+END(sched_getscheduler)
diff --git a/libc/arch-mips/syscalls/sched_rr_get_interval.S b/libc/arch-mips/syscalls/sched_rr_get_interval.S
index 436f8b32dacd0f163a5dc6f22aca20673802752e..647ee3ccf23d9eb9693f2ffd23bf9e725fbf18fa 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_rr_get_interval
- .align 4
- .ent sched_rr_get_interval
+#include <private/bionic_asm.h>
-sched_rr_get_interval:
+ENTRY(sched_rr_get_interval)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_rr_get_interval
+ .cpload t9
+ li v0, __NR_sched_rr_get_interval
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_rr_get_interval
+END(sched_rr_get_interval)
diff --git a/libc/arch-mips/syscalls/sched_setaffinity.S b/libc/arch-mips/syscalls/sched_setaffinity.S
index 98bf4585cd4dd43fa4f15029e21ee82e28619658..118476693ef951562344f6a561051fa408084dd2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_setaffinity
- .align 4
- .ent sched_setaffinity
+#include <private/bionic_asm.h>
-sched_setaffinity:
+ENTRY(sched_setaffinity)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_setaffinity
+ .cpload t9
+ li v0, __NR_sched_setaffinity
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_setaffinity
+END(sched_setaffinity)
index 2c03e936fceb9fdcb0fd2a895acf7f86ed507a11..1811c7403db7beb36f7fbb49557b56f88034503c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_setparam
- .align 4
- .ent sched_setparam
+#include <private/bionic_asm.h>
-sched_setparam:
+ENTRY(sched_setparam)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_setparam
+ .cpload t9
+ li v0, __NR_sched_setparam
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_setparam
+END(sched_setparam)
diff --git a/libc/arch-mips/syscalls/sched_setscheduler.S b/libc/arch-mips/syscalls/sched_setscheduler.S
index adb1f140002c8b78ef2c945d59d780a31c3675f5..8921d30730ff699decfcdcbac4c5aac6c7421b5e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_setscheduler
- .align 4
- .ent sched_setscheduler
+#include <private/bionic_asm.h>
-sched_setscheduler:
+ENTRY(sched_setscheduler)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_setscheduler
+ .cpload t9
+ li v0, __NR_sched_setscheduler
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_setscheduler
+END(sched_setscheduler)
index cbe799c4b6ef4fb2b9a426db6fc7785712b27464..37f09be8a0662af10c3034c9ec6b65a0c15a7dd4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sched_yield
- .align 4
- .ent sched_yield
+#include <private/bionic_asm.h>
-sched_yield:
+ENTRY(sched_yield)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_yield
+ .cpload t9
+ li v0, __NR_sched_yield
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sched_yield
+END(sched_yield)
index 219a311f4e2e9cc0c912aa525c445d59faea8ce4..84466b95a074766be6e15bc2d981967bc32afbcd 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sendfile
- .align 4
- .ent sendfile
+#include <private/bionic_asm.h>
-sendfile:
+ENTRY(sendfile)
.set noreorder
- .cpload $t9
- li $v0, __NR_sendfile
+ .cpload t9
+ li v0, __NR_sendfile
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sendfile
+END(sendfile)
index 7669973a5872468aebeece18c0174ca6c531f5cb..d9733f60a2ac2eca0aa289085b17371a770f4f16 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sendfile64
- .align 4
- .ent sendfile64
+#include <private/bionic_asm.h>
-sendfile64:
+ENTRY(sendfile64)
.set noreorder
- .cpload $t9
- li $v0, __NR_sendfile64
+ .cpload t9
+ li v0, __NR_sendfile64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sendfile64
+END(sendfile64)
index faa4cf3acf75fc2fc8cc5d93da0f1ff71bfa8347..5c37c6225c3e287d0d1801f61753bda02be311bf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sendmsg
- .align 4
- .ent sendmsg
+#include <private/bionic_asm.h>
-sendmsg:
+ENTRY(sendmsg)
.set noreorder
- .cpload $t9
- li $v0, __NR_sendmsg
+ .cpload t9
+ li v0, __NR_sendmsg
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sendmsg
+END(sendmsg)
index 80a61100de91708549236dbc633a18497d14fc51..580d142509dd66ca9c028d1bd561d0f41e80e2ad 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sendto
- .align 4
- .ent sendto
+#include <private/bionic_asm.h>
-sendto:
+ENTRY(sendto)
.set noreorder
- .cpload $t9
- li $v0, __NR_sendto
+ .cpload t9
+ li v0, __NR_sendto
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sendto
+END(sendto)
index 7e460b8197638f9676de08203168cad39b93f0ca..8fa188e22d469e3a8210104b465add8dce85af78 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setgid
- .align 4
- .ent setgid
+#include <private/bionic_asm.h>
-setgid:
+ENTRY(setgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setgid
+ .cpload t9
+ li v0, __NR_setgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setgid
+END(setgid)
index f89a4a434559f9228885646f338aa40ad1a3c0fb..f2d271cd02f6e00f1bf9cfe0254d9105a8f291a5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setgroups
- .align 4
- .ent setgroups
+#include <private/bionic_asm.h>
-setgroups:
+ENTRY(setgroups)
.set noreorder
- .cpload $t9
- li $v0, __NR_setgroups
+ .cpload t9
+ li v0, __NR_setgroups
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setgroups
+END(setgroups)
index 5a1850adf9ffd9628e81953a01e6af12c7a72a69..a2eea84cd64d34c74ec665f27096dad88a08bb0b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setitimer
- .align 4
- .ent setitimer
+#include <private/bionic_asm.h>
-setitimer:
+ENTRY(setitimer)
.set noreorder
- .cpload $t9
- li $v0, __NR_setitimer
+ .cpload t9
+ li v0, __NR_setitimer
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setitimer
+END(setitimer)
index fd4529e7367b9a11474ded61d91d8d8dd0895cfa..8a4f6742b0f89213bfd802d11d3b652fd3d41027 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setns
- .align 4
- .ent setns
+#include <private/bionic_asm.h>
-setns:
+ENTRY(setns)
.set noreorder
- .cpload $t9
- li $v0, __NR_setns
+ .cpload t9
+ li v0, __NR_setns
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setns
+END(setns)
index d41e01c7184360b88361ac0d862736643d0b3381..c68f9a6e21e01f26332e04a21c7d00f4dbcae86c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setpgid
- .align 4
- .ent setpgid
+#include <private/bionic_asm.h>
-setpgid:
+ENTRY(setpgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setpgid
+ .cpload t9
+ li v0, __NR_setpgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setpgid
+END(setpgid)
index 443d017f45a2bb296c7c667e94df4ea5ee43cdf0..2bf9f47b358a14be50da5b095804272976258aea 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setpriority
- .align 4
- .ent setpriority
+#include <private/bionic_asm.h>
-setpriority:
+ENTRY(setpriority)
.set noreorder
- .cpload $t9
- li $v0, __NR_setpriority
+ .cpload t9
+ li v0, __NR_setpriority
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setpriority
+END(setpriority)
index a91e21bd49893d4b0aee38a887b5587b23ee146c..de77e397979d539af980191db23da5b206672559 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setregid
- .align 4
- .ent setregid
+#include <private/bionic_asm.h>
-setregid:
+ENTRY(setregid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setregid
+ .cpload t9
+ li v0, __NR_setregid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setregid
+END(setregid)
index dd8a330cae9112d38a59f17043b8b25d98220a37..b2fd85f97f83f2b0031846e8e97e994e536f5068 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setresgid
- .align 4
- .ent setresgid
+#include <private/bionic_asm.h>
-setresgid:
+ENTRY(setresgid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setresgid
+ .cpload t9
+ li v0, __NR_setresgid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setresgid
+END(setresgid)
index 1319e2cf44463910d0a5c8387b95b2e3bdc8fcf4..ad9ea9b53e3f57b586acdc232dad123383d6550f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setresuid
- .align 4
- .ent setresuid
+#include <private/bionic_asm.h>
-setresuid:
+ENTRY(setresuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setresuid
+ .cpload t9
+ li v0, __NR_setresuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setresuid
+END(setresuid)
index e25f2d9cc27de44a84831095fc209e600c0a3d26..888d21913d02106867758bb9fda708fd54512e7a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setreuid
- .align 4
- .ent setreuid
+#include <private/bionic_asm.h>
-setreuid:
+ENTRY(setreuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setreuid
+ .cpload t9
+ li v0, __NR_setreuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setreuid
+END(setreuid)
index 65b1cd8b50b885b51f60f34df808256529da3ee2..71b49ac489d4c6fc7fd8efce874e43dee221cc44 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setrlimit
- .align 4
- .ent setrlimit
+#include <private/bionic_asm.h>
-setrlimit:
+ENTRY(setrlimit)
.set noreorder
- .cpload $t9
- li $v0, __NR_setrlimit
+ .cpload t9
+ li v0, __NR_setrlimit
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setrlimit
+END(setrlimit)
index a0bad2b73011d86a074204018cef79582d6e9612..9467a080cdeef9dc976d7057d72f1469c19ebbcc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setsid
- .align 4
- .ent setsid
+#include <private/bionic_asm.h>
-setsid:
+ENTRY(setsid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setsid
+ .cpload t9
+ li v0, __NR_setsid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setsid
+END(setsid)
index 3192d93aae2e2a69cb2ec29a1d76121dad9dc3d4..e8dd3f674bf010f60748123542d5d1b3373dc003 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setsockopt
- .align 4
- .ent setsockopt
+#include <private/bionic_asm.h>
-setsockopt:
+ENTRY(setsockopt)
.set noreorder
- .cpload $t9
- li $v0, __NR_setsockopt
+ .cpload t9
+ li v0, __NR_setsockopt
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setsockopt
+END(setsockopt)
index 673b7fdeb48a97da6a8e76e5890d730976817e13..b9b588fd08807062e8cf6fd69df9bae7b4fc36e6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl settimeofday
- .align 4
- .ent settimeofday
+#include <private/bionic_asm.h>
-settimeofday:
+ENTRY(settimeofday)
.set noreorder
- .cpload $t9
- li $v0, __NR_settimeofday
+ .cpload t9
+ li v0, __NR_settimeofday
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end settimeofday
+END(settimeofday)
index abfdafb2661a4a798e23e7c20c4d6ff995ae9790..55c75c1c858a3c69c4cca1e65c2a7ab499618255 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setuid
- .align 4
- .ent setuid
+#include <private/bionic_asm.h>
-setuid:
+ENTRY(setuid)
.set noreorder
- .cpload $t9
- li $v0, __NR_setuid
+ .cpload t9
+ li v0, __NR_setuid
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setuid
+END(setuid)
index b9c1aaacf1932935ec45eea7d11608e8902fc1fd..0cca64c17b3a0fcfc3a387195b6ce6793dee05b1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl setxattr
- .align 4
- .ent setxattr
+#include <private/bionic_asm.h>
-setxattr:
+ENTRY(setxattr)
.set noreorder
- .cpload $t9
- li $v0, __NR_setxattr
+ .cpload t9
+ li v0, __NR_setxattr
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end setxattr
+END(setxattr)
index 0f2208ffc7f3c408f10fe513a243e1e132567306..f6e9979510dd7edeee9ed4a6421cb55bd4cd220b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl shutdown
- .align 4
- .ent shutdown
+#include <private/bionic_asm.h>
-shutdown:
+ENTRY(shutdown)
.set noreorder
- .cpload $t9
- li $v0, __NR_shutdown
+ .cpload t9
+ li v0, __NR_shutdown
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end shutdown
+END(shutdown)
index ec1d8a1ca9a8210ffdfdd791c7369b00f8bbeab0..6632164c256094f93429b18f7205002601220159 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sigaltstack
- .align 4
- .ent sigaltstack
+#include <private/bionic_asm.h>
-sigaltstack:
+ENTRY(sigaltstack)
.set noreorder
- .cpload $t9
- li $v0, __NR_sigaltstack
+ .cpload t9
+ li v0, __NR_sigaltstack
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sigaltstack
+END(sigaltstack)
index 74e6168e202a93e3cc1e490fd7a5f94bdabea8fc..e2c2a308f903996a89f7ceb8d34b50ca0762a506 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl signalfd4
- .align 4
- .ent signalfd4
+#include <private/bionic_asm.h>
-signalfd4:
+ENTRY(signalfd4)
.set noreorder
- .cpload $t9
- li $v0, __NR_signalfd4
+ .cpload t9
+ li v0, __NR_signalfd4
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end signalfd4
+END(signalfd4)
index c67404edc14311bbe6b2f1d0d5a9e0a37e14019f..2056bcd611f3d93a636d4425649a5dfd7eea63c7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl socket
- .align 4
- .ent socket
+#include <private/bionic_asm.h>
-socket:
+ENTRY(socket)
.set noreorder
- .cpload $t9
- li $v0, __NR_socket
+ .cpload t9
+ li v0, __NR_socket
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end socket
+END(socket)
index c0f41e2508efb83efd5cae11b45d0fb74a6b014b..6257327440350f724f5172b9d7abf4b2eefe2968 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl socketpair
- .align 4
- .ent socketpair
+#include <private/bionic_asm.h>
-socketpair:
+ENTRY(socketpair)
.set noreorder
- .cpload $t9
- li $v0, __NR_socketpair
+ .cpload t9
+ li v0, __NR_socketpair
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end socketpair
+END(socketpair)
index 1ed5083ee67e69b15006417ccd3af1de3afd863e..04b5b7095392ee8d269a0846561fef3a24974867 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl swapoff
- .align 4
- .ent swapoff
+#include <private/bionic_asm.h>
-swapoff:
+ENTRY(swapoff)
.set noreorder
- .cpload $t9
- li $v0, __NR_swapoff
+ .cpload t9
+ li v0, __NR_swapoff
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end swapoff
+END(swapoff)
index 08a85b033dbadf21cdf8dc7ef7287824286b9460..1fe36982645cc11e04e5bea392c47c3ad912f4bc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl swapon
- .align 4
- .ent swapon
+#include <private/bionic_asm.h>
-swapon:
+ENTRY(swapon)
.set noreorder
- .cpload $t9
- li $v0, __NR_swapon
+ .cpload t9
+ li v0, __NR_swapon
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end swapon
+END(swapon)
index 9c43241814c4089721b5ed059dc6220cfd119eaf..5bd6e6c2c736bb42ae0279582e59037bd3cc0a7d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl symlinkat
- .align 4
- .ent symlinkat
+#include <private/bionic_asm.h>
-symlinkat:
+ENTRY(symlinkat)
.set noreorder
- .cpload $t9
- li $v0, __NR_symlinkat
+ .cpload t9
+ li v0, __NR_symlinkat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end symlinkat
+END(symlinkat)
index 0e0ee1fabe851798ba55b12b92890dc7bc298777..eb788f0c944c2743adc8c2d29b941a06c6df911f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sync
- .align 4
- .ent sync
+#include <private/bionic_asm.h>
-sync:
+ENTRY(sync)
.set noreorder
- .cpload $t9
- li $v0, __NR_sync
+ .cpload t9
+ li v0, __NR_sync
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sync
+END(sync)
index 3acfbf78c53de8d03f127266a8318b010b7eed67..7cdccb907ced0a63fa25345af9b52e05129c4850 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl sysinfo
- .align 4
- .ent sysinfo
+#include <private/bionic_asm.h>
-sysinfo:
+ENTRY(sysinfo)
.set noreorder
- .cpload $t9
- li $v0, __NR_sysinfo
+ .cpload t9
+ li v0, __NR_sysinfo
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end sysinfo
+END(sysinfo)
index 5de33d05d246e509b38a524a6abc4de451375101..99388433d8b6e1b07c0e4fd3b0c7ddef1aacfc5c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl tgkill
- .align 4
- .ent tgkill
+#include <private/bionic_asm.h>
-tgkill:
+ENTRY(tgkill)
.set noreorder
- .cpload $t9
- li $v0, __NR_tgkill
+ .cpload t9
+ li v0, __NR_tgkill
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end tgkill
+END(tgkill)
index 2528355672c5afe5ef2df165ba78a06dcc7f284a..c42f4e1723b82207d6113530ec441b390ce3add2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl timerfd_create
- .align 4
- .ent timerfd_create
+#include <private/bionic_asm.h>
-timerfd_create:
+ENTRY(timerfd_create)
.set noreorder
- .cpload $t9
- li $v0, __NR_timerfd_create
+ .cpload t9
+ li v0, __NR_timerfd_create
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end timerfd_create
+END(timerfd_create)
index b38c2d4e9eaabf1cf24fc171b77b572b6f004a11..469d174e2f826e5ccec6ebdeb08c39088441e01d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl timerfd_gettime
- .align 4
- .ent timerfd_gettime
+#include <private/bionic_asm.h>
-timerfd_gettime:
+ENTRY(timerfd_gettime)
.set noreorder
- .cpload $t9
- li $v0, __NR_timerfd_gettime
+ .cpload t9
+ li v0, __NR_timerfd_gettime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end timerfd_gettime
+END(timerfd_gettime)
index 11dc61bdf2f6dd4647159b92a0af8ac6d04105d5..c7c6f47fce6c83fa7238c22d30c482e6affb9ecf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl timerfd_settime
- .align 4
- .ent timerfd_settime
+#include <private/bionic_asm.h>
-timerfd_settime:
+ENTRY(timerfd_settime)
.set noreorder
- .cpload $t9
- li $v0, __NR_timerfd_settime
+ .cpload t9
+ li v0, __NR_timerfd_settime
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end timerfd_settime
+END(timerfd_settime)
index 248a23fc90dd5bb9d09d5c5fabdff6116a45e900..157b34cb09f8dd28ea341faa9c47ac72d34147c6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl times
- .align 4
- .ent times
+#include <private/bionic_asm.h>
-times:
+ENTRY(times)
.set noreorder
- .cpload $t9
- li $v0, __NR_times
+ .cpload t9
+ li v0, __NR_times
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end times
+END(times)
index a80b506e93a03dcff03d9fc5496bb951bb112384..c1ecb61a8a5144eb0964f030a12a7ae4726da942 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl tkill
- .align 4
- .ent tkill
+#include <private/bionic_asm.h>
-tkill:
+ENTRY(tkill)
.set noreorder
- .cpload $t9
- li $v0, __NR_tkill
+ .cpload t9
+ li v0, __NR_tkill
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end tkill
+END(tkill)
index a4256dc6f9945376dec338abc35a99e4c8541e1a..7fe4a0fadc2a1c99d63107ca1ebab0d5af124bc6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl truncate
- .align 4
- .ent truncate
+#include <private/bionic_asm.h>
-truncate:
+ENTRY(truncate)
.set noreorder
- .cpload $t9
- li $v0, __NR_truncate
+ .cpload t9
+ li v0, __NR_truncate
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end truncate
+END(truncate)
index 9f48da0d5a00438f3510a326241d6e715b404213..0911f5f643f15eca51ab06db3db57ac2a66a28bb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl truncate64
- .align 4
- .ent truncate64
+#include <private/bionic_asm.h>
-truncate64:
+ENTRY(truncate64)
.set noreorder
- .cpload $t9
- li $v0, __NR_truncate64
+ .cpload t9
+ li v0, __NR_truncate64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end truncate64
+END(truncate64)
index d74cf90475a945d11dc3088102c657648d0eb07a..57a6aed9c24e00f31eef427dffafb9b5a90ec137 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl umask
- .align 4
- .ent umask
+#include <private/bionic_asm.h>
-umask:
+ENTRY(umask)
.set noreorder
- .cpload $t9
- li $v0, __NR_umask
+ .cpload t9
+ li v0, __NR_umask
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end umask
+END(umask)
index 6164f76c24417519b31b83925045ade5a1be88c9..bf8267dd9c801d5b181d171e719cd11319097ced 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl umount2
- .align 4
- .ent umount2
+#include <private/bionic_asm.h>
-umount2:
+ENTRY(umount2)
.set noreorder
- .cpload $t9
- li $v0, __NR_umount2
+ .cpload t9
+ li v0, __NR_umount2
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end umount2
+END(umount2)
index a1051a24ef9894517f3aa862dc5cf959406830eb..ce77bd523ef2fe8eebc37c8ca0a70f29237fdcff 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl uname
- .align 4
- .ent uname
+#include <private/bionic_asm.h>
-uname:
+ENTRY(uname)
.set noreorder
- .cpload $t9
- li $v0, __NR_uname
+ .cpload t9
+ li v0, __NR_uname
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end uname
+END(uname)
index 0ca77fe1b24dd0a19c20e0c76402f45be58b019d..82e584b2b681f4ec27b27ccba1317f5df389e27a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl unlinkat
- .align 4
- .ent unlinkat
+#include <private/bionic_asm.h>
-unlinkat:
+ENTRY(unlinkat)
.set noreorder
- .cpload $t9
- li $v0, __NR_unlinkat
+ .cpload t9
+ li v0, __NR_unlinkat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end unlinkat
+END(unlinkat)
index 592cc61d56efc1d546c779eb9d738f748816dd9f..0521f305d0f78b01a670330c88902f9625186324 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl unshare
- .align 4
- .ent unshare
+#include <private/bionic_asm.h>
-unshare:
+ENTRY(unshare)
.set noreorder
- .cpload $t9
- li $v0, __NR_unshare
+ .cpload t9
+ li v0, __NR_unshare
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end unshare
+END(unshare)
index 42fe4f9eb23eb4c060af2f2fee4f93cabcf96404..208ef58fdf0ffeefcac1645e085a70fba811f610 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl utimensat
- .align 4
- .ent utimensat
+#include <private/bionic_asm.h>
-utimensat:
+ENTRY(utimensat)
.set noreorder
- .cpload $t9
- li $v0, __NR_utimensat
+ .cpload t9
+ li v0, __NR_utimensat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end utimensat
+END(utimensat)
index 8c53eca58c3a622a0bb6598a40f70a1211a8207c..ec6bd84f2f39112e9afdbb3ad372672a881e70cd 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl wait4
- .align 4
- .ent wait4
+#include <private/bionic_asm.h>
-wait4:
+ENTRY(wait4)
.set noreorder
- .cpload $t9
- li $v0, __NR_wait4
+ .cpload t9
+ li v0, __NR_wait4
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end wait4
+END(wait4)
index 85fe4d0454812e972960408b0ae4f08f4d38ae95..d10e55ae9140a0e285468c23e9c280091b03e0d7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl write
- .align 4
- .ent write
+#include <private/bionic_asm.h>
-write:
+ENTRY(write)
.set noreorder
- .cpload $t9
- li $v0, __NR_write
+ .cpload t9
+ li v0, __NR_write
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end write
+END(write)
index 4e23049b8a847abdfd30de88550e0bbf94323c11..0a2c033fc0d49f90bfb0072bead8d46329614157 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl writev
- .align 4
- .ent writev
+#include <private/bionic_asm.h>
-writev:
+ENTRY(writev)
.set noreorder
- .cpload $t9
- li $v0, __NR_writev
+ .cpload t9
+ li v0, __NR_writev
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end writev
+END(writev)
index 2a9a2b08481bade0aba7997ae2b85f80280a534e..e1ade30be828266bd3ef4f0cc5a3add2eb175c7f 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/errno.h>
#include <linux/sched.h>
#endif
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
- .text
-LEAF(__bionic_clone,FRAMESZ)
+LEAF(__bionic_clone, FRAMESZ)
PTR_SUBU sp, FRAMESZ # allocate stack frame
SETUP_GP64(FRAME_GP,__bionic_clone)
SAVE_GP(FRAME_GP)
index 834c89d82874c19e704d8dbd0df3dc222336b98e..8488102b68fb4966683eb213e21dbf181b4791d7 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/* void *__get_sp(void) */
+#include <private/bionic_asm.h>
- .type __get_sp, @function
- .global __get_sp
- .align 4
- .ent __get_sp
-__get_sp:
- move $v0, $sp
- j $ra
- .end __get_sp
+ENTRY(__get_sp)
+ move v0, sp
+ j ra
+END(__get_sp)
diff --git a/libc/arch-mips64/bionic/_exit_with_stack_teardown.S b/libc/arch-mips64/bionic/_exit_with_stack_teardown.S
index 8f624c3245b275f49f88a31a6755a2b0c2a5cede..3b537eb21a1d0bbe5d34914d775d1de7585536a0 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-
- .text
+#include <private/bionic_asm.h>
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize)
+ENTRY(_exit_with_stack_teardown)
+ li v0, __NR_munmap
+ syscall
+ // If munmap failed, we ignore the failure and exit anyway.
- .type _exit_with_stack_teardown, @function
- .global _exit_with_stack_teardown
- .align 4
- .ent _exit_with_stack_teardown
-_exit_with_stack_teardown:
- li $v0, __NR_munmap
- syscall
- // If munmap failed, we ignore the failure and exit anyway.
-
- li $a0, 0
- li $v0, __NR_exit
- syscall
- // The exit syscall does not return.
- .end _exit_with_stack_teardown
+ li a0, 0
+ li v0, __NR_exit
+ syscall
+ // The exit syscall does not return.
+END(_exit_with_stack_teardown)
index e7083ae290d17c0366132254a211499cbb7d22a9..4465cd20ece003e828dda7d0ec12cc6fd239cbd5 100644 (file)
/*
* Copyright (c) 2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
LEAF(_setjmp, FRAMESZ)
PTR_SUBU sp, FRAMESZ
SETUP_GP64(GPOFF, _setjmp)
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
END(_longjmp)
-
index d0b5c847cc4561b3f29ed054335b1be38e4c2772..76c6bc27895937e67a915f8f8b6780b384cc6924 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* void bzero(void *s, size_t n);
RESTORE_GP64
j t9
END(bzero)
-
index 1a249a724655dab542e961c76913f2ef8d3e4f85..81f2f228dd9c8b6f8870456e8175d62c1c863db7 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
#include <private/bionic_asm.h>
#define FUTEX_WAIT 0
index b70c078e7668cae99ce6e002b06d175f3d99d004..1c58c1b490128213de178ee11e0de06ab6a71649 100644 (file)
*/
.text
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* u4 __memcmp16(const u2* s0, const u2* s1, size_t count);
index 7c21195b6be8e5f8a46853dadf09fe0dfe4d98e8..2af1fbdce39b84a6222c1056448979513af56519 100644 (file)
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
NON_LEAF(setjmp, FRAMESZ, ra)
.mask 0x80000000, RAOFF
PTR_SUBU sp, FRAMESZ # allocate stack frame
lw a0, A0OFF(sp)
lw a1, A1OFF(sp)
- .set noreorder
+ .set noreorder
REG_L v0, SC_REGS+ZERO*REGSZ(a0)
bne v0, 0xACEDBADE, botch # jump if error
REG_L ra, SC_PC(a0)
REG_L s8, SC_REGS+S8*REGSZ(a0)
REG_L gp, SC_REGS+GP*REGSZ(a0)
REG_L sp, SC_REGS+SP*REGSZ(a0)
-
+
#if !defined(SOFTFLOAT)
- REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
+ REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
ctc1 v0, $31
#if _MIPS_FPSET == 32
FPREG64_L($f20, SC_FPREGS+((F20-F0)*REGSZ_FP), a0)
index b05454c284393f1e0678fe3d2dbd43310efd2ba8..9d2e5ea87e885cbee7d8bee23f28649b55579b1d 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/setjmp.h>
index 08aa7051aa6f607e8c965c7290d4cddfe530c301..c4fd00995b32f2dad4e3016c2f6930c7c8dccbf7 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32)
FRAMESZ = MKFSIZ(6,0)
index c93694586f74f0e5061d821a1c5eb73004216bdb..911a264f25cd674491121ab7b51f3822fadb1b36 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/sched.h>
// TODO: mips' uapi signal.h is missing #ifndef __ASSEMBLY__.
#if FRAMESZ!=0
PTR_SUBU sp, FRAMESZ
#endif
- SETUP_GP64(a5,vfork)
+ SETUP_GP64(a5, vfork)
LI a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
move a1, $0
move a2, $0
index eabb1bf4cd668551b27801163c7371b42c510257..5eacde3df6e5967e43cf3494925b9aef4e309207 100644 (file)
#ifndef _MIPS64_ASM_H
#define _MIPS64_ASM_H
-#include <machine/regdef.h>
-
-#ifdef NEED_OLD_RM7KFIX
-#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;
-#else
-#define ITLBNOPFIX nop;nop;nop;nop
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 4
#endif
+#undef __bionic_asm_custom_entry
+#undef __bionic_asm_custom_end
+#define __bionic_asm_custom_entry(f) .ent f
+#define __bionic_asm_custom_end(f) .end f
+
+#include <machine/regdef.h>
+
#define _MIPS_ISA_MIPS1 1 /* R2000/R3000 */
#define _MIPS_ISA_MIPS2 2 /* R4000/R6000 */
#define _MIPS_ISA_MIPS3 3 /* R4000 */
#define _MIPS_ISA_MIPS4 4 /* TFP (R1x000) */
-#ifdef __linux__
#define _MIPS_ISA_MIPS5 5
#define _MIPS_ISA_MIPS32 6
#define _MIPS_ISA_MIPS64 7
-#else
-#define _MIPS_ISA_MIPS32 32 /* MIPS32 */
-#endif
#if !defined(ABICALLS) && !defined(_NO_ABICALLS)
#define ABICALLS .abicalls
ABICALLS
#endif
-#define _C_LABEL(x) x /* XXX Obsolete but keep for a while */
-
#if !defined(__MIPSEL__) && !defined(__MIPSEB__)
#error "__MIPSEL__ or __MIPSEB__ must be defined"
#endif
*/
#if defined(ABICALLS) && !defined(_KERNEL) && !defined(_STANDALONE)
-#ifndef _MIPS_SIM
-#define _MIPS_SIM 1
-#define _ABIO32 1
-#endif
-#ifndef _MIPS_ISA
-#define _MIPS_ISA 2
-#define _MIPS_ISA_MIPS2 2
-#endif
-
#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32)
#define NARGSAVE 4
#define PTR_VAL .dword
#endif
-/*
- * Define -pg profile entry code.
- */
-#if defined(XGPROF) || defined(XPROF)
-#define MCOUNT \
- PTR_SUBU sp, sp, 64; \
- SAVE_GP(16); \
- sd ra, 56(sp); \
- sd gp, 48(sp); \
- .set noat; \
- .set noreorder; \
- move AT, ra; \
- jal _mcount; \
- PTR_SUBU sp, sp, 16; \
- ld ra, 56(sp); \
- PTR_ADDU sp, sp, 64; \
- .set reorder; \
- .set at;
-#else
-#define MCOUNT
-#endif
-
/*
* LEAF(x, fsize)
*
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, ra; \
SETUP_GP \
- MCOUNT
-
-#define ALEAF(x) \
- .globl x; \
-x:
-
-/*
- * NLEAF(x)
- *
- * Declare a non-profiled leaf routine.
- */
-#define NLEAF(x, fsize) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, ra; \
- SETUP_GP
/*
* NON_LEAF(x)
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, retpc; \
SETUP_GP \
- MCOUNT
-
-/*
- * NNON_LEAF(x)
- *
- * Declare a non-profiled non-leaf routine
- * (a routine that makes other C calls).
- */
-#define NNON_LEAF(x, fsize, retpc) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, retpc \
- SETUP_GP
-
-/*
- * END(x)
- *
- * Mark end of a procedure.
- */
-#define END(x) \
- .end x
-
-/*
- * Macros to panic and printf from assembly language.
- */
-#define PANIC(msg) \
- LA a0, 9f; \
- jal panic; \
- nop ; \
- MSG(msg)
-
-#define PRINTF(msg) \
- LA a0, 9f; \
- jal printf; \
- nop ; \
- MSG(msg)
-
-#define MSG(msg) \
- .rdata; \
-9: .asciiz msg; \
- .text
-
-#define ASMSTR(str) \
- .asciiz str; \
- .align 3
#endif /* !_MIPS_ASM_H */
index f02ec0d2260e21a7a9cf0d94b0eb9ca368d1a6e2..b31715ccee437cd59a2c449c96d9325c1c995285 100644 (file)
#ifndef _MIPS_SIGNAL_H_
#define _MIPS_SIGNAL_H_
-#include <machine/asm.h>
-
#define SC_REGMASK (0*REGSZ)
#define SC_STATUS (1*REGSZ)
#define SC_PC (2*REGSZ)
index 6977d6ad2fbb79deeebaef660448a9262a2aa936..11ceb40b35830cf983b059ea7deef92cc5c1bf7e 100644 (file)
libc_bionic_src_files_mips64 += bionic/memset.c
libc_bionic_src_files_mips64 += string/strlen.c
-libc_arch_static_src_files_mips64 :=
-libc_arch_dynamic_src_files_mips64 :=
-
-##########################################
-# crt-related
libc_crt_target_cflags_mips64 := \
$($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
- -I$(LOCAL_PATH)/arch-mips/include
+ -I$(LOCAL_PATH)/arch-mips64/include
libc_crt_target_crtbegin_file_mips64 := \
- $(LOCAL_PATH)/arch-mips/bionic/crtbegin.c
+ $(LOCAL_PATH)/arch-mips64/bionic/crtbegin.c
libc_crt_target_crtbegin_so_file_mips64 := \
$(LOCAL_PATH)/arch-common/bionic/crtbegin_so.c
index aabdfcfdce6e95d768636c22572856fcab1f9d8c..dc91096bd52ee7bb027110fdde904400285e8b3b 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define LWHI lwl /* high part is left in big-endian */
# define SWHI swl /* high part is left in big-endian */
index a1c5055c4c111aa073973b66802ef02917897251..3e630caf88f5d50b7cb30e8df20a2b9b5b1e92b3 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define SWHI swl /* high part is left in big-endian */
sw a1,-36(a0)
nop
nop # the extra nop instructions help to balance
- nop # cycles needed for "store" + "fill" + "evict"
+ nop # cycles needed for "store" + "fill" + "evict"
nop # For 64byte store there are needed 8 fill
nop # and 8 evict cycles, i.e. at least 32 instr.
nop
/************************************************************************
* Implementation : Static functions
************************************************************************/
-
index 1e3939a76475d1125e19f3556f426eec2616c440..99a108ac960f15f627630c03625836d6419c7b89 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __brk
- .align 4
- .ent __brk
+#include <private/bionic_asm.h>
-__brk:
+ENTRY(__brk)
.set push
.set noreorder
li v0, __NR_brk
j t9
move ra, t0
.set pop
- .end __brk
-.hidden _C_LABEL(__brk)
+END(__brk)
+.hidden __brk
index 6167f4802685333a40878151612c2c751bb77a8b..fc3867afbbc83700528a61ca99f57099cb8c40b2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __epoll_pwait
- .align 4
- .ent __epoll_pwait
+#include <private/bionic_asm.h>
-__epoll_pwait:
+ENTRY(__epoll_pwait)
.set push
.set noreorder
li v0, __NR_epoll_pwait
j t9
move ra, t0
.set pop
- .end __epoll_pwait
-.hidden _C_LABEL(__epoll_pwait)
+END(__epoll_pwait)
+.hidden __epoll_pwait
index 0297a68deb27d8e088967e4d646da36342d68a3a..dac53b9f57dd2ba77d1a46436749311ba21ec817 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __exit
- .align 4
- .ent __exit
+#include <private/bionic_asm.h>
-__exit:
+ENTRY(__exit)
.set push
.set noreorder
li v0, __NR_exit
j t9
move ra, t0
.set pop
- .end __exit
-.hidden _C_LABEL(__exit)
+END(__exit)
+.hidden __exit
index d20369e8952d82f628c5ccf2a51d98bddb8a0aea..9c08710be7a5e7124bb4a5d43dbfde69bceb34b0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __getcpu
- .align 4
- .ent __getcpu
+#include <private/bionic_asm.h>
-__getcpu:
+ENTRY(__getcpu)
.set push
.set noreorder
li v0, __NR_getcpu
j t9
move ra, t0
.set pop
- .end __getcpu
-.hidden _C_LABEL(__getcpu)
+END(__getcpu)
+.hidden __getcpu
index 47a32dfa4bc320f9848060579b837cade903e9ae..79fbca35f17416cd31b1feb139ba27133f7f0556 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __getcwd
- .align 4
- .ent __getcwd
+#include <private/bionic_asm.h>
-__getcwd:
+ENTRY(__getcwd)
.set push
.set noreorder
li v0, __NR_getcwd
j t9
move ra, t0
.set pop
- .end __getcwd
-.hidden _C_LABEL(__getcwd)
+END(__getcwd)
+.hidden __getcwd
index 3b89c8ca16b111eb175450ab9504b6f7bb18f7df..0a70a720ed5ca40f23c146b5c72478dab77fbee1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __getdents
- .align 4
- .ent __getdents
+#include <private/bionic_asm.h>
-__getdents:
+ENTRY(__getdents)
.set push
.set noreorder
li v0, __NR_getdents
j t9
move ra, t0
.set pop
- .end __getdents
-.hidden _C_LABEL(__getdents)
+END(__getdents)
+.hidden __getdents
index eac06aa5408185d0aacfe9f804482c75bc403a2f..6df556a2124a164cbddfd5f7d99e8d436ab0564c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __getdents64
- .align 4
- .ent __getdents64
+#include <private/bionic_asm.h>
-__getdents64:
+ENTRY(__getdents64)
.set push
.set noreorder
li v0, __NR_getdents64
j t9
move ra, t0
.set pop
- .end __getdents64
-.hidden _C_LABEL(__getdents64)
+END(__getdents64)
+.hidden __getdents64
index e3cd90ed6f6b729e253d2b0dc41453b77171c859..6ca2e1f3a1d35b9b201ee0889d2dfe7a79163d36 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __getpriority
- .align 4
- .ent __getpriority
+#include <private/bionic_asm.h>
-__getpriority:
+ENTRY(__getpriority)
.set push
.set noreorder
li v0, __NR_getpriority
j t9
move ra, t0
.set pop
- .end __getpriority
-.hidden _C_LABEL(__getpriority)
+END(__getpriority)
+.hidden __getpriority
index c3bd575ebe74f671e1787e13b901fcb259a78d3e..013ce1836e93425e65ddbe74b1d07921c34fe106 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __ioctl
- .align 4
- .ent __ioctl
+#include <private/bionic_asm.h>
-__ioctl:
+ENTRY(__ioctl)
.set push
.set noreorder
li v0, __NR_ioctl
j t9
move ra, t0
.set pop
- .end __ioctl
-.hidden _C_LABEL(__ioctl)
+END(__ioctl)
+.hidden __ioctl
index 0f1445415ef54a416e9895564ba2dbc78ef330eb..1d46ef68a792633ae496eae3dfd679f2be63eb82 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __openat
- .align 4
- .ent __openat
+#include <private/bionic_asm.h>
-__openat:
+ENTRY(__openat)
.set push
.set noreorder
li v0, __NR_openat
j t9
move ra, t0
.set pop
- .end __openat
-.hidden _C_LABEL(__openat)
+END(__openat)
+.hidden __openat
index ac7acb921db77e1782135b5e7914f65d99ba36f3..fb0e19a9967a18356e855f93d0fe7cb985e59721 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __ppoll
- .align 4
- .ent __ppoll
+#include <private/bionic_asm.h>
-__ppoll:
+ENTRY(__ppoll)
.set push
.set noreorder
li v0, __NR_ppoll
j t9
move ra, t0
.set pop
- .end __ppoll
-.hidden _C_LABEL(__ppoll)
+END(__ppoll)
+.hidden __ppoll
index 1e5ac2fdb594ab7effb9c793dc8c2127bdc27cea..3055b31a057bf8d089a8dfac0bd5e1d1a6f1aae9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __pselect6
- .align 4
- .ent __pselect6
+#include <private/bionic_asm.h>
-__pselect6:
+ENTRY(__pselect6)
.set push
.set noreorder
li v0, __NR_pselect6
j t9
move ra, t0
.set pop
- .end __pselect6
-.hidden _C_LABEL(__pselect6)
+END(__pselect6)
+.hidden __pselect6
index 79b75b25cd9811e73818ad451711ed1a3b9bfb1d..bae77334d79b89e9e37be3c1cbb5568f4cd75ee0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __ptrace
- .align 4
- .ent __ptrace
+#include <private/bionic_asm.h>
-__ptrace:
+ENTRY(__ptrace)
.set push
.set noreorder
li v0, __NR_ptrace
j t9
move ra, t0
.set pop
- .end __ptrace
-.hidden _C_LABEL(__ptrace)
+END(__ptrace)
+.hidden __ptrace
index 31ae824d05542cda93baaa9391f5b7afad5ccfe9..31a97e36aa3ccc8261cfc2c127de52bd4e41baa3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __reboot
- .align 4
- .ent __reboot
+#include <private/bionic_asm.h>
-__reboot:
+ENTRY(__reboot)
.set push
.set noreorder
li v0, __NR_reboot
j t9
move ra, t0
.set pop
- .end __reboot
-.hidden _C_LABEL(__reboot)
+END(__reboot)
+.hidden __reboot
diff --git a/libc/arch-mips64/syscalls/__rt_sigaction.S b/libc/arch-mips64/syscalls/__rt_sigaction.S
index ef537a455317bc04451935cb016efedda00f654e..3728c5870ab0bb36d0536de45537e53d67cf4705 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __rt_sigaction
- .align 4
- .ent __rt_sigaction
+#include <private/bionic_asm.h>
-__rt_sigaction:
+ENTRY(__rt_sigaction)
.set push
.set noreorder
li v0, __NR_rt_sigaction
j t9
move ra, t0
.set pop
- .end __rt_sigaction
-.hidden _C_LABEL(__rt_sigaction)
+END(__rt_sigaction)
+.hidden __rt_sigaction
diff --git a/libc/arch-mips64/syscalls/__rt_sigpending.S b/libc/arch-mips64/syscalls/__rt_sigpending.S
index 2dc1bf6e7523355f597309a4d4418f474785f8df..e0d40ccaf1d8e3776b865480f10cca8ce4ea2419 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __rt_sigpending
- .align 4
- .ent __rt_sigpending
+#include <private/bionic_asm.h>
-__rt_sigpending:
+ENTRY(__rt_sigpending)
.set push
.set noreorder
li v0, __NR_rt_sigpending
j t9
move ra, t0
.set pop
- .end __rt_sigpending
-.hidden _C_LABEL(__rt_sigpending)
+END(__rt_sigpending)
+.hidden __rt_sigpending
diff --git a/libc/arch-mips64/syscalls/__rt_sigprocmask.S b/libc/arch-mips64/syscalls/__rt_sigprocmask.S
index 2814d6666c3eebf1a8099ae1328251d30577a23c..d34a34b61e64185a828fd09df3e82488baaefa77 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __rt_sigprocmask
- .align 4
- .ent __rt_sigprocmask
+#include <private/bionic_asm.h>
-__rt_sigprocmask:
+ENTRY(__rt_sigprocmask)
.set push
.set noreorder
li v0, __NR_rt_sigprocmask
j t9
move ra, t0
.set pop
- .end __rt_sigprocmask
-.hidden _C_LABEL(__rt_sigprocmask)
+END(__rt_sigprocmask)
+.hidden __rt_sigprocmask
diff --git a/libc/arch-mips64/syscalls/__rt_sigsuspend.S b/libc/arch-mips64/syscalls/__rt_sigsuspend.S
index 83c19906118d249be7539c84a0a1d7b621400308..f36e1c339cf6ed6238744008413d746e65ab6a54 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __rt_sigsuspend
- .align 4
- .ent __rt_sigsuspend
+#include <private/bionic_asm.h>
-__rt_sigsuspend:
+ENTRY(__rt_sigsuspend)
.set push
.set noreorder
li v0, __NR_rt_sigsuspend
j t9
move ra, t0
.set pop
- .end __rt_sigsuspend
-.hidden _C_LABEL(__rt_sigsuspend)
+END(__rt_sigsuspend)
+.hidden __rt_sigsuspend
diff --git a/libc/arch-mips64/syscalls/__rt_sigtimedwait.S b/libc/arch-mips64/syscalls/__rt_sigtimedwait.S
index 48daea83e60f6c4dbe0dcf7f9ecfeaf42e065a14..798d6f85e0a85c488a6cbfd7ba91428e8610d578 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __rt_sigtimedwait
- .align 4
- .ent __rt_sigtimedwait
+#include <private/bionic_asm.h>
-__rt_sigtimedwait:
+ENTRY(__rt_sigtimedwait)
.set push
.set noreorder
li v0, __NR_rt_sigtimedwait
j t9
move ra, t0
.set pop
- .end __rt_sigtimedwait
-.hidden _C_LABEL(__rt_sigtimedwait)
+END(__rt_sigtimedwait)
+.hidden __rt_sigtimedwait
diff --git a/libc/arch-mips64/syscalls/__sched_getaffinity.S b/libc/arch-mips64/syscalls/__sched_getaffinity.S
index 006e395ba07a7f5d8a7ed9084b59db3170b7c778..a28781575931fe8c2978b1d508a674369ce57a56 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __sched_getaffinity
- .align 4
- .ent __sched_getaffinity
+#include <private/bionic_asm.h>
-__sched_getaffinity:
+ENTRY(__sched_getaffinity)
.set push
.set noreorder
li v0, __NR_sched_getaffinity
j t9
move ra, t0
.set pop
- .end __sched_getaffinity
-.hidden _C_LABEL(__sched_getaffinity)
+END(__sched_getaffinity)
+.hidden __sched_getaffinity
diff --git a/libc/arch-mips64/syscalls/__set_thread_area.S b/libc/arch-mips64/syscalls/__set_thread_area.S
index 009d004b326829b5a2150be447fb072c299d2fe8..c28ee4a8489949a34e7bad3c2cc42c8bf912c216 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __set_thread_area
- .align 4
- .ent __set_thread_area
+#include <private/bionic_asm.h>
-__set_thread_area:
+ENTRY(__set_thread_area)
.set push
.set noreorder
li v0, __NR_set_thread_area
j t9
move ra, t0
.set pop
- .end __set_thread_area
-.hidden _C_LABEL(__set_thread_area)
+END(__set_thread_area)
+.hidden __set_thread_area
diff --git a/libc/arch-mips64/syscalls/__set_tid_address.S b/libc/arch-mips64/syscalls/__set_tid_address.S
index 4c1f97d2ba824a2e4ce343e871890f61ca182e9a..8757001e1f5a39ff26f47ee9aa371e02a613f92e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __set_tid_address
- .align 4
- .ent __set_tid_address
+#include <private/bionic_asm.h>
-__set_tid_address:
+ENTRY(__set_tid_address)
.set push
.set noreorder
li v0, __NR_set_tid_address
j t9
move ra, t0
.set pop
- .end __set_tid_address
-.hidden _C_LABEL(__set_tid_address)
+END(__set_tid_address)
+.hidden __set_tid_address
index 22914016f665b6c0d9f76b669de8c1d8e1526ab2..70eed3a33589a9fe8dc7e5eea012e6091ebf836f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __syslog
- .align 4
- .ent __syslog
+#include <private/bionic_asm.h>
-__syslog:
+ENTRY(__syslog)
.set push
.set noreorder
li v0, __NR_syslog
j t9
move ra, t0
.set pop
- .end __syslog
-.hidden _C_LABEL(__syslog)
+END(__syslog)
+.hidden __syslog
diff --git a/libc/arch-mips64/syscalls/__timer_create.S b/libc/arch-mips64/syscalls/__timer_create.S
index aa024b7bf1e565bdd5d260a490e36ea2f760e73a..5a4daac14b7e3fd39a1954277d8503fb36f0faef 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __timer_create
- .align 4
- .ent __timer_create
+#include <private/bionic_asm.h>
-__timer_create:
+ENTRY(__timer_create)
.set push
.set noreorder
li v0, __NR_timer_create
j t9
move ra, t0
.set pop
- .end __timer_create
-.hidden _C_LABEL(__timer_create)
+END(__timer_create)
+.hidden __timer_create
diff --git a/libc/arch-mips64/syscalls/__timer_delete.S b/libc/arch-mips64/syscalls/__timer_delete.S
index 024f0c46cd53866e0b428eb92fed1d60d4b12fa6..8bbbdb78ae826f20d85ff0068a04e929bd5c6fe5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __timer_delete
- .align 4
- .ent __timer_delete
+#include <private/bionic_asm.h>
-__timer_delete:
+ENTRY(__timer_delete)
.set push
.set noreorder
li v0, __NR_timer_delete
j t9
move ra, t0
.set pop
- .end __timer_delete
-.hidden _C_LABEL(__timer_delete)
+END(__timer_delete)
+.hidden __timer_delete
diff --git a/libc/arch-mips64/syscalls/__timer_getoverrun.S b/libc/arch-mips64/syscalls/__timer_getoverrun.S
index 0931111a8df8627fbc7ec40d2dae3a827436f5fb..3bf06ccb4507247c479db1bf3459b3d5c73e38c1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __timer_getoverrun
- .align 4
- .ent __timer_getoverrun
+#include <private/bionic_asm.h>
-__timer_getoverrun:
+ENTRY(__timer_getoverrun)
.set push
.set noreorder
li v0, __NR_timer_getoverrun
j t9
move ra, t0
.set pop
- .end __timer_getoverrun
-.hidden _C_LABEL(__timer_getoverrun)
+END(__timer_getoverrun)
+.hidden __timer_getoverrun
diff --git a/libc/arch-mips64/syscalls/__timer_gettime.S b/libc/arch-mips64/syscalls/__timer_gettime.S
index 4eb5f71dd181fabc4660723b0a08b7613b439072..a15ec1770c7196500c289608fa7954fe5e83085a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __timer_gettime
- .align 4
- .ent __timer_gettime
+#include <private/bionic_asm.h>
-__timer_gettime:
+ENTRY(__timer_gettime)
.set push
.set noreorder
li v0, __NR_timer_gettime
j t9
move ra, t0
.set pop
- .end __timer_gettime
-.hidden _C_LABEL(__timer_gettime)
+END(__timer_gettime)
+.hidden __timer_gettime
diff --git a/libc/arch-mips64/syscalls/__timer_settime.S b/libc/arch-mips64/syscalls/__timer_settime.S
index ecac0c5e6345cbf44e841a69d43b3c3206c3b514..10e2ca8c48cedfd0c4f4c52c6883f04036832f4e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __timer_settime
- .align 4
- .ent __timer_settime
+#include <private/bionic_asm.h>
-__timer_settime:
+ENTRY(__timer_settime)
.set push
.set noreorder
li v0, __NR_timer_settime
j t9
move ra, t0
.set pop
- .end __timer_settime
-.hidden _C_LABEL(__timer_settime)
+END(__timer_settime)
+.hidden __timer_settime
index caba21ef4e5b9242b839896f354a7519d1f5ef3a..4d971e617340461c062dee300968265aaf7adf3e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl __waitid
- .align 4
- .ent __waitid
+#include <private/bionic_asm.h>
-__waitid:
+ENTRY(__waitid)
.set push
.set noreorder
li v0, __NR_waitid
j t9
move ra, t0
.set pop
- .end __waitid
-.hidden _C_LABEL(__waitid)
+END(__waitid)
+.hidden __waitid
index 87aff94af0e479d40f0f98b36a7869a4760192a9..9b108a65b9c116a526fe1909c1fddb3f75bc9213 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl _exit
- .align 4
- .ent _exit
+#include <private/bionic_asm.h>
-_exit:
+ENTRY(_exit)
.set push
.set noreorder
li v0, __NR_exit_group
j t9
move ra, t0
.set pop
- .end _exit
+END(_exit)
index c2f8cd63b4aa39d36f6f207663cafd5fead6cf91..132fd4e40ae78782c7f2edbea6418383b6c23feb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl _flush_cache
- .align 4
- .ent _flush_cache
+#include <private/bionic_asm.h>
-_flush_cache:
+ENTRY(_flush_cache)
.set push
.set noreorder
li v0, __NR_cacheflush
j t9
move ra, t0
.set pop
- .end _flush_cache
+END(_flush_cache)
index dc9ac59eee7f7f6f4da846cdce9866c3cccca550..6c3855698b62162550b74fa622b40368ff356f75 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl accept
- .align 4
- .ent accept
+#include <private/bionic_asm.h>
-accept:
+ENTRY(accept)
.set push
.set noreorder
li v0, __NR_accept
j t9
move ra, t0
.set pop
- .end accept
+END(accept)
index 0b238665c60517361d1bb1bdab737c2587393ef7..718587756340181d6ece77dfb5811e7d59abf486 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl acct
- .align 4
- .ent acct
+#include <private/bionic_asm.h>
-acct:
+ENTRY(acct)
.set push
.set noreorder
li v0, __NR_acct
j t9
move ra, t0
.set pop
- .end acct
+END(acct)
index da81dad55f858966c645ea1196c9f5b8375ce597..cb28bb45d5cf44814bc88b77f306bd979d5665be 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl bind
- .align 4
- .ent bind
+#include <private/bionic_asm.h>
-bind:
+ENTRY(bind)
.set push
.set noreorder
li v0, __NR_bind
j t9
move ra, t0
.set pop
- .end bind
+END(bind)
index 26d74b119d45148f353c73679436f50ac40dd265..068e076ebdf6aa27cd7ab3a9686e650ce02bb1a1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl capget
- .align 4
- .ent capget
+#include <private/bionic_asm.h>
-capget:
+ENTRY(capget)
.set push
.set noreorder
li v0, __NR_capget
j t9
move ra, t0
.set pop
- .end capget
+END(capget)
index b4b87de6f01b89c99be60f7d1bc1c5998de2883e..f29501bbdb2aa456b475af85b191ec7069f8cdfe 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl capset
- .align 4
- .ent capset
+#include <private/bionic_asm.h>
-capset:
+ENTRY(capset)
.set push
.set noreorder
li v0, __NR_capset
j t9
move ra, t0
.set pop
- .end capset
+END(capset)
index af3546ab9aaa0b4fbff408f8f4cc9b9641eff23a..c2753bd3248c606850d08ba523f018f153e4d2b4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl chdir
- .align 4
- .ent chdir
+#include <private/bionic_asm.h>
-chdir:
+ENTRY(chdir)
.set push
.set noreorder
li v0, __NR_chdir
j t9
move ra, t0
.set pop
- .end chdir
+END(chdir)
index b992774c3f8f13c3900b77494df82539e0c6eb8f..ca1d4a8dd83230fe3d6e6dc459cd67b1974c91a2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl chroot
- .align 4
- .ent chroot
+#include <private/bionic_asm.h>
-chroot:
+ENTRY(chroot)
.set push
.set noreorder
li v0, __NR_chroot
j t9
move ra, t0
.set pop
- .end chroot
+END(chroot)
index f277ab19512e596809cf905c14a1860264b12c25..e7a8dd3f0dcf0206516c3adcfc3438223ebfe40c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl clock_getres
- .align 4
- .ent clock_getres
+#include <private/bionic_asm.h>
-clock_getres:
+ENTRY(clock_getres)
.set push
.set noreorder
li v0, __NR_clock_getres
j t9
move ra, t0
.set pop
- .end clock_getres
+END(clock_getres)
index 8200e757d0e8c23222955adddde1fe9a4aa5e40e..4c92a38dc546e60810b81aac4c4a642098384e57 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl clock_gettime
- .align 4
- .ent clock_gettime
+#include <private/bionic_asm.h>
-clock_gettime:
+ENTRY(clock_gettime)
.set push
.set noreorder
li v0, __NR_clock_gettime
j t9
move ra, t0
.set pop
- .end clock_gettime
+END(clock_gettime)
diff --git a/libc/arch-mips64/syscalls/clock_nanosleep.S b/libc/arch-mips64/syscalls/clock_nanosleep.S
index 9ac95fc5aff42f3d31bb57cc0fbdc8428a714117..29345911c323769aaf753943a1534788f6d64749 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl clock_nanosleep
- .align 4
- .ent clock_nanosleep
+#include <private/bionic_asm.h>
-clock_nanosleep:
+ENTRY(clock_nanosleep)
.set push
.set noreorder
li v0, __NR_clock_nanosleep
j t9
move ra, t0
.set pop
- .end clock_nanosleep
+END(clock_nanosleep)
index a8cd723b36edd10b29c9713e6d9f53bd36b340aa..1969cb69aa2acf3ff7e5d726b3f85bcdef52edfe 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl clock_settime
- .align 4
- .ent clock_settime
+#include <private/bionic_asm.h>
-clock_settime:
+ENTRY(clock_settime)
.set push
.set noreorder
li v0, __NR_clock_settime
j t9
move ra, t0
.set pop
- .end clock_settime
+END(clock_settime)
index cfe5c5135df7340ce95d83091e6c9e95acaaf43d..f446000606896ae366b33a0589a46b4e1c43047c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl close
- .align 4
- .ent close
+#include <private/bionic_asm.h>
-close:
+ENTRY(close)
.set push
.set noreorder
li v0, __NR_close
j t9
move ra, t0
.set pop
- .end close
+END(close)
index 80600bb1796b50118397f7fad457c30bf70088b5..8fe2d56c19fceee92eec5bc9545e318c0d857a58 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl connect
- .align 4
- .ent connect
+#include <private/bionic_asm.h>
-connect:
+ENTRY(connect)
.set push
.set noreorder
li v0, __NR_connect
j t9
move ra, t0
.set pop
- .end connect
+END(connect)
index cf2579df54775fb439c37199d8f009726dee22d0..d24adf8754dfa04728f62f655b1acf82f4d3fb2c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl delete_module
- .align 4
- .ent delete_module
+#include <private/bionic_asm.h>
-delete_module:
+ENTRY(delete_module)
.set push
.set noreorder
li v0, __NR_delete_module
j t9
move ra, t0
.set pop
- .end delete_module
+END(delete_module)
index 0a92e572c968d9f7921fb04d5054fd51abdf4095..5d2d7defa7ec3e7ea1c31446fe1766d679105eaa 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl dup
- .align 4
- .ent dup
+#include <private/bionic_asm.h>
-dup:
+ENTRY(dup)
.set push
.set noreorder
li v0, __NR_dup
j t9
move ra, t0
.set pop
- .end dup
+END(dup)
index e9fba1ec88920ae6cf6440e375019c19b3ce362c..90f0f89c6eb1ae032f36cd37ff0d0fa6807c0e59 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl dup3
- .align 4
- .ent dup3
+#include <private/bionic_asm.h>
-dup3:
+ENTRY(dup3)
.set push
.set noreorder
li v0, __NR_dup3
j t9
move ra, t0
.set pop
- .end dup3
+END(dup3)
index 9c41868d5b98fc5a3a6ab98286b04904d72a6e4d..312887f6155e60fc73fc763734c3638f82054820 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl epoll_create1
- .align 4
- .ent epoll_create1
+#include <private/bionic_asm.h>
-epoll_create1:
+ENTRY(epoll_create1)
.set push
.set noreorder
li v0, __NR_epoll_create1
j t9
move ra, t0
.set pop
- .end epoll_create1
+END(epoll_create1)
index 5f18979b0c59d6a1bf83bdaebb5b2f869f0221a6..461ad7be3405b69c5a43f881b0e54c17ca866ea4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl epoll_ctl
- .align 4
- .ent epoll_ctl
+#include <private/bionic_asm.h>
-epoll_ctl:
+ENTRY(epoll_ctl)
.set push
.set noreorder
li v0, __NR_epoll_ctl
j t9
move ra, t0
.set pop
- .end epoll_ctl
+END(epoll_ctl)
index 9cb87ca2b33aaa7080de1b0d2071b6a9bc4d2e91..da8866ee57e112d7798db5593ee1ab9a17478385 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl eventfd
- .align 4
- .ent eventfd
+#include <private/bionic_asm.h>
-eventfd:
+ENTRY(eventfd)
.set push
.set noreorder
li v0, __NR_eventfd2
j t9
move ra, t0
.set pop
- .end eventfd
+END(eventfd)
index 8edfc343570d0da042ad9fd551f6ff7778e3ba69..3cb49b68ee46bf9d81b59e4cf41456cbff0a0806 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl execve
- .align 4
- .ent execve
+#include <private/bionic_asm.h>
-execve:
+ENTRY(execve)
.set push
.set noreorder
li v0, __NR_execve
j t9
move ra, t0
.set pop
- .end execve
+END(execve)
index 14de073471887ebbc4df84b7b0a9b090afbbe4be..d06f4204656100907c86b604f57f7e5a8a0adb4b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl faccessat
- .align 4
- .ent faccessat
+#include <private/bionic_asm.h>
-faccessat:
+ENTRY(faccessat)
.set push
.set noreorder
li v0, __NR_faccessat
j t9
move ra, t0
.set pop
- .end faccessat
+END(faccessat)
index 347ab1f59b3c6162a8a962e38504ea7f9de46b68..d1e64b53fb718758f613c550dbf74b2a590df50d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fallocate
- .align 4
- .ent fallocate
+#include <private/bionic_asm.h>
-fallocate:
+ENTRY(fallocate)
.set push
.set noreorder
li v0, __NR_fallocate
j t9
move ra, t0
.set pop
- .end fallocate
+END(fallocate)
.globl fallocate64
.equ fallocate64, fallocate
index 1b5e7cb729d7826dec5783ee3193422580a994f9..0c8ab73d0a15bfcd978d2f2253992b43b13a320b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fchdir
- .align 4
- .ent fchdir
+#include <private/bionic_asm.h>
-fchdir:
+ENTRY(fchdir)
.set push
.set noreorder
li v0, __NR_fchdir
j t9
move ra, t0
.set pop
- .end fchdir
+END(fchdir)
index b9ce347d48da7cb9d14578ce1290c342e4fcfa77..4ebb796ac8bf04a144b0df7f205484768f0a1120 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fchmod
- .align 4
- .ent fchmod
+#include <private/bionic_asm.h>
-fchmod:
+ENTRY(fchmod)
.set push
.set noreorder
li v0, __NR_fchmod
j t9
move ra, t0
.set pop
- .end fchmod
+END(fchmod)
index f21aea7461bf56bad1152114d3f3ac61359d01f9..48873241a3b4330a542ab842507fa8524c50c4ca 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fchmodat
- .align 4
- .ent fchmodat
+#include <private/bionic_asm.h>
-fchmodat:
+ENTRY(fchmodat)
.set push
.set noreorder
li v0, __NR_fchmodat
j t9
move ra, t0
.set pop
- .end fchmodat
+END(fchmodat)
index 2eb7fa4207901e67b4ef85dedd0249efc5ae016c..c21c8313178b259928003c87a8871b989736f2f1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fchown
- .align 4
- .ent fchown
+#include <private/bionic_asm.h>
-fchown:
+ENTRY(fchown)
.set push
.set noreorder
li v0, __NR_fchown
j t9
move ra, t0
.set pop
- .end fchown
+END(fchown)
index 896ba43fe347b136d63222f11f241f8ef5f9a17a..eba230cfc317d2855a7086b3ae056ecd466534b6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fchownat
- .align 4
- .ent fchownat
+#include <private/bionic_asm.h>
-fchownat:
+ENTRY(fchownat)
.set push
.set noreorder
li v0, __NR_fchownat
j t9
move ra, t0
.set pop
- .end fchownat
+END(fchownat)
index 755361d3fa08cf46d0e5b333f1f390afff70fd3a..1f54b0e3399643e3946103671e2805792fd27124 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fcntl
- .align 4
- .ent fcntl
+#include <private/bionic_asm.h>
-fcntl:
+ENTRY(fcntl)
.set push
.set noreorder
li v0, __NR_fcntl
j t9
move ra, t0
.set pop
- .end fcntl
+END(fcntl)
index f0362487ef030d1fb351f3ba1dff2021febb5bc4..ba1eccc4716507d2bb21ae57c3ebbca8ec3e3bfc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fdatasync
- .align 4
- .ent fdatasync
+#include <private/bionic_asm.h>
-fdatasync:
+ENTRY(fdatasync)
.set push
.set noreorder
li v0, __NR_fdatasync
j t9
move ra, t0
.set pop
- .end fdatasync
+END(fdatasync)
index 0cd6ad778174c22b18efb93facb762e76e957747..5b9c8edc4470702bc0d5fa9ba589645dde3f3d33 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fgetxattr
- .align 4
- .ent fgetxattr
+#include <private/bionic_asm.h>
-fgetxattr:
+ENTRY(fgetxattr)
.set push
.set noreorder
li v0, __NR_fgetxattr
j t9
move ra, t0
.set pop
- .end fgetxattr
+END(fgetxattr)
index 2e8961bbc7647807012b840fc8a496de548bb5b6..c0bf93caeb4b4396498c716a901bebc255df2fa2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl flistxattr
- .align 4
- .ent flistxattr
+#include <private/bionic_asm.h>
-flistxattr:
+ENTRY(flistxattr)
.set push
.set noreorder
li v0, __NR_flistxattr
j t9
move ra, t0
.set pop
- .end flistxattr
+END(flistxattr)
index 93051d3b195a71a275baee93c6fddd931353bddc..b63f6fcec1d2de6518d95bc82299819d5d2988b0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl flock
- .align 4
- .ent flock
+#include <private/bionic_asm.h>
-flock:
+ENTRY(flock)
.set push
.set noreorder
li v0, __NR_flock
j t9
move ra, t0
.set pop
- .end flock
+END(flock)
index 6ef8c122c34780f73b44125cf0bf1d7b30fadc61..be20d000c2ba2b26be9eb71f52cf6743a0e4df6c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fremovexattr
- .align 4
- .ent fremovexattr
+#include <private/bionic_asm.h>
-fremovexattr:
+ENTRY(fremovexattr)
.set push
.set noreorder
li v0, __NR_fremovexattr
j t9
move ra, t0
.set pop
- .end fremovexattr
+END(fremovexattr)
index 89e0de7a316fe22e66521fae7cc8093c9deefa13..92198ceb4f344cc990a463c4a65f30e882fe4410 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fsetxattr
- .align 4
- .ent fsetxattr
+#include <private/bionic_asm.h>
-fsetxattr:
+ENTRY(fsetxattr)
.set push
.set noreorder
li v0, __NR_fsetxattr
j t9
move ra, t0
.set pop
- .end fsetxattr
+END(fsetxattr)
index aad3c21a027aba040567c70f7300a26682aa0e6b..078e3dd2679d75611fa26c3b404e15299c060620 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fstat64
- .align 4
- .ent fstat64
+#include <private/bionic_asm.h>
-fstat64:
+ENTRY(fstat64)
.set push
.set noreorder
li v0, __NR_fstat
j t9
move ra, t0
.set pop
- .end fstat64
+END(fstat64)
.globl fstat
.equ fstat, fstat64
index 828439a3a2101e9fb2d85e911219578183c55ad3..cc38de1f9a653f01b412067ecd1ff91bb966ffcf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fstatat64
- .align 4
- .ent fstatat64
+#include <private/bionic_asm.h>
-fstatat64:
+ENTRY(fstatat64)
.set push
.set noreorder
li v0, __NR_newfstatat
j t9
move ra, t0
.set pop
- .end fstatat64
+END(fstatat64)
.globl fstatat
.equ fstatat, fstatat64
index 09380b27532345a2147c9c95b852088d1ce74096..3474bc28ad7239ec04689b424bbc76e2566326e3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fstatfs64
- .align 4
- .ent fstatfs64
+#include <private/bionic_asm.h>
-fstatfs64:
+ENTRY(fstatfs64)
.set push
.set noreorder
li v0, __NR_fstatfs
j t9
move ra, t0
.set pop
- .end fstatfs64
+END(fstatfs64)
.globl fstatfs
.equ fstatfs, fstatfs64
index 08f77f06372ca995eb4b23f1c26a52dd15b77ffe..3543fef2af42a71756b83d7582744b3f9eb95c91 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl fsync
- .align 4
- .ent fsync
+#include <private/bionic_asm.h>
-fsync:
+ENTRY(fsync)
.set push
.set noreorder
li v0, __NR_fsync
j t9
move ra, t0
.set pop
- .end fsync
+END(fsync)
index 3afe26a7727e608c4ac973b3f8cb1159dc3d9702..cd97b87cacff85d02f09a4a02aa8f342bc83288a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl ftruncate
- .align 4
- .ent ftruncate
+#include <private/bionic_asm.h>
-ftruncate:
+ENTRY(ftruncate)
.set push
.set noreorder
li v0, __NR_ftruncate
j t9
move ra, t0
.set pop
- .end ftruncate
+END(ftruncate)
.globl ftruncate64
.equ ftruncate64, ftruncate
index edbacba31726d64ed81f48de90be1cd2367e8420..dc7dcc6eeef981d41ed37cc87924b61841a24091 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl futex
- .align 4
- .ent futex
+#include <private/bionic_asm.h>
-futex:
+ENTRY(futex)
.set push
.set noreorder
li v0, __NR_futex
j t9
move ra, t0
.set pop
- .end futex
+END(futex)
index d014386790cd050bb01a256b10f5ae1de4945c39..d6b3d7f93f3e826e49e3052c930c92800b9ec06f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getegid
- .align 4
- .ent getegid
+#include <private/bionic_asm.h>
-getegid:
+ENTRY(getegid)
.set push
.set noreorder
li v0, __NR_getegid
j t9
move ra, t0
.set pop
- .end getegid
+END(getegid)
index ec63f6cf65701a38f8f9477e2a5cd5bb89ae9825..a1d9713313d1453425f63659d0d238a16e0cec93 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl geteuid
- .align 4
- .ent geteuid
+#include <private/bionic_asm.h>
-geteuid:
+ENTRY(geteuid)
.set push
.set noreorder
li v0, __NR_geteuid
j t9
move ra, t0
.set pop
- .end geteuid
+END(geteuid)
index 531d3647f12b51b1dbcb423b5d7114e1f256b823..c89d709051757a9206dafc87d75a3ba3a2b0fd92 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getgid
- .align 4
- .ent getgid
+#include <private/bionic_asm.h>
-getgid:
+ENTRY(getgid)
.set push
.set noreorder
li v0, __NR_getgid
j t9
move ra, t0
.set pop
- .end getgid
+END(getgid)
index b7fcef6e1e3f901582725fe2036e439dc0995726..8d9cddb5e77a2ef1f56ec3f22c8704ce45090666 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getgroups
- .align 4
- .ent getgroups
+#include <private/bionic_asm.h>
-getgroups:
+ENTRY(getgroups)
.set push
.set noreorder
li v0, __NR_getgroups
j t9
move ra, t0
.set pop
- .end getgroups
+END(getgroups)
index 4f9bc63b24d82d233867b80388759077077cce3c..12dad03143adffbfa5c7b65c87e24298c1fed568 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getitimer
- .align 4
- .ent getitimer
+#include <private/bionic_asm.h>
-getitimer:
+ENTRY(getitimer)
.set push
.set noreorder
li v0, __NR_getitimer
j t9
move ra, t0
.set pop
- .end getitimer
+END(getitimer)
index 695fe6ae5e26997bf7e1bd240fcd82fb62f32add..278428af924813f37c30cbf4ed7b5b8f561c0c95 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getpeername
- .align 4
- .ent getpeername
+#include <private/bionic_asm.h>
-getpeername:
+ENTRY(getpeername)
.set push
.set noreorder
li v0, __NR_getpeername
j t9
move ra, t0
.set pop
- .end getpeername
+END(getpeername)
index 46787d6241f409a7e7d284ae31a9a265230860fa..56551efab5fd3dd0fb00420aa4850301075987d4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getpgid
- .align 4
- .ent getpgid
+#include <private/bionic_asm.h>
-getpgid:
+ENTRY(getpgid)
.set push
.set noreorder
li v0, __NR_getpgid
j t9
move ra, t0
.set pop
- .end getpgid
+END(getpgid)
index 4f3f58fce100773e29a3aa6875977356988e8478..3b457b532df96cb1cdc2fdee73022c36f964f3d2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getpid
- .align 4
- .ent getpid
+#include <private/bionic_asm.h>
-getpid:
+ENTRY(getpid)
.set push
.set noreorder
li v0, __NR_getpid
j t9
move ra, t0
.set pop
- .end getpid
+END(getpid)
index 0bcab0004db003bbd61efe9bbe550b46fae8348d..97066f824e73003eb2ae6ac60ae684ab4ec00707 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getppid
- .align 4
- .ent getppid
+#include <private/bionic_asm.h>
-getppid:
+ENTRY(getppid)
.set push
.set noreorder
li v0, __NR_getppid
j t9
move ra, t0
.set pop
- .end getppid
+END(getppid)
index 48e605b0ddb061ad9649e772382f0a4755188e2d..f07fc11a211cd811161a112cacf3263dbd0b134f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getresgid
- .align 4
- .ent getresgid
+#include <private/bionic_asm.h>
-getresgid:
+ENTRY(getresgid)
.set push
.set noreorder
li v0, __NR_getresgid
j t9
move ra, t0
.set pop
- .end getresgid
+END(getresgid)
index 79987d6e876288a0bab6bf0489d7208f1a3e5a36..4f1ba865291264884c9d7a88331305e2d9a7dae2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getresuid
- .align 4
- .ent getresuid
+#include <private/bionic_asm.h>
-getresuid:
+ENTRY(getresuid)
.set push
.set noreorder
li v0, __NR_getresuid
j t9
move ra, t0
.set pop
- .end getresuid
+END(getresuid)
index d19eaeb0777d4982024d7ee18d6919f0e7c02bae..f825db94c4fbb1202dcb6528373634c1a9b4bc52 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getrlimit
- .align 4
- .ent getrlimit
+#include <private/bionic_asm.h>
-getrlimit:
+ENTRY(getrlimit)
.set push
.set noreorder
li v0, __NR_getrlimit
j t9
move ra, t0
.set pop
- .end getrlimit
+END(getrlimit)
.globl getrlimit64
.equ getrlimit64, getrlimit
index dd57c382fa11155831fecfb941ea998d24fe1cc4..49f3c422793ba87f24c6c9e4b10de90e142f3182 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getrusage
- .align 4
- .ent getrusage
+#include <private/bionic_asm.h>
-getrusage:
+ENTRY(getrusage)
.set push
.set noreorder
li v0, __NR_getrusage
j t9
move ra, t0
.set pop
- .end getrusage
+END(getrusage)
index 5fb9e1b3e2bc8f5fa108b17e529a3bb14499f4d0..6fa362c915c629f6269c18f4688b915f941a6345 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getsid
- .align 4
- .ent getsid
+#include <private/bionic_asm.h>
-getsid:
+ENTRY(getsid)
.set push
.set noreorder
li v0, __NR_getsid
j t9
move ra, t0
.set pop
- .end getsid
+END(getsid)
index 44026bf5e16f5c703e88810d4b6e0f4d8da15635..5e16aff25b07a160fbd2aa012f59100ef80e69b2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getsockname
- .align 4
- .ent getsockname
+#include <private/bionic_asm.h>
-getsockname:
+ENTRY(getsockname)
.set push
.set noreorder
li v0, __NR_getsockname
j t9
move ra, t0
.set pop
- .end getsockname
+END(getsockname)
index 8493faaff13b0f24e24121258359b098228021ae..fab05b130e26c05e0e4208602f1fbad45e48beed 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getsockopt
- .align 4
- .ent getsockopt
+#include <private/bionic_asm.h>
-getsockopt:
+ENTRY(getsockopt)
.set push
.set noreorder
li v0, __NR_getsockopt
j t9
move ra, t0
.set pop
- .end getsockopt
+END(getsockopt)
index e03bb4e8dfbad4e7ff135389e7d0185452d03995..30c30c8c1769693451c78f0a04470db12b694b2b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl gettid
- .align 4
- .ent gettid
+#include <private/bionic_asm.h>
-gettid:
+ENTRY(gettid)
.set push
.set noreorder
li v0, __NR_gettid
j t9
move ra, t0
.set pop
- .end gettid
+END(gettid)
index e1e5c047dd6a6bf3097693b15d53e0cf5c7dc687..07407a49cffefa63ac271a8925516d3a6244a028 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl gettimeofday
- .align 4
- .ent gettimeofday
+#include <private/bionic_asm.h>
-gettimeofday:
+ENTRY(gettimeofday)
.set push
.set noreorder
li v0, __NR_gettimeofday
j t9
move ra, t0
.set pop
- .end gettimeofday
+END(gettimeofday)
index e48f4a62f1495e4af600b8d5966a0ce26792855a..87c16e1875d0a9a29a94bf31daa426c8e51ff0ff 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getuid
- .align 4
- .ent getuid
+#include <private/bionic_asm.h>
-getuid:
+ENTRY(getuid)
.set push
.set noreorder
li v0, __NR_getuid
j t9
move ra, t0
.set pop
- .end getuid
+END(getuid)
index b46e4d970d8981f4bd59746caf9b26f5bd995592..b42ca1ea516d1015f841617738290ac8a8ecfc06 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl getxattr
- .align 4
- .ent getxattr
+#include <private/bionic_asm.h>
-getxattr:
+ENTRY(getxattr)
.set push
.set noreorder
li v0, __NR_getxattr
j t9
move ra, t0
.set pop
- .end getxattr
+END(getxattr)
index c5b2bcf504948fc9e70fe12a29fa8d134c2cda45..90fb6b1f192522748411638e634887c8c1521b4a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl init_module
- .align 4
- .ent init_module
+#include <private/bionic_asm.h>
-init_module:
+ENTRY(init_module)
.set push
.set noreorder
li v0, __NR_init_module
j t9
move ra, t0
.set pop
- .end init_module
+END(init_module)
diff --git a/libc/arch-mips64/syscalls/inotify_add_watch.S b/libc/arch-mips64/syscalls/inotify_add_watch.S
index c4c8dbf0ccdb172e203b309c57980d2506b323a5..17db414e18bd51995388cec322e8b81fea19b220 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl inotify_add_watch
- .align 4
- .ent inotify_add_watch
+#include <private/bionic_asm.h>
-inotify_add_watch:
+ENTRY(inotify_add_watch)
.set push
.set noreorder
li v0, __NR_inotify_add_watch
j t9
move ra, t0
.set pop
- .end inotify_add_watch
+END(inotify_add_watch)
index b0c7dcc334cb1f8247508dda8b4c9ca86aa3452f..356dd2d3d5dfbeea0410e8eec8833df1dbead54b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl inotify_init1
- .align 4
- .ent inotify_init1
+#include <private/bionic_asm.h>
-inotify_init1:
+ENTRY(inotify_init1)
.set push
.set noreorder
li v0, __NR_inotify_init1
j t9
move ra, t0
.set pop
- .end inotify_init1
+END(inotify_init1)
diff --git a/libc/arch-mips64/syscalls/inotify_rm_watch.S b/libc/arch-mips64/syscalls/inotify_rm_watch.S
index 4b6078ee3d4b6617c090f2bd9e1ee071cdcd488b..4096ca383c8e8cae19204005395c3a99226e5e53 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl inotify_rm_watch
- .align 4
- .ent inotify_rm_watch
+#include <private/bionic_asm.h>
-inotify_rm_watch:
+ENTRY(inotify_rm_watch)
.set push
.set noreorder
li v0, __NR_inotify_rm_watch
j t9
move ra, t0
.set pop
- .end inotify_rm_watch
+END(inotify_rm_watch)
index ebb4375f4bda69d21fef2c21b36652b7fc485616..711890cf1465f439eefb3a9e459803bbaf497f7a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl ioprio_get
- .align 4
- .ent ioprio_get
+#include <private/bionic_asm.h>
-ioprio_get:
+ENTRY(ioprio_get)
.set push
.set noreorder
li v0, __NR_ioprio_get
j t9
move ra, t0
.set pop
- .end ioprio_get
+END(ioprio_get)
index 44daba96c0910fcca8ba6ebb4414d10d75a8dc8e..738403aedc0a88c55faf99d80e539e5718e0441a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl ioprio_set
- .align 4
- .ent ioprio_set
+#include <private/bionic_asm.h>
-ioprio_set:
+ENTRY(ioprio_set)
.set push
.set noreorder
li v0, __NR_ioprio_set
j t9
move ra, t0
.set pop
- .end ioprio_set
+END(ioprio_set)
index 2e4aa42d8430b02a5f110362c5de303bb8145373..2d8b452106e9bf944ac336d18639a5fc0b985f82 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl kill
- .align 4
- .ent kill
+#include <private/bionic_asm.h>
-kill:
+ENTRY(kill)
.set push
.set noreorder
li v0, __NR_kill
j t9
move ra, t0
.set pop
- .end kill
+END(kill)
index 1c10f95150aa79716bad0f4293782594f4e2e93d..2f9ca6a8f9cb1c1d04fe67139d143c9fb6d8173a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl klogctl
- .align 4
- .ent klogctl
+#include <private/bionic_asm.h>
-klogctl:
+ENTRY(klogctl)
.set push
.set noreorder
li v0, __NR_syslog
j t9
move ra, t0
.set pop
- .end klogctl
+END(klogctl)
index c402e8182bc9a2d15aeadd3b8504070dcff6b363..f8e57b3e81e77cee2a811f2fca37c110ac622efd 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl lgetxattr
- .align 4
- .ent lgetxattr
+#include <private/bionic_asm.h>
-lgetxattr:
+ENTRY(lgetxattr)
.set push
.set noreorder
li v0, __NR_lgetxattr
j t9
move ra, t0
.set pop
- .end lgetxattr
+END(lgetxattr)
index e734144c7f237354571ead3df2c05d490d5dcbfd..a866fa6b5caaf8749f54489b818330f9acc4095c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl linkat
- .align 4
- .ent linkat
+#include <private/bionic_asm.h>
-linkat:
+ENTRY(linkat)
.set push
.set noreorder
li v0, __NR_linkat
j t9
move ra, t0
.set pop
- .end linkat
+END(linkat)
index 93c1d524b1f5e21e7393397f953b90d240f01324..0768c72c3adb8a100f51070c825f7ae5c3014b8d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl listen
- .align 4
- .ent listen
+#include <private/bionic_asm.h>
-listen:
+ENTRY(listen)
.set push
.set noreorder
li v0, __NR_listen
j t9
move ra, t0
.set pop
- .end listen
+END(listen)
index f00402f2f132f3c1cba0b788d908dfc49d428cc0..f2c00f6e50c8a57986194ec360a9c6959f3c78b9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl listxattr
- .align 4
- .ent listxattr
+#include <private/bionic_asm.h>
-listxattr:
+ENTRY(listxattr)
.set push
.set noreorder
li v0, __NR_listxattr
j t9
move ra, t0
.set pop
- .end listxattr
+END(listxattr)
index 2628185aae4116935484ac0726927a7e66d7c1df..f324e2c1a37871ce5d90f0bfdfc213799471584d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl llistxattr
- .align 4
- .ent llistxattr
+#include <private/bionic_asm.h>
-llistxattr:
+ENTRY(llistxattr)
.set push
.set noreorder
li v0, __NR_llistxattr
j t9
move ra, t0
.set pop
- .end llistxattr
+END(llistxattr)
index ef486cbebd3b670042c121957ab267bff5f434c8..e44c9d0d9962fb3d4399fae9d318b672a67f0471 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl lremovexattr
- .align 4
- .ent lremovexattr
+#include <private/bionic_asm.h>
-lremovexattr:
+ENTRY(lremovexattr)
.set push
.set noreorder
li v0, __NR_lremovexattr
j t9
move ra, t0
.set pop
- .end lremovexattr
+END(lremovexattr)
index 4385df5f61fa514b76d687c8759904778620bef2..2858aa85789841177ef432fb4ab12110287d3cdb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl lseek
- .align 4
- .ent lseek
+#include <private/bionic_asm.h>
-lseek:
+ENTRY(lseek)
.set push
.set noreorder
li v0, __NR_lseek
j t9
move ra, t0
.set pop
- .end lseek
+END(lseek)
.globl lseek64
.equ lseek64, lseek
index 14a1aae10bf5f5ae5f7c4408fa81afac8af09704..ed1b4df037e2e49485921787c660b92a40e1e013 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl lsetxattr
- .align 4
- .ent lsetxattr
+#include <private/bionic_asm.h>
-lsetxattr:
+ENTRY(lsetxattr)
.set push
.set noreorder
li v0, __NR_lsetxattr
j t9
move ra, t0
.set pop
- .end lsetxattr
+END(lsetxattr)
index 8ca4124bd597e952e289e7d7815662f635a97f01..fe6a828d9ae092d7651d99cdba6f243ed9d7f1f5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl madvise
- .align 4
- .ent madvise
+#include <private/bionic_asm.h>
-madvise:
+ENTRY(madvise)
.set push
.set noreorder
li v0, __NR_madvise
j t9
move ra, t0
.set pop
- .end madvise
+END(madvise)
index 9dbd21c31c3aa8a7394bee472a54220278beed57..1e0b544555f5faf19d0f99ae3c5f7ce06497bccc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mincore
- .align 4
- .ent mincore
+#include <private/bionic_asm.h>
-mincore:
+ENTRY(mincore)
.set push
.set noreorder
li v0, __NR_mincore
j t9
move ra, t0
.set pop
- .end mincore
+END(mincore)
index e652b2341bfa61f018957c83985f25da03c9c7c4..b1c94e1e45f101492c797060f58e4cd387fd2a19 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mkdirat
- .align 4
- .ent mkdirat
+#include <private/bionic_asm.h>
-mkdirat:
+ENTRY(mkdirat)
.set push
.set noreorder
li v0, __NR_mkdirat
j t9
move ra, t0
.set pop
- .end mkdirat
+END(mkdirat)
index 1cedbb4ba51d235e7164a8918d8af2039329eccb..edbd3b6b4f0dcc349c0cb11e38a7baafe577c66f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mknodat
- .align 4
- .ent mknodat
+#include <private/bionic_asm.h>
-mknodat:
+ENTRY(mknodat)
.set push
.set noreorder
li v0, __NR_mknodat
j t9
move ra, t0
.set pop
- .end mknodat
+END(mknodat)
index 18ab4bad646e5e00af6c1b82c084585c189ef80a..ae599cdc4ac550de581b52c1a967773d29810c25 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mlock
- .align 4
- .ent mlock
+#include <private/bionic_asm.h>
-mlock:
+ENTRY(mlock)
.set push
.set noreorder
li v0, __NR_mlock
j t9
move ra, t0
.set pop
- .end mlock
+END(mlock)
index 50fb23cf2af3e787cf289072046d760ca07be25c..b214758e58c320a82d6113ce235bfb27e8ed0e9c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mlockall
- .align 4
- .ent mlockall
+#include <private/bionic_asm.h>
-mlockall:
+ENTRY(mlockall)
.set push
.set noreorder
li v0, __NR_mlockall
j t9
move ra, t0
.set pop
- .end mlockall
+END(mlockall)
index 682058ec14ad3277dfb53793fc7a67a2f32604cf..ba6d4fac1f707d038b3c11a69f459f3d89000500 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mmap
- .align 4
- .ent mmap
+#include <private/bionic_asm.h>
-mmap:
+ENTRY(mmap)
.set push
.set noreorder
li v0, __NR_mmap
j t9
move ra, t0
.set pop
- .end mmap
+END(mmap)
.globl mmap64
.equ mmap64, mmap
index 595585ef92dde8d76d0bdf447f0a465041696ad1..71e08a7681737fd3e1c7de9ddf55f8ffe8980a41 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mount
- .align 4
- .ent mount
+#include <private/bionic_asm.h>
-mount:
+ENTRY(mount)
.set push
.set noreorder
li v0, __NR_mount
j t9
move ra, t0
.set pop
- .end mount
+END(mount)
index 77d9207d988d327e41a156e7bc527102b886cc38..66ffa1abad8c474376c163670273512c73f1f8cf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mprotect
- .align 4
- .ent mprotect
+#include <private/bionic_asm.h>
-mprotect:
+ENTRY(mprotect)
.set push
.set noreorder
li v0, __NR_mprotect
j t9
move ra, t0
.set pop
- .end mprotect
+END(mprotect)
index 33be57f32971756396e500e96efb217b1fad7699..c73320fcd0a497637d9eee627769fbd34fd7d34f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl mremap
- .align 4
- .ent mremap
+#include <private/bionic_asm.h>
-mremap:
+ENTRY(mremap)
.set push
.set noreorder
li v0, __NR_mremap
j t9
move ra, t0
.set pop
- .end mremap
+END(mremap)
index a5e29f6fe027241e1dfb88262ecf0890b9bd31b0..a97cba8efb67d6603ea72a024d333b42fbfc858c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl msync
- .align 4
- .ent msync
+#include <private/bionic_asm.h>
-msync:
+ENTRY(msync)
.set push
.set noreorder
li v0, __NR_msync
j t9
move ra, t0
.set pop
- .end msync
+END(msync)
index 4d9000adebf5df4d8c23bd6e73ff50df7248340d..f5919ae8f090bde0d93a12c4db0b17e6378f266c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl munlock
- .align 4
- .ent munlock
+#include <private/bionic_asm.h>
-munlock:
+ENTRY(munlock)
.set push
.set noreorder
li v0, __NR_munlock
j t9
move ra, t0
.set pop
- .end munlock
+END(munlock)
index f8a1ff42e5291679478b4640d500b8ab6f40d64d..39e717c2d76569cfdd3abb03345a98e604b538ee 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl munlockall
- .align 4
- .ent munlockall
+#include <private/bionic_asm.h>
-munlockall:
+ENTRY(munlockall)
.set push
.set noreorder
li v0, __NR_munlockall
j t9
move ra, t0
.set pop
- .end munlockall
+END(munlockall)
index a7e65a7abedd83a40ce84b0f2ae62a7f8ec4cb31..c1c9b01460cb97952c20c57372b8ec9045953ca2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl munmap
- .align 4
- .ent munmap
+#include <private/bionic_asm.h>
-munmap:
+ENTRY(munmap)
.set push
.set noreorder
li v0, __NR_munmap
j t9
move ra, t0
.set pop
- .end munmap
+END(munmap)
index a3838dee261178cafd00136aa422f630b2b3219e..6bfd73e8b1163ea4fc87fefec80062cd094a356e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl nanosleep
- .align 4
- .ent nanosleep
+#include <private/bionic_asm.h>
-nanosleep:
+ENTRY(nanosleep)
.set push
.set noreorder
li v0, __NR_nanosleep
j t9
move ra, t0
.set pop
- .end nanosleep
+END(nanosleep)
diff --git a/libc/arch-mips64/syscalls/perf_event_open.S b/libc/arch-mips64/syscalls/perf_event_open.S
index 14465fbb7c6d3ef01b29e01516ca18c51b83d321..d796a1676ca48debae0510901111de48545d1bcb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl perf_event_open
- .align 4
- .ent perf_event_open
+#include <private/bionic_asm.h>
-perf_event_open:
+ENTRY(perf_event_open)
.set push
.set noreorder
li v0, __NR_perf_event_open
j t9
move ra, t0
.set pop
- .end perf_event_open
+END(perf_event_open)
index af39ee64b23a623478695d9851b4775d0b2b4f58..e2346367afb596f3c6ae60de7f133c4b52b363d3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl personality
- .align 4
- .ent personality
+#include <private/bionic_asm.h>
-personality:
+ENTRY(personality)
.set push
.set noreorder
li v0, __NR_personality
j t9
move ra, t0
.set pop
- .end personality
+END(personality)
index 4e06258a26798254893e2fa398079c90eec8b8b3..52d5baaeafb5515452585e6707cf29fedd5ac236 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl pipe2
- .align 4
- .ent pipe2
+#include <private/bionic_asm.h>
-pipe2:
+ENTRY(pipe2)
.set push
.set noreorder
li v0, __NR_pipe2
j t9
move ra, t0
.set pop
- .end pipe2
+END(pipe2)
index 122a28e1e30290b70e39998ec025bed438ec1b47..01d422eb444b486dbc4b89148dfc061d7d0602e4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl prctl
- .align 4
- .ent prctl
+#include <private/bionic_asm.h>
-prctl:
+ENTRY(prctl)
.set push
.set noreorder
li v0, __NR_prctl
j t9
move ra, t0
.set pop
- .end prctl
+END(prctl)
index a97a1d4a86a8fdabc2e453041a267f22cf62387b..5ab8389c5cfe63b39ab0c6e4b8ba1d87772b6411 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl pread64
- .align 4
- .ent pread64
+#include <private/bionic_asm.h>
-pread64:
+ENTRY(pread64)
.set push
.set noreorder
li v0, __NR_pread64
j t9
move ra, t0
.set pop
- .end pread64
+END(pread64)
.globl pread
.equ pread, pread64
index e611bd097dae907a0a5c2f301f40a75406865abf..e52ca9254749f0d02fc31ab821626cd930b9dd61 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl prlimit64
- .align 4
- .ent prlimit64
+#include <private/bionic_asm.h>
-prlimit64:
+ENTRY(prlimit64)
.set push
.set noreorder
li v0, __NR_prlimit64
j t9
move ra, t0
.set pop
- .end prlimit64
+END(prlimit64)
.globl prlimit
.equ prlimit, prlimit64
index 08af91beba0efbe4cc8bf62614372d3d63411fe7..8d7a8b5d0f5768129a9b31df84cf2606603781dd 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl pwrite64
- .align 4
- .ent pwrite64
+#include <private/bionic_asm.h>
-pwrite64:
+ENTRY(pwrite64)
.set push
.set noreorder
li v0, __NR_pwrite64
j t9
move ra, t0
.set pop
- .end pwrite64
+END(pwrite64)
.globl pwrite
.equ pwrite, pwrite64
index 4d8c51d772635e762ab642c47abd5d2a538da9c7..3f805caf1203b4443d9f91ee2f78de0644d64ac7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl read
- .align 4
- .ent read
+#include <private/bionic_asm.h>
-read:
+ENTRY(read)
.set push
.set noreorder
li v0, __NR_read
j t9
move ra, t0
.set pop
- .end read
+END(read)
index 5ab1dcb24540ee239435f1d086efa9032cd543e5..8f5c8c6a2f8ca1e994c6c03c05b044233ec271d0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl readahead
- .align 4
- .ent readahead
+#include <private/bionic_asm.h>
-readahead:
+ENTRY(readahead)
.set push
.set noreorder
li v0, __NR_readahead
j t9
move ra, t0
.set pop
- .end readahead
+END(readahead)
index 8e91dcf6dc58e70381985fd99374b8b6af16d469..1381c229ac9e034ca97f1b4c7d4eee365dce500a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl readlinkat
- .align 4
- .ent readlinkat
+#include <private/bionic_asm.h>
-readlinkat:
+ENTRY(readlinkat)
.set push
.set noreorder
li v0, __NR_readlinkat
j t9
move ra, t0
.set pop
- .end readlinkat
+END(readlinkat)
index e248942eb07ecefb4f5b45f574c0b7c47daf8e78..9c7afd5e38428c679ea129808b17e283f305c080 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl readv
- .align 4
- .ent readv
+#include <private/bionic_asm.h>
-readv:
+ENTRY(readv)
.set push
.set noreorder
li v0, __NR_readv
j t9
move ra, t0
.set pop
- .end readv
+END(readv)
index 818dc8e23aac068fd8f9a69c493c365f708b2bc3..d3911c68938bab6cd01fb6504011540959edb140 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl recvfrom
- .align 4
- .ent recvfrom
+#include <private/bionic_asm.h>
-recvfrom:
+ENTRY(recvfrom)
.set push
.set noreorder
li v0, __NR_recvfrom
j t9
move ra, t0
.set pop
- .end recvfrom
+END(recvfrom)
index 06d8826a7d34bee094a3c590fe3ac7d645c27b4b..21ec51d91a02bafebfb006ec7468ebfc013b3b5b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl recvmsg
- .align 4
- .ent recvmsg
+#include <private/bionic_asm.h>
-recvmsg:
+ENTRY(recvmsg)
.set push
.set noreorder
li v0, __NR_recvmsg
j t9
move ra, t0
.set pop
- .end recvmsg
+END(recvmsg)
index 8b0d0567feab53b1ebcbb167febe033e5829a4c7..ea3177101f1850a5eaa190a663a71255849ee3f6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl removexattr
- .align 4
- .ent removexattr
+#include <private/bionic_asm.h>
-removexattr:
+ENTRY(removexattr)
.set push
.set noreorder
li v0, __NR_removexattr
j t9
move ra, t0
.set pop
- .end removexattr
+END(removexattr)
index fdf24db6c01500551e75a5b47723f13c34949e31..074a6a4530634f0c470b5157007c11f745dc6b8f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl renameat
- .align 4
- .ent renameat
+#include <private/bionic_asm.h>
-renameat:
+ENTRY(renameat)
.set push
.set noreorder
li v0, __NR_renameat
j t9
move ra, t0
.set pop
- .end renameat
+END(renameat)
diff --git a/libc/arch-mips64/syscalls/sched_get_priority_max.S b/libc/arch-mips64/syscalls/sched_get_priority_max.S
index c84ab98b7ac3aac5b3e833a2d29e909b3ce3b23d..1b67bbfbeee808a2fd1f55e524db00ebbf7dbd2e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_get_priority_max
- .align 4
- .ent sched_get_priority_max
+#include <private/bionic_asm.h>
-sched_get_priority_max:
+ENTRY(sched_get_priority_max)
.set push
.set noreorder
li v0, __NR_sched_get_priority_max
j t9
move ra, t0
.set pop
- .end sched_get_priority_max
+END(sched_get_priority_max)
diff --git a/libc/arch-mips64/syscalls/sched_get_priority_min.S b/libc/arch-mips64/syscalls/sched_get_priority_min.S
index d9ab4ec9ff8d3d41db373dad5d739a7adca99476..2d6875260dfb01a378402f637532e54ca727f64a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_get_priority_min
- .align 4
- .ent sched_get_priority_min
+#include <private/bionic_asm.h>
-sched_get_priority_min:
+ENTRY(sched_get_priority_min)
.set push
.set noreorder
li v0, __NR_sched_get_priority_min
j t9
move ra, t0
.set pop
- .end sched_get_priority_min
+END(sched_get_priority_min)
diff --git a/libc/arch-mips64/syscalls/sched_getparam.S b/libc/arch-mips64/syscalls/sched_getparam.S
index 9f40fe4827e6e01328ed9fc46621008d5533cdb6..d0b2069026bfafac09bd8c225be512050ffd3330 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_getparam
- .align 4
- .ent sched_getparam
+#include <private/bionic_asm.h>
-sched_getparam:
+ENTRY(sched_getparam)
.set push
.set noreorder
li v0, __NR_sched_getparam
j t9
move ra, t0
.set pop
- .end sched_getparam
+END(sched_getparam)
diff --git a/libc/arch-mips64/syscalls/sched_getscheduler.S b/libc/arch-mips64/syscalls/sched_getscheduler.S
index e263f61fad31ac0f08316e6f5c4780feee8e6948..f25bde5bf6c4e97250ac8f73e11d253936468b91 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_getscheduler
- .align 4
- .ent sched_getscheduler
+#include <private/bionic_asm.h>
-sched_getscheduler:
+ENTRY(sched_getscheduler)
.set push
.set noreorder
li v0, __NR_sched_getscheduler
j t9
move ra, t0
.set pop
- .end sched_getscheduler
+END(sched_getscheduler)
diff --git a/libc/arch-mips64/syscalls/sched_rr_get_interval.S b/libc/arch-mips64/syscalls/sched_rr_get_interval.S
index a3bba2899988117e4b733fd9ae0c993537535bc9..48233f857428562593feb67c87f87964a26b276b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_rr_get_interval
- .align 4
- .ent sched_rr_get_interval
+#include <private/bionic_asm.h>
-sched_rr_get_interval:
+ENTRY(sched_rr_get_interval)
.set push
.set noreorder
li v0, __NR_sched_rr_get_interval
j t9
move ra, t0
.set pop
- .end sched_rr_get_interval
+END(sched_rr_get_interval)
diff --git a/libc/arch-mips64/syscalls/sched_setaffinity.S b/libc/arch-mips64/syscalls/sched_setaffinity.S
index 35bfb30df24c249ac003482f49b9ac0772c56797..e604863542c3a9ddd0dae76ea9bbadc4a9810c57 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_setaffinity
- .align 4
- .ent sched_setaffinity
+#include <private/bionic_asm.h>
-sched_setaffinity:
+ENTRY(sched_setaffinity)
.set push
.set noreorder
li v0, __NR_sched_setaffinity
j t9
move ra, t0
.set pop
- .end sched_setaffinity
+END(sched_setaffinity)
diff --git a/libc/arch-mips64/syscalls/sched_setparam.S b/libc/arch-mips64/syscalls/sched_setparam.S
index 714fcc9c2188ae542098b761b58578e5a47e4469..b02439f442399fe10a2c01b3e85702e1e5a34f40 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_setparam
- .align 4
- .ent sched_setparam
+#include <private/bionic_asm.h>
-sched_setparam:
+ENTRY(sched_setparam)
.set push
.set noreorder
li v0, __NR_sched_setparam
j t9
move ra, t0
.set pop
- .end sched_setparam
+END(sched_setparam)
diff --git a/libc/arch-mips64/syscalls/sched_setscheduler.S b/libc/arch-mips64/syscalls/sched_setscheduler.S
index 4fe5783e357e9d391a413cde26a13dfbb2415aa1..dda1ce51a1cda6ff91a242c18a228b0c84b2a90c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_setscheduler
- .align 4
- .ent sched_setscheduler
+#include <private/bionic_asm.h>
-sched_setscheduler:
+ENTRY(sched_setscheduler)
.set push
.set noreorder
li v0, __NR_sched_setscheduler
j t9
move ra, t0
.set pop
- .end sched_setscheduler
+END(sched_setscheduler)
index b2542a32920be87645d9dc28fc481a6e019d4679..509b029a6d353f8b4bad1e6fc95e65e23ccec056 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sched_yield
- .align 4
- .ent sched_yield
+#include <private/bionic_asm.h>
-sched_yield:
+ENTRY(sched_yield)
.set push
.set noreorder
li v0, __NR_sched_yield
j t9
move ra, t0
.set pop
- .end sched_yield
+END(sched_yield)
index bce8d58454f7b6087f955c797919bda64688b07d..684a83a47a97fe75446732c445aa34f9da1b2470 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sendfile
- .align 4
- .ent sendfile
+#include <private/bionic_asm.h>
-sendfile:
+ENTRY(sendfile)
.set push
.set noreorder
li v0, __NR_sendfile
j t9
move ra, t0
.set pop
- .end sendfile
+END(sendfile)
.globl sendfile64
.equ sendfile64, sendfile
index 72227f74c72d0c9549be33d6ac81ce6071a633b9..6983f9a0fd750e9e6d60e4bd7d8effb2412d71a5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sendmsg
- .align 4
- .ent sendmsg
+#include <private/bionic_asm.h>
-sendmsg:
+ENTRY(sendmsg)
.set push
.set noreorder
li v0, __NR_sendmsg
j t9
move ra, t0
.set pop
- .end sendmsg
+END(sendmsg)
index dbb4c56dffe3252045b06d9a4431a00d33bf3fd7..cfe774ddef5b9e5879cad2d249f5fda785e99bb7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sendto
- .align 4
- .ent sendto
+#include <private/bionic_asm.h>
-sendto:
+ENTRY(sendto)
.set push
.set noreorder
li v0, __NR_sendto
j t9
move ra, t0
.set pop
- .end sendto
+END(sendto)
index 3d9b5d49cd29b9987bc7cdf3da5bde99829e34c6..cc8d3abaea0cec1eed54f5fd2b9056a0f1754d60 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setgid
- .align 4
- .ent setgid
+#include <private/bionic_asm.h>
-setgid:
+ENTRY(setgid)
.set push
.set noreorder
li v0, __NR_setgid
j t9
move ra, t0
.set pop
- .end setgid
+END(setgid)
index c4dc713efe574bbe31bff3d460f5630cf32fa628..63f2329c73eb32f9e630eb096303b65590515e1f 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setgroups
- .align 4
- .ent setgroups
+#include <private/bionic_asm.h>
-setgroups:
+ENTRY(setgroups)
.set push
.set noreorder
li v0, __NR_setgroups
j t9
move ra, t0
.set pop
- .end setgroups
+END(setgroups)
index b1969d046e7bd2b23b0b46dd7d263d0db67d1390..9ee02dcbcc377e06ed786a16c6308bedc3a15ceb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setitimer
- .align 4
- .ent setitimer
+#include <private/bionic_asm.h>
-setitimer:
+ENTRY(setitimer)
.set push
.set noreorder
li v0, __NR_setitimer
j t9
move ra, t0
.set pop
- .end setitimer
+END(setitimer)
index 3073aad8de15327602e1dfd78cf833871d903e8a..191a1a031b11072a24eb37d87ee5329345920c52 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setns
- .align 4
- .ent setns
+#include <private/bionic_asm.h>
-setns:
+ENTRY(setns)
.set push
.set noreorder
li v0, __NR_setns
j t9
move ra, t0
.set pop
- .end setns
+END(setns)
index 171ed1727dbcdf79fc2b5df1cec6d567c717f841..89721600b11e03047fa6fd1d55ba0b406722f08e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setpgid
- .align 4
- .ent setpgid
+#include <private/bionic_asm.h>
-setpgid:
+ENTRY(setpgid)
.set push
.set noreorder
li v0, __NR_setpgid
j t9
move ra, t0
.set pop
- .end setpgid
+END(setpgid)
index a73c155a017a796f8cf8f4b84c212bd784159cb0..dce3a7652346f454c2e33b6275cf1572fbd47907 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setpriority
- .align 4
- .ent setpriority
+#include <private/bionic_asm.h>
-setpriority:
+ENTRY(setpriority)
.set push
.set noreorder
li v0, __NR_setpriority
j t9
move ra, t0
.set pop
- .end setpriority
+END(setpriority)
index 14217ba081651e1fc6950c329500f04e8788d47f..d677b322b4e7e0544dcde56248bd99171e05b7d3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setregid
- .align 4
- .ent setregid
+#include <private/bionic_asm.h>
-setregid:
+ENTRY(setregid)
.set push
.set noreorder
li v0, __NR_setregid
j t9
move ra, t0
.set pop
- .end setregid
+END(setregid)
index 9e35dded9bd051418961019366c23a4da2c8ff0a..312eb3a357630c5f7a6b97e7c083321ae1b5b8db 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setresgid
- .align 4
- .ent setresgid
+#include <private/bionic_asm.h>
-setresgid:
+ENTRY(setresgid)
.set push
.set noreorder
li v0, __NR_setresgid
j t9
move ra, t0
.set pop
- .end setresgid
+END(setresgid)
index fdd28a92bdcdce7d3edc6a0550b99e3b90fb7437..4da79d0b52fbfb688fad837b788702c423838277 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setresuid
- .align 4
- .ent setresuid
+#include <private/bionic_asm.h>
-setresuid:
+ENTRY(setresuid)
.set push
.set noreorder
li v0, __NR_setresuid
j t9
move ra, t0
.set pop
- .end setresuid
+END(setresuid)
index db50c6c8112d24b05f3305cb86af3785ca166873..33f6fce5e7d7f33c92a9e5a8c958b23b3be3d40b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setreuid
- .align 4
- .ent setreuid
+#include <private/bionic_asm.h>
-setreuid:
+ENTRY(setreuid)
.set push
.set noreorder
li v0, __NR_setreuid
j t9
move ra, t0
.set pop
- .end setreuid
+END(setreuid)
index 9ed0024c033a3f982debe4fdbcca86813e620316..3060298d252e4fe6636b1e49060c63d8e8106ee9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setrlimit
- .align 4
- .ent setrlimit
+#include <private/bionic_asm.h>
-setrlimit:
+ENTRY(setrlimit)
.set push
.set noreorder
li v0, __NR_setrlimit
j t9
move ra, t0
.set pop
- .end setrlimit
+END(setrlimit)
.globl setrlimit64
.equ setrlimit64, setrlimit
index b1b340f9adeffb3a557b87fba54c98b551dd344f..c8d1ad5db0fba768d42682312743c87dff329975 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setsid
- .align 4
- .ent setsid
+#include <private/bionic_asm.h>
-setsid:
+ENTRY(setsid)
.set push
.set noreorder
li v0, __NR_setsid
j t9
move ra, t0
.set pop
- .end setsid
+END(setsid)
index 55cce5fa6d2d4d1062b3f6c7cc2f7874eea5bd88..b40aad185a653a3cd5006a777167f5c901953a0d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setsockopt
- .align 4
- .ent setsockopt
+#include <private/bionic_asm.h>
-setsockopt:
+ENTRY(setsockopt)
.set push
.set noreorder
li v0, __NR_setsockopt
j t9
move ra, t0
.set pop
- .end setsockopt
+END(setsockopt)
index 72802e2c2c25acf21eb0f8be27e4c7e2c1b6fa9d..2e333f8e394154c4a4460d16fb72762b8fa01353 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl settimeofday
- .align 4
- .ent settimeofday
+#include <private/bionic_asm.h>
-settimeofday:
+ENTRY(settimeofday)
.set push
.set noreorder
li v0, __NR_settimeofday
j t9
move ra, t0
.set pop
- .end settimeofday
+END(settimeofday)
index d8edd2224f27ea708955e01f5b76e417cb3c34db..fb8125e10b7505b7d4456ab99d8b4685ff832a86 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setuid
- .align 4
- .ent setuid
+#include <private/bionic_asm.h>
-setuid:
+ENTRY(setuid)
.set push
.set noreorder
li v0, __NR_setuid
j t9
move ra, t0
.set pop
- .end setuid
+END(setuid)
index 9ccc378c39063bd07c08a2775e8a9d9c24239f91..04e746d77f57497fb9d51c1299563e8b90fe20e2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl setxattr
- .align 4
- .ent setxattr
+#include <private/bionic_asm.h>
-setxattr:
+ENTRY(setxattr)
.set push
.set noreorder
li v0, __NR_setxattr
j t9
move ra, t0
.set pop
- .end setxattr
+END(setxattr)
index 335ed418aee6516cabbf61fb5c4b55825e90a138..59f437a0b55b05472439a8700dfa3e80a7fed6f7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl shutdown
- .align 4
- .ent shutdown
+#include <private/bionic_asm.h>
-shutdown:
+ENTRY(shutdown)
.set push
.set noreorder
li v0, __NR_shutdown
j t9
move ra, t0
.set pop
- .end shutdown
+END(shutdown)
index 3458b11a1bdcaa45cd13753d330f2bfce376ed86..0fbd3a15769dc152bc805dbf51af2ffca0789c70 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sigaltstack
- .align 4
- .ent sigaltstack
+#include <private/bionic_asm.h>
-sigaltstack:
+ENTRY(sigaltstack)
.set push
.set noreorder
li v0, __NR_sigaltstack
j t9
move ra, t0
.set pop
- .end sigaltstack
+END(sigaltstack)
index ef1d1e5affa09507f5fe2cae729860cc718a2112..594c73d62334203486cdc741836d9d064af18202 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl signalfd4
- .align 4
- .ent signalfd4
+#include <private/bionic_asm.h>
-signalfd4:
+ENTRY(signalfd4)
.set push
.set noreorder
li v0, __NR_signalfd4
j t9
move ra, t0
.set pop
- .end signalfd4
+END(signalfd4)
index 6b042c2838f6c821c1ed0afe4791902281ef7bf8..2020e2ed2711f7f76d573e9675d476c075b71f1e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl socket
- .align 4
- .ent socket
+#include <private/bionic_asm.h>
-socket:
+ENTRY(socket)
.set push
.set noreorder
li v0, __NR_socket
j t9
move ra, t0
.set pop
- .end socket
+END(socket)
index b4ca8f4f289267896b38de8b80cfd5c082ce9bc2..fa684d1c8242d53662e5b31a8eecac104d18e271 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl socketpair
- .align 4
- .ent socketpair
+#include <private/bionic_asm.h>
-socketpair:
+ENTRY(socketpair)
.set push
.set noreorder
li v0, __NR_socketpair
j t9
move ra, t0
.set pop
- .end socketpair
+END(socketpair)
index accd7153e900687c58f87eb7957f0e9f101bed0f..e835e414d25ffe540cc4f2373f22bb20a5b09a88 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl statfs64
- .align 4
- .ent statfs64
+#include <private/bionic_asm.h>
-statfs64:
+ENTRY(statfs64)
.set push
.set noreorder
li v0, __NR_statfs
j t9
move ra, t0
.set pop
- .end statfs64
+END(statfs64)
.globl statfs
.equ statfs, statfs64
index 8041188a64fd00cb930b2edb53d582aff4eb54e8..dfaf1854b166852ed927568963f07e43c0ebe740 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl swapoff
- .align 4
- .ent swapoff
+#include <private/bionic_asm.h>
-swapoff:
+ENTRY(swapoff)
.set push
.set noreorder
li v0, __NR_swapoff
j t9
move ra, t0
.set pop
- .end swapoff
+END(swapoff)
index 5c24d7c49e5528f4400958d17d651170f803ea5e..8e844c497cfe351d62b0cb9fc3291fefa257b364 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl swapon
- .align 4
- .ent swapon
+#include <private/bionic_asm.h>
-swapon:
+ENTRY(swapon)
.set push
.set noreorder
li v0, __NR_swapon
j t9
move ra, t0
.set pop
- .end swapon
+END(swapon)
index ce86d8651ea06708464395278f596f9df6db3edc..e43d597369cffa6e372ff08485bef345b1797213 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl symlinkat
- .align 4
- .ent symlinkat
+#include <private/bionic_asm.h>
-symlinkat:
+ENTRY(symlinkat)
.set push
.set noreorder
li v0, __NR_symlinkat
j t9
move ra, t0
.set pop
- .end symlinkat
+END(symlinkat)
index e0787bd69fa760c1f9988fc7ccbddabe7e8749b3..ec342a31ec12c038d8918c9d3b8270b93ba4dfd6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sync
- .align 4
- .ent sync
+#include <private/bionic_asm.h>
-sync:
+ENTRY(sync)
.set push
.set noreorder
li v0, __NR_sync
j t9
move ra, t0
.set pop
- .end sync
+END(sync)
index 19ad141983d2782599cb0574f099e1377056200a..16486fdec81773f9f84b68432cc4c11260654027 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl sysinfo
- .align 4
- .ent sysinfo
+#include <private/bionic_asm.h>
-sysinfo:
+ENTRY(sysinfo)
.set push
.set noreorder
li v0, __NR_sysinfo
j t9
move ra, t0
.set pop
- .end sysinfo
+END(sysinfo)
index 1a8fe79560e0bde9ddad777fd1aa2fabd9bce075..d98d9ae145413d5018294429a118e153254c3729 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl tgkill
- .align 4
- .ent tgkill
+#include <private/bionic_asm.h>
-tgkill:
+ENTRY(tgkill)
.set push
.set noreorder
li v0, __NR_tgkill
j t9
move ra, t0
.set pop
- .end tgkill
+END(tgkill)
diff --git a/libc/arch-mips64/syscalls/timerfd_create.S b/libc/arch-mips64/syscalls/timerfd_create.S
index 63e8b00ae16137ed3df5f63f56e94c6cbf054b61..ab8e9e0f9cd53a191091c2947ec905fb308bad5b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl timerfd_create
- .align 4
- .ent timerfd_create
+#include <private/bionic_asm.h>
-timerfd_create:
+ENTRY(timerfd_create)
.set push
.set noreorder
li v0, __NR_timerfd_create
j t9
move ra, t0
.set pop
- .end timerfd_create
+END(timerfd_create)
diff --git a/libc/arch-mips64/syscalls/timerfd_gettime.S b/libc/arch-mips64/syscalls/timerfd_gettime.S
index 2afe6f1385a32dd234f1a6f7980054567ddd0f2d..2ec7b9c15c4377bc5ae340620748a0f303ca9fe4 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl timerfd_gettime
- .align 4
- .ent timerfd_gettime
+#include <private/bionic_asm.h>
-timerfd_gettime:
+ENTRY(timerfd_gettime)
.set push
.set noreorder
li v0, __NR_timerfd_gettime
j t9
move ra, t0
.set pop
- .end timerfd_gettime
+END(timerfd_gettime)
diff --git a/libc/arch-mips64/syscalls/timerfd_settime.S b/libc/arch-mips64/syscalls/timerfd_settime.S
index 40ce07dfd54b505c4631aa91f9483adb9610c5ca..0aec09fb6a1cc95e2fc56d4fe70967afcd948bd7 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl timerfd_settime
- .align 4
- .ent timerfd_settime
+#include <private/bionic_asm.h>
-timerfd_settime:
+ENTRY(timerfd_settime)
.set push
.set noreorder
li v0, __NR_timerfd_settime
j t9
move ra, t0
.set pop
- .end timerfd_settime
+END(timerfd_settime)
index ccbdbf461d22089e0d14c09f9b2d2ef87b769e8f..2457e0c62f9a94558438c720ff2b2a549b7dd945 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl times
- .align 4
- .ent times
+#include <private/bionic_asm.h>
-times:
+ENTRY(times)
.set push
.set noreorder
li v0, __NR_times
j t9
move ra, t0
.set pop
- .end times
+END(times)
index 8caa6952921819deb0506678d4b98f3ba1a1b59d..14d6903e6bbac5ef76fb928323ddb81c149a732e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl tkill
- .align 4
- .ent tkill
+#include <private/bionic_asm.h>
-tkill:
+ENTRY(tkill)
.set push
.set noreorder
li v0, __NR_tkill
j t9
move ra, t0
.set pop
- .end tkill
+END(tkill)
index a79cdcd56484a3d2d4241342fa8862161ca6192c..a0cbe514188dab2d7be845b9990b2abc8699feaf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl truncate
- .align 4
- .ent truncate
+#include <private/bionic_asm.h>
-truncate:
+ENTRY(truncate)
.set push
.set noreorder
li v0, __NR_truncate
j t9
move ra, t0
.set pop
- .end truncate
+END(truncate)
.globl truncate64
.equ truncate64, truncate
index 168ff9ce3d8cba3cf3cd30f0798a67cee0520338..33624d2125a4ccec6e7db261081e2348dd7729a5 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl umask
- .align 4
- .ent umask
+#include <private/bionic_asm.h>
-umask:
+ENTRY(umask)
.set push
.set noreorder
li v0, __NR_umask
j t9
move ra, t0
.set pop
- .end umask
+END(umask)
index db80fa8ebc6352e3c067df5eee7020d34b5b9730..6193459fce366ad87a2bfedd52b8a8189217c74e 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl umount2
- .align 4
- .ent umount2
+#include <private/bionic_asm.h>
-umount2:
+ENTRY(umount2)
.set push
.set noreorder
li v0, __NR_umount2
j t9
move ra, t0
.set pop
- .end umount2
+END(umount2)
index 417ecb00c5d04214ab7d0a1d06c1e2efb325abe8..df50f4599bee2ba43e3db0162efaa573761f199a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl uname
- .align 4
- .ent uname
+#include <private/bionic_asm.h>
-uname:
+ENTRY(uname)
.set push
.set noreorder
li v0, __NR_uname
j t9
move ra, t0
.set pop
- .end uname
+END(uname)
index e533bc398a71a238fa13b4f31db48f8264685d8b..29d44427e84f95369fe8664f296fd4d79ee3feed 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl unlinkat
- .align 4
- .ent unlinkat
+#include <private/bionic_asm.h>
-unlinkat:
+ENTRY(unlinkat)
.set push
.set noreorder
li v0, __NR_unlinkat
j t9
move ra, t0
.set pop
- .end unlinkat
+END(unlinkat)
index 4a197450161ac902fdcb4e227b4e5bc8366563d0..6d8fbf3d0fe31d47c1e5858ca84cddc58f71e36b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl unshare
- .align 4
- .ent unshare
+#include <private/bionic_asm.h>
-unshare:
+ENTRY(unshare)
.set push
.set noreorder
li v0, __NR_unshare
j t9
move ra, t0
.set pop
- .end unshare
+END(unshare)
index 1cde60dd4ba240245b3b539db5296a60e47d9b9a..654b8a454cb79ac566e91c73c95197b183e9bd3a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl utimensat
- .align 4
- .ent utimensat
+#include <private/bionic_asm.h>
-utimensat:
+ENTRY(utimensat)
.set push
.set noreorder
li v0, __NR_utimensat
j t9
move ra, t0
.set pop
- .end utimensat
+END(utimensat)
index 14abeeb4366d79b285fcedc03fa104978fdd78b2..e3755b58e5b6bbfde895c5e5b67ff80e28fca232 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl wait4
- .align 4
- .ent wait4
+#include <private/bionic_asm.h>
-wait4:
+ENTRY(wait4)
.set push
.set noreorder
li v0, __NR_wait4
j t9
move ra, t0
.set pop
- .end wait4
+END(wait4)
index f58f25de3b8785b82a6f0dd7d5aac38125b001e6..ce7f70232244f10ff9159a8224f5a752227c7f94 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl write
- .align 4
- .ent write
+#include <private/bionic_asm.h>
-write:
+ENTRY(write)
.set push
.set noreorder
li v0, __NR_write
j t9
move ra, t0
.set pop
- .end write
+END(write)
index a716c78ab54efbbfe52a97e5627f455744990012..e2c7875ebd7947361348efec76e0fd1fe0c3f5ae 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl writev
- .align 4
- .ent writev
+#include <private/bionic_asm.h>
-writev:
+ENTRY(writev)
.set push
.set noreorder
li v0, __NR_writev
j t9
move ra, t0
.set pop
- .end writev
+END(writev)
index 3823ecc1786b6ed9f97e23952ec6736e362b692b..e6ddaaad459b96e3c4e84987d0b28c42ba9e18f5 100644 (file)
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
ENTRY(__bionic_clone)
index 0739d7983d6c9634f43bd30edf7bcae15f604f01..31ec6bc34cb559bc13c3dbb7cf70da4180fed60f 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov %esp, %eax
index 9221138b8fd813f48e54967770526fc68ae91c83..0b256a2ad12db5171304f91c5e5ff584639c8d98 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* C library -- _setjmp, _longjmp
index c0df6473bfbd809a1ca5193c6347568ac1c1b272..5b943118cf611dc5b7058edd98af04c905d9a7dd 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* C library -- setjmp, longjmp
PIC_PROLOGUE
pushl $0
#ifdef PIC
- call PIC_PLT(_C_LABEL(sigblock))
+ call PIC_PLT(sigblock)
#else
- call _C_LABEL(sigblock)
+ call sigblock
#endif
addl $4,%esp
PIC_EPILOGUE
PIC_PROLOGUE
pushl 24(%edx)
#ifdef PIC
- call PIC_PLT(_C_LABEL(sigsetmask))
+ call PIC_PLT(sigsetmask)
#else
- call _C_LABEL(sigsetmask)
+ call sigsetmask
#endif
addl $4,%esp
PIC_EPILOGUE
index 70cc6db4ccb48c2ae2fdcda5784b9f7c2d54cdc1..7ef732ef202d110544a2d450f8bda0ea5cbd1195 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(sigsetjmp)
movl 4(%esp),%ecx
PIC_PROLOGUE
pushl $0
#ifdef PIC
- call PIC_PLT(_C_LABEL(sigblock))
+ call PIC_PLT(sigblock)
#else
- call _C_LABEL(sigblock)
+ call sigblock
#endif
addl $4,%esp
PIC_EPILOGUE
PIC_PROLOGUE
pushl 24(%edx)
#ifdef PIC
- call PIC_PLT(_C_LABEL(sigsetmask))
+ call PIC_PLT(sigsetmask)
#else
- call _C_LABEL(sigsetmask)
+ call sigsetmask
#endif
addl $4,%esp
PIC_EPILOGUE
index 5ccf78f13badeac45eda49514886eadc87a6cedf..913e6c8406ab05205ddf036e5a9a4da3db79e9da 100644 (file)
#ifndef _I386_ASM_H_
#define _I386_ASM_H_
-#ifdef _KERNEL_OPT
-#include "opt_multiprocessor.h"
-#endif
-
#ifdef PIC
#define PIC_PROLOGUE \
pushl %ebx; \
#define PIC_GOTOFF(x) x
#endif
-#ifdef __ELF__
-# define _C_LABEL(x) x
-#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
-#endif
-#define _ASM_LABEL(x) x
-
-#define CVAROFF(x, y) _C_LABEL(x) + y
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
/* let kernels and others override entrypoint alignment */
#if !defined(_ALIGN_TEXT) && !defined(_KERNEL)
# ifdef _STANDALONE
# endif
#endif
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,@function; x: .cfi_startproc;
-#define _LABEL(x) \
- .globl x; x:
-
-#ifdef _KERNEL
-
-#define CPUVAR(off) %fs:__CONCAT(CPU_INFO_,off)
-
-/* XXX Can't use __CONCAT() here, as it would be evaluated incorrectly. */
-#ifdef __ELF__
-#ifdef __STDC__
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name:
-#define IDTVEC_END(name) \
- .size X ## name, . - X ## name
-#else
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name:
-#define IDTVEC_END(name) \
- .size X/**/name, . - X/**/name
-#endif /* __STDC__ */
-#else
-#ifdef __STDC__
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl _X ## name; .type _X ## name,@function; _X ## name:
-#define IDTVEC_END(name) \
- .size _X ## name, . - _X ## name
-#else
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl _X/**/name; .type _X/**/name,@function; _X/**/name:
-#define IDTVEC_END(name) \
- .size _X/**/name, . - _X/**/name
-#endif /* __STDC__ */
-#endif /* __ELF__ */
-
-#ifdef _STANDALONE
-#define ALIGN_DATA .align 4
-#define ALIGN_TEXT .align 4 /* 4-byte boundaries */
-#define SUPERALIGN_TEXT .align 16 /* 15-byte boundaries */
-#elif defined __ELF__
-#define ALIGN_DATA .align 4
-#define ALIGN_TEXT .align 16 /* 16-byte boundaries */
-#define SUPERALIGN_TEXT .align 16 /* 16-byte boundaries */
-#else
-#define ALIGN_DATA .align 2
-#define ALIGN_TEXT .align 4 /* 16-byte boundaries */
-#define SUPERALIGN_TEXT .align 4 /* 16-byte boundaries */
-#endif /* __ELF__ */
-
-#define _ALIGN_TEXT ALIGN_TEXT
-
-#ifdef GPROF
-#ifdef __ELF__
-#define MCOUNT_ASM call _C_LABEL(__mcount)
-#else /* __ELF__ */
-#define MCOUNT_ASM call _C_LABEL(mcount)
-#endif /* __ELF__ */
-#else /* GPROF */
-#define MCOUNT_ASM /* nothing */
-#endif /* GPROF */
-
-#endif /* _KERNEL */
-
-
-
-#ifdef GPROF
-# ifdef __ELF__
-# define _PROF_PROLOGUE \
- pushl %ebp; movl %esp,%ebp; call PIC_PLT(__mcount); popl %ebp
-# else
-# define _PROF_PROLOGUE \
- pushl %ebp; movl %esp,%ebp; call PIC_PLT(mcount); popl %ebp
-# endif
-#else
-# define _PROF_PROLOGUE
-#endif
-
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
-#define NENTRY(y) _ENTRY(_C_LABEL(y))
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define LABEL(y) _LABEL(_C_LABEL(y))
-#define END(y) .cfi_endproc; .size y, . - y
-
-#define ASMSTR .asciz
-
-#ifdef __ELF__
-#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection
-#else
-#define RCSID(x) .text; .asciz x
-#endif
-
-#ifdef NO_KERNEL_RCSIDS
-#define __KERNEL_RCSID(_n, _s) /* nothing */
-#else
-#define __KERNEL_RCSID(_n, _s) RCSID(_s)
-#endif
-
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-/*
- * STRONG_ALIAS: create a strong alias.
- */
-#define STRONG_ALIAS(alias,sym) \
- .globl alias; \
- alias = sym
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .pushsection .gnu.warning. ## sym; \
- .ascii msg; \
- .popsection
-#else
-#define WARN_REFERENCES(sym,msg) \
- .pushsection .gnu.warning./**/sym; \
- .ascii msg; \
- .popsection
-#endif /* __STDC__ */
-
#endif /* !_I386_ASM_H_ */
index 40df1d026bc7eace677cd6eed472c5a81c3b4aec..f425c589e0c23b8a8cedeaaf702ae37b347e1492 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* (ov)bcopy (src,dst,cnt)
index 3b5053024aa7ebf13b7ac7dec7522568f26a0020..ef36b4f2984fe346358a1be35492e97fdfb992c1 100644 (file)
* Public domain.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(memcmp)
pushl %edi
index c75f38a54fe59a2d37f22925734d9bcf40481d67..49e8eeedda79a1a6a8a2321da485d82d5d08177a 100644 (file)
* Public domain.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#if defined(APIWARN)
#APP
index 5d3f4fc26692cdb2c946d2c24d2b2cf99a9dc90f..580f4d5a6622f00fa40620cfc82af43c8e60032f 100644 (file)
* Public domain.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* NOTE: I've unrolled the loop eight times: large enough to make a
index 66494732831fdafa757ed5b2e95a5f46fa5bb7b6..9ba83a13bdaf3b4fcc29d1255bd45545215b07e4 100644 (file)
* Public domain.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* NOTE: I've unrolled the loop eight times: large enough to make a
index 2f6cfb2a2b21e085b4f36c08af022f05cd530f67..b44d13413b63b8d652e06b479a10d7b4cf4a3184 100644 (file)
* Public domain.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* On the i486, this code is negligibly faster than the code generated
diff --git a/libc/arch-x86/x86.mk b/libc/arch-x86/x86.mk
index a39fcf2e2fdb31d4338fa276c9699932cc83dd9d..b024acbf8fd91585bbb20effa511fc6b52d5a514 100644 (file)
--- a/libc/arch-x86/x86.mk
+++ b/libc/arch-x86/x86.mk
arch-x86/string/sse2-wcslen-atom.S \
arch-x86/string/sse2-wcscmp-atom.S \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_x86 :=
-libc_arch_dynamic_src_files_x86 :=
-
-
-##########################################
-# crt-related
libc_crt_target_cflags_x86 := \
-m32 \
-I$(LOCAL_PATH)/arch-x86/include
index 7692013432845065e2eaa6e60cd7fb401763caa3..cf98d7661e364b985d183cc058c2e84256d34a09 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
ENTRY(__bionic_clone)
index 0c693b3eda936c507890d6bdcbb66fd92bf0b80d..9cc18a962157f120da6d1e54aab99525d73886c8 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov %rsp, %rax
index e03bb88d3e46f7cbc57d574d4e72e473c0f952e0..eddceb15bda0c99ed4a912cd552af2fe27e59d2c 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
-ENTRY(__rt_sigreturn)
- .hidden _C_LABEL(__rt_sigreturn) // TODO: add an ENTRY_PRIVATE macro for x86_64.
+ENTRY_PRIVATE(__rt_sigreturn)
movl $__NR_rt_sigreturn, %eax
syscall
END(__rt_sigreturn)
index e9b8dbbd5b53a3d600bc297512885c1ff7fa97fb..c617030614a711f93c07f96a9cf24597bf97c821 100644 (file)
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
index 4dd9028915d5931d2f1f7b59e3901dc2fd84f71c..c81b5734ceb67488a62b87acfaedca65e701dbd0 100644 (file)
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
pushq %rdi
xorq %rdi,%rdi
#ifdef __PIC__
- call PIC_PLT(_C_LABEL(sigblock))
+ call PIC_PLT(sigblock)
#else
- call _C_LABEL(sigblock)
+ call sigblock
#endif
popq %rdi
movq %rax,(_JB_SIGMASK * 8)(%rdi)
movq (_JB_SIGMASK * 8)(%rdi),%rdi
pushq %r8
#ifdef __PIC__
- call PIC_PLT(_C_LABEL(sigsetmask))
+ call PIC_PLT(sigsetmask)
#else
- call _C_LABEL(sigsetmask)
+ call sigsetmask
#endif
popq %r8
movq (_JB_RBX * 8)(%r12),%rbx
index 842d6ffb54a729c42f12cb9d995d90487664d43b..718743f94e7519620fe5426c481f502dba35a0b6 100644 (file)
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
pushq %rdi
xorq %rdi,%rdi
#ifdef __PIC__
- call PIC_PLT(_C_LABEL(sigblock))
+ call PIC_PLT(sigblock)
#else
- call _C_LABEL(sigblock)
+ call sigblock
#endif
popq %rdi
movq %rax,(_JB_SIGMASK * 8)(%rdi)
movq (_JB_SIGMASK * 8)(%rdi),%rdi
#ifdef __PIC__
- call PIC_PLT(_C_LABEL(sigsetmask))
+ call PIC_PLT(sigsetmask)
#else
- call _C_LABEL(sigsetmask)
+ call sigsetmask
#endif
2: popq %rax
movq (_JB_RBX * 8)(%r12),%rbx
index 310b23000c227d2632ef5721148cceac6d990014..0af6dae46d7b6551574d39c3a02c22cf455421cd 100644 (file)
#ifndef _AMD64_ASM_H_
#define _AMD64_ASM_H_
-#ifdef __x86_64__
-
#ifdef __PIC__
#define PIC_PLT(x) x@PLT
#define PIC_GOT(x) x@GOTPCREL(%rip)
#define PIC_GOT(x) x
#endif
-# define _C_LABEL(x) x
-#define _ASM_LABEL(x) x
-
-#define CVAROFF(x,y) (_C_LABEL(x)+y)(%rip)
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
/* let kernels and others override entrypoint alignment */
#ifndef _ALIGN_TEXT
# ifdef _STANDALONE
# endif
#endif
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,@function; x: .cfi_startproc;
-#define _LABEL(x) \
- .globl x; x:
-
-#ifdef _KERNEL
-/* XXX Can't use __CONCAT() here, as it would be evaluated incorrectly. */
-#ifdef __STDC__
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name:
-#define IDTVEC_END(name) \
- .size X ## name, . - X ## name
-#else
-#define IDTVEC(name) \
- ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name:
-#define IDTVEC_END(name) \
- .size X/**/name, . - X/**/name
-#endif /* __STDC__ */
-#endif /* _KERNEL */
-
-#ifdef __STDC__
-#define CPUVAR(off) %gs:CPU_INFO_ ## off
-#else
-#define CPUVAR(off) %gs:CPU_INFO_/**/off
-#endif
-
-
-#ifdef GPROF
-# define _PROF_PROLOGUE \
- pushq %rbp; leaq (%rsp),%rbp; call PIC_PLT(__mcount); popq %rbp
-#else
-# define _PROF_PROLOGUE
-#endif
-
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
-#define NENTRY(y) _ENTRY(_C_LABEL(y))
-#define ALTENTRY(x) NENTRY(x)
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define LABEL(y) _LABEL(_C_LABEL(y))
-#define END(y) .cfi_endproc; .size y, . - y
-
-#define ASMSTR .asciz
-
-#define RCSID(x) .pushsection ".ident"; .asciz x; .popsection
-
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-
-/*
- * STRONG_ALIAS: create a strong alias.
- */
-#define STRONG_ALIAS(alias,sym) \
- .globl alias; \
- alias = sym
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .pushsection .gnu.warning. ## sym; \
- .ascii msg; \
- .popsection
-#else
-#define WARN_REFERENCES(sym,msg) \
- .pushsection .gnu.warning./**/sym; \
- .ascii msg; \
- .popsection
-#endif /* __STDC__ */
-
-#else /* __x86_64__ */
-
-#include <i386/asm.h>
-
-#endif /* __x86_64__ */
-
#endif /* !_AMD64_ASM_H_ */
index e8786795d14e48260da1bff5b193c35b2b4a2df3..ac5d96e4d3fd71e69805ec9e313a815cc649627f 100644 (file)
1:
ret
END(__arch_prctl)
-.hidden _C_LABEL(__arch_prctl)
+.hidden __arch_prctl
index 18c29970c43b20e605b8c9891ce849b313b2c8d4..a69f404d2e3507c196992853236253d729a672ba 100644 (file)
1:
ret
END(__brk)
-.hidden _C_LABEL(__brk)
+.hidden __brk
index ed913b02a7a5e8633111a63ff0acbecea9cbed1d..306e12e364516931c3e51bb5ec65de890cf4853d 100644 (file)
1:
ret
END(__epoll_pwait)
-.hidden _C_LABEL(__epoll_pwait)
+.hidden __epoll_pwait
index da1f9f8b384ecfff16fc45e163d2540fe7325605..af3ada470528932229ac6b13e449a86a3c3cc212 100644 (file)
1:
ret
END(__exit)
-.hidden _C_LABEL(__exit)
+.hidden __exit
index 5a184940a07f5b61536c1dfb0470d3c18d821df9..8650db44935a1b73a6e6157fc51ac6c82e45d802 100644 (file)
1:
ret
END(__getcpu)
-.hidden _C_LABEL(__getcpu)
+.hidden __getcpu
index c9e99422fbf35a1cc3c841e2fadc805447e52831..c762804790ffe1b824d8746bfa3a2d1139be80d9 100644 (file)
1:
ret
END(__getcwd)
-.hidden _C_LABEL(__getcwd)
+.hidden __getcwd
index f5230e16bd971a7c8b9e91e3d68380cfc49d7ac1..8aaae8f3de6ece9bd19108a765fbdee1fa31170d 100644 (file)
1:
ret
END(__getpriority)
-.hidden _C_LABEL(__getpriority)
+.hidden __getpriority
index 8f30eb6a917f3434f501d371a4e9b30069e11701..646d8198e4c6c93b3574710aa28f10a9c76c867f 100644 (file)
1:
ret
END(__ioctl)
-.hidden _C_LABEL(__ioctl)
+.hidden __ioctl
index cd6a07fe608564cba067f368368c7c7770c07938..e065cca57f80e15c22851f6235f349e6780bf88c 100644 (file)
1:
ret
END(__openat)
-.hidden _C_LABEL(__openat)
+.hidden __openat
index dd639ae6a39b393718813c59198a745137f1771c..6edaa36278539a8f8e86e69df4a8b41ca330c7dc 100644 (file)
1:
ret
END(__ppoll)
-.hidden _C_LABEL(__ppoll)
+.hidden __ppoll
index c37483a79f596a8cee2f1600770a3f20ccadf8cb..a2aec7a5ef8bca801dece37392656866efb46d95 100644 (file)
1:
ret
END(__pselect6)
-.hidden _C_LABEL(__pselect6)
+.hidden __pselect6
index be42b91a6786395b82d29e5400fac1a688cb6224..8ec8ac11deda48b1110d8a3d78c012bb84763cd6 100644 (file)
1:
ret
END(__ptrace)
-.hidden _C_LABEL(__ptrace)
+.hidden __ptrace
index fc8e58d3efb4d5531c34e00b32dabdd9717a3759..9b8ef70fb56ab4440aafc7815be8b2dd226c399d 100644 (file)
1:
ret
END(__reboot)
-.hidden _C_LABEL(__reboot)
+.hidden __reboot
diff --git a/libc/arch-x86_64/syscalls/__rt_sigaction.S b/libc/arch-x86_64/syscalls/__rt_sigaction.S
index 70602dfe8bd99da264fa4b5f0c20b36a737e8ccb..b038f6e7c9a47c3eb9dccd7f46c7e2de52ec8713 100644 (file)
1:
ret
END(__rt_sigaction)
-.hidden _C_LABEL(__rt_sigaction)
+.hidden __rt_sigaction
diff --git a/libc/arch-x86_64/syscalls/__rt_sigpending.S b/libc/arch-x86_64/syscalls/__rt_sigpending.S
index 1caf1316175a4e5e323eabd5d0e6015493b50feb..e0c50c1b958ef1aac31f4f5dc41dd10f1c14eab5 100644 (file)
1:
ret
END(__rt_sigpending)
-.hidden _C_LABEL(__rt_sigpending)
+.hidden __rt_sigpending
diff --git a/libc/arch-x86_64/syscalls/__rt_sigprocmask.S b/libc/arch-x86_64/syscalls/__rt_sigprocmask.S
index d7e44a7fa71232604b3f955c12f03ff3758ac8ae..2a0ab5e0e4d165c5c85a614893dd2756a2e7af66 100644 (file)
1:
ret
END(__rt_sigprocmask)
-.hidden _C_LABEL(__rt_sigprocmask)
+.hidden __rt_sigprocmask
diff --git a/libc/arch-x86_64/syscalls/__rt_sigsuspend.S b/libc/arch-x86_64/syscalls/__rt_sigsuspend.S
index 851b93e525ac7f2bd69485859428a568e05068c3..6fa65652595143972c73f3075000c544733021a7 100644 (file)
1:
ret
END(__rt_sigsuspend)
-.hidden _C_LABEL(__rt_sigsuspend)
+.hidden __rt_sigsuspend
diff --git a/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S b/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S
index 6962d4a31aa6916d95f76d73213a2d25ffb967cf..46ee04bd3e79c3bb84492dac561cd78992c8e916 100644 (file)
1:
ret
END(__rt_sigtimedwait)
-.hidden _C_LABEL(__rt_sigtimedwait)
+.hidden __rt_sigtimedwait
diff --git a/libc/arch-x86_64/syscalls/__sched_getaffinity.S b/libc/arch-x86_64/syscalls/__sched_getaffinity.S
index 861f06bac87e341ad3f20eaeab8c6ea50d757f84..3707226e5de4374e7cb2dd156ffc2a45dd5eb4d9 100644 (file)
1:
ret
END(__sched_getaffinity)
-.hidden _C_LABEL(__sched_getaffinity)
+.hidden __sched_getaffinity
diff --git a/libc/arch-x86_64/syscalls/__set_tid_address.S b/libc/arch-x86_64/syscalls/__set_tid_address.S
index fe7260f0d37fd212abd705abbcbc03aec288bbd9..4a8f1535aa746c514fd1c4922e6be19317a9ff35 100644 (file)
1:
ret
END(__set_tid_address)
-.hidden _C_LABEL(__set_tid_address)
+.hidden __set_tid_address
index 4e41149ab544451920872d51dab7f9154d107f95..f71002570299a17219dedf7fab17ce297aa7505f 100644 (file)
1:
ret
END(__syslog)
-.hidden _C_LABEL(__syslog)
+.hidden __syslog
diff --git a/libc/arch-x86_64/syscalls/__timer_create.S b/libc/arch-x86_64/syscalls/__timer_create.S
index 1c5c68e8f17e3566d56484f0c672d3c029fbee6b..2f41c887289a4b378e283324634feac82e0b7c33 100644 (file)
1:
ret
END(__timer_create)
-.hidden _C_LABEL(__timer_create)
+.hidden __timer_create
diff --git a/libc/arch-x86_64/syscalls/__timer_delete.S b/libc/arch-x86_64/syscalls/__timer_delete.S
index c8267578ce275bc8bc4d215f6c4d9a6fa8fcdda4..200991677450c50fe10e004d46058a8195eb4231 100644 (file)
1:
ret
END(__timer_delete)
-.hidden _C_LABEL(__timer_delete)
+.hidden __timer_delete
diff --git a/libc/arch-x86_64/syscalls/__timer_getoverrun.S b/libc/arch-x86_64/syscalls/__timer_getoverrun.S
index 772b05ef25706e656cabee2c9ad1b87be6e3aa5d..fe71efe3d1ea614da360772bab850af8d8eeea14 100644 (file)
1:
ret
END(__timer_getoverrun)
-.hidden _C_LABEL(__timer_getoverrun)
+.hidden __timer_getoverrun
diff --git a/libc/arch-x86_64/syscalls/__timer_gettime.S b/libc/arch-x86_64/syscalls/__timer_gettime.S
index 181069ba058e12766c1b35161a741eae9c3e9222..44fe2ffc3e3fa97ef62b4645d1e0c2d627410129 100644 (file)
1:
ret
END(__timer_gettime)
-.hidden _C_LABEL(__timer_gettime)
+.hidden __timer_gettime
diff --git a/libc/arch-x86_64/syscalls/__timer_settime.S b/libc/arch-x86_64/syscalls/__timer_settime.S
index 11fe04e4369c64d6a6400af9f05b67c46faea68b..1240aa196e7966def34229abb09b2b61316b3cbc 100644 (file)
1:
ret
END(__timer_settime)
-.hidden _C_LABEL(__timer_settime)
+.hidden __timer_settime
index 4317d785acd7cb2ff504c228b092aa751154f2dd..0d4fc58d2e53eee3055274750e45d87fb4078fb8 100644 (file)
1:
ret
END(__waitid)
-.hidden _C_LABEL(__waitid)
+.hidden __waitid
index 5d2b05bf03893426e143639a77b6ad3d7a9628c2..44831a6d92afaa1160e0889791bc67d6165bb286 100644 (file)
arch-x86_64/bionic/vfork.S \
string/memcmp16.c \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_x86_64 :=
-libc_arch_dynamic_src_files_x86_64 :=
-
-##########################################
-# crt-related
libc_crt_target_cflags_x86_64 += \
-m64 \
-I$(LOCAL_PATH)/arch-x86_64/include
diff --git a/libc/bionic/atoi.c b/libc/bionic/atoi.c
--- a/libc/bionic/atoi.c
+++ /dev/null
@@ -1,33 +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 <inttypes.h>
-
-int atoi(const char* s)
-{
- return (int)strtoimax(s, NULL, 10);
-}
diff --git a/libc/bionic/atol.c b/libc/bionic/atol.c
--- a/libc/bionic/atol.c
+++ /dev/null
@@ -1,33 +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 <inttypes.h>
-
-long atol(const char* s)
-{
- return (long)strtoimax(s, NULL, 10);
-}
diff --git a/libc/bionic/atoll.c b/libc/bionic/atoll.c
--- a/libc/bionic/atoll.c
+++ /dev/null
@@ -1,33 +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 <inttypes.h>
-
-long long atoll(const char* s)
-{
- return (long long)strtoimax(s, NULL, 10);
-}
diff --git a/libc/bionic/ftok.c b/libc/bionic/ftok.c
--- a/libc/bionic/ftok.c
+++ /dev/null
@@ -1,40 +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 <unistd.h>
-#include <sys/ipc.h>
-#include <sys/stat.h>
-
-key_t ftok(const char* path, int id)
-{
- struct stat st;
-
- if ( lstat(path, &st) < 0 )
- return -1;
-
- return (key_t)( (st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) | ((id & 255) << 24) );
-}
index 3637c3e00674d1b162dd6072d6fecddc94cb7a29..fc9d9d49f8a96f46f9afa17db58d568eb5f04273 100644 (file)
// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
extern "C" {
unsigned int __page_size = PAGE_SIZE;
- unsigned int __page_shift = PAGE_SHIFT;
+ unsigned int __page_shift = 12;
}
// TODO: remove this backward compatibility hack (for jb-mr1 strace binaries).
diff --git a/libc/bionic/perror.c b/libc/bionic/perror.c
--- a/libc/bionic/perror.c
+++ /dev/null
@@ -1,44 +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 <errno.h>
-#include <unistd.h>
-#include <string.h>
-
-void perror(const char *prefix)
-{
- char buff[256];
-
- strerror_r( errno, buff, sizeof(buff) );
-
- if (prefix) {
- write( 2, prefix, strlen(prefix) );
- write( 2, ": ", 2 );
- }
- write( 2, buff, strlen(buff) );
- write( 2, "\n", 1 );
-}
diff --git a/libc/bionic/strndup.c b/libc/bionic/strndup.c
--- a/libc/bionic/strndup.c
+++ /dev/null
@@ -1,44 +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 <string.h>
-#include <stdlib.h>
-
-char* strndup(const char* s, size_t n)
-{
- size_t slen = (size_t)strlen(s);
- char* copy;
-
- if (slen < n)
- n = slen;
- copy = malloc(n+1);
- if (copy) {
- memcpy(copy, s, n);
- copy[n] = 0;
- }
- return copy;
-}
diff --git a/libc/bionic/stubs.cpp b/libc/bionic/stubs.cpp
index 707036a89b5c9e9831dc2a1d32faacbb7abca860..2c2b74b7df9c5c6b27e72f6104a466cc432d9347 100644 (file)
--- a/libc/bionic/stubs.cpp
+++ b/libc/bionic/stubs.cpp
UNIMPLEMENTED;
}
-// Portable code should use sysconf(_SC_PAGESIZE) directly instead.
+// Portable code should use sysconf(_SC_PAGE_SIZE) directly instead.
int getpagesize() {
- return sysconf(_SC_PAGESIZE);
+ return sysconf(_SC_PAGE_SIZE);
}
index db808c21f31dde368593170f13e111a34f076a22..233e57c87ca45f7383b8b42846e6e50718e06319 100644 (file)
--- a/libc/bionic/sysconf.cpp
+++ b/libc/bionic/sysconf.cpp
#endif
case _SC_ATEXIT_MAX: return SYSTEM_ATEXIT_MAX;
case _SC_IOV_MAX: return SYSTEM_IOV_MAX;
- case _SC_PAGESIZE: return PAGE_SIZE;
- case _SC_PAGE_SIZE: return PAGE_SIZE;
+
+ case _SC_PAGESIZE:
+ case _SC_PAGE_SIZE:
+ return PAGE_SIZE;
+
#ifdef _XOPEN_UNIX
case _SC_XOPEN_UNIX: return _XOPEN_UNIX;
#endif
similarity index 58%
rename from libc/bionic/system_properties.c
rename to libc/bionic/system_properties.cpp
index 825894f754e33bc26a22d263db814ca7769cbfb6..56f3724c437d53c9bfa104f0838773aec55f08b1 100644 (file)
rename from libc/bionic/system_properties.c
rename to libc/bionic/system_properties.cpp
index 825894f754e33bc26a22d263db814ca7769cbfb6..56f3724c437d53c9bfa104f0838773aec55f08b1 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include <new>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
+#include <sys/system_properties.h>
#include <sys/atomics.h>
#define ALIGN(x, a) (((x) + (a - 1)) & ~(a - 1))
-struct prop_area {
- unsigned bytes_used;
- unsigned volatile serial;
- unsigned magic;
- unsigned version;
- unsigned reserved[28];
- char data[0];
-};
-typedef struct prop_area prop_area;
-
-struct prop_info {
- unsigned volatile serial;
- char value[PROP_VALUE_MAX];
- char name[0];
-};
+static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME;
-typedef struct prop_info prop_info;
/*
* Properties are stored in a hybrid trie/binary tree structure.
* +-----+ +-----+ +-----+ +===========+
*/
-typedef volatile uint32_t prop_off_t;
+// Represents a node in the trie.
struct prop_bt {
uint8_t namelen;
uint8_t reserved[3];
- prop_off_t prop;
+ volatile uint32_t prop;
- prop_off_t left;
- prop_off_t right;
+ volatile uint32_t left;
+ volatile uint32_t right;
- prop_off_t children;
+ volatile uint32_t children;
char name[0];
+
+ prop_bt(const char *name, const uint8_t name_length) {
+ this->namelen = name_length;
+ memcpy(this->name, name, name_length);
+ this->name[name_length] = '\0';
+ ANDROID_MEMBAR_FULL();
+ }
+
+private:
+ // Disallow copy and assign.
+ prop_bt(const prop_bt&);
+ prop_bt& operator=(const prop_bt&);
};
-typedef struct prop_bt prop_bt;
+struct prop_area {
+ uint32_t bytes_used;
+ volatile uint32_t serial;
+ uint32_t magic;
+ uint32_t version;
+ uint32_t reserved[28];
+ char data[0];
+
+ prop_area(const uint32_t magic, const uint32_t version) :
+ serial(0), magic(magic), version(version) {
+ memset(reserved, 0, sizeof(reserved));
+ // Allocate enough space for the root node.
+ bytes_used = sizeof(prop_bt);
+ }
+
+private:
+ // Disallow copy and assign.
+ prop_area(const prop_area&);
+ prop_area& operator=(const prop_area&);
+};
+
+struct prop_info {
+ volatile uint32_t serial;
+ char value[PROP_VALUE_MAX];
+ char name[0];
+
+ prop_info(const char *name, const uint8_t namelen, const char *value,
+ const uint8_t valuelen) {
+ memcpy(this->name, name, namelen);
+ this->name[namelen] = '\0';
+ this->serial = (valuelen << 24);
+ memcpy(this->value, value, valuelen);
+ this->value[valuelen] = '\0';
+ ANDROID_MEMBAR_FULL();
+ }
+private:
+ // Disallow copy and assign.
+ prop_info(const prop_info&);
+ prop_info& operator=(const prop_info&);
+};
+
+struct find_nth_cookie {
+ uint32_t count;
+ const uint32_t n;
+ const prop_info *pi;
+
+ find_nth_cookie(uint32_t n) : count(0), n(n), pi(NULL) {
+ }
+};
-static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME;
static char property_filename[PATH_MAX] = PROP_FILENAME;
static bool compat_mode = false;
+static size_t pa_data_size;
+static size_t pa_size;
+// NOTE: This isn't static because system_properties_compat.c
+// requires it.
prop_area *__system_property_area__ = NULL;
-size_t pa_data_size;
-size_t pa_size;
-
static int get_fd_from_env(void)
{
+ // This environment variable consistes of two decimal integer
+ // values separated by a ",". The first value is a file descriptor
+ // and the second is the size of the system properties area. The
+ // size is currently unused.
char *env = getenv("ANDROID_PROPERTY_WORKSPACE");
if (!env) {
static int map_prop_area_rw()
{
- prop_area *pa;
- int fd;
- int ret;
-
/* dev is a tmpfs that we can use to carve a shared workspace
* out of, so let's do that...
*/
- fd = open(property_filename, O_RDWR | O_CREAT | O_NOFOLLOW | O_CLOEXEC |
- O_EXCL, 0444);
+ const int fd = open(property_filename,
+ O_RDWR | O_CREAT | O_NOFOLLOW | O_CLOEXEC | O_EXCL, 0444);
+
if (fd < 0) {
if (errno == EACCES) {
/* for consistency with the case where the process has already
return -1;
}
- ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
- if (ret < 0)
- goto out;
+ // TODO: Is this really required ? Does android run on any kernels that
+ // don't support O_CLOEXEC ?
+ const int ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
+ if (ret < 0) {
+ close(fd);
+ return -1;
+ }
- if (ftruncate(fd, PA_SIZE) < 0)
- goto out;
+ if (ftruncate(fd, PA_SIZE) < 0) {
+ close(fd);
+ return -1;
+ }
pa_size = PA_SIZE;
pa_data_size = pa_size - sizeof(prop_area);
compat_mode = false;
- pa = mmap(NULL, pa_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if(pa == MAP_FAILED)
- goto out;
+ void *const memory_area = mmap(NULL, pa_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ if (memory_area == MAP_FAILED) {
+ close(fd);
+ return -1;
+ }
- memset(pa, 0, pa_size);
- pa->magic = PROP_AREA_MAGIC;
- pa->version = PROP_AREA_VERSION;
- /* reserve root node */
- pa->bytes_used = sizeof(prop_bt);
+ prop_area *pa = new(memory_area) prop_area(PROP_AREA_MAGIC, PROP_AREA_VERSION);
/* plug into the lib property services */
__system_property_area__ = pa;
close(fd);
return 0;
-
-out:
- close(fd);
- return -1;
}
-int __system_property_set_filename(const char *filename)
-{
- size_t len = strlen(filename);
- if (len >= sizeof(property_filename))
+static int map_fd_ro(const int fd) {
+ struct stat fd_stat;
+ if (fstat(fd, &fd_stat) < 0) {
return -1;
+ }
- strcpy(property_filename, filename);
- return 0;
-}
+ if ((fd_stat.st_uid != 0)
+ || (fd_stat.st_gid != 0)
+ || ((fd_stat.st_mode & (S_IWGRP | S_IWOTH)) != 0)
+ || (fd_stat.st_size < static_cast<off_t>(sizeof(prop_area))) ) {
+ return -1;
+ }
-int __system_property_area_init()
-{
- return map_prop_area_rw();
+ pa_size = fd_stat.st_size;
+ pa_data_size = pa_size - sizeof(prop_area);
+
+ void* const map_result = mmap(NULL, pa_size, PROT_READ, MAP_SHARED, fd, 0);
+ if (map_result == MAP_FAILED) {
+ return -1;
+ }
+
+ prop_area* pa = reinterpret_cast<prop_area*>(map_result);
+ if ((pa->magic != PROP_AREA_MAGIC) || (pa->version != PROP_AREA_VERSION &&
+ pa->version != PROP_AREA_VERSION_COMPAT)) {
+ munmap(pa, pa_size);
+ return -1;
+ }
+
+ if (pa->version == PROP_AREA_VERSION_COMPAT) {
+ compat_mode = true;
+ }
+
+ __system_property_area__ = pa;
+ return 0;
}
static int map_prop_area()
{
- bool fromFile = true;
- int result = -1;
- int fd;
- int ret;
-
- fd = open(property_filename, O_RDONLY | O_NOFOLLOW | O_CLOEXEC);
+ int fd(open(property_filename, O_RDONLY | O_NOFOLLOW | O_CLOEXEC));
if (fd >= 0) {
/* For old kernels that don't support O_CLOEXEC */
- ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
- if (ret < 0)
- goto cleanup;
+ const int ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
+ if (ret < 0) {
+ close(fd);
+ return -1;
+ }
}
+ bool close_fd = true;
if ((fd < 0) && (errno == ENOENT)) {
/*
* For backwards compatibility, if the file doesn't
* condition.
*/
fd = get_fd_from_env();
- fromFile = false;
+ close_fd = false;
}
if (fd < 0) {
return -1;
}
- struct stat fd_stat;
- if (fstat(fd, &fd_stat) < 0) {
- goto cleanup;
- }
-
- if ((fd_stat.st_uid != 0)
- || (fd_stat.st_gid != 0)
- || ((fd_stat.st_mode & (S_IWGRP | S_IWOTH)) != 0)
- || (fd_stat.st_size < sizeof(prop_area)) ) {
- goto cleanup;
- }
-
- pa_size = fd_stat.st_size;
- pa_data_size = pa_size - sizeof(prop_area);
- prop_area *pa = mmap(NULL, pa_size, PROT_READ, MAP_SHARED, fd, 0);
-
- if (pa == MAP_FAILED) {
- goto cleanup;
- }
-
- if((pa->magic != PROP_AREA_MAGIC) || (pa->version != PROP_AREA_VERSION &&
- pa->version != PROP_AREA_VERSION_COMPAT)) {
- munmap(pa, pa_size);
- goto cleanup;
- }
-
- if (pa->version == PROP_AREA_VERSION_COMPAT) {
- compat_mode = true;
- }
-
- result = 0;
-
- __system_property_area__ = pa;
-
-cleanup:
- if (fromFile) {
+ const int map_result = map_fd_ro(fd);
+ if (close_fd) {
close(fd);
}
- return result;
-}
-
-int __system_properties_init()
-{
- return map_prop_area();
+ return map_result;
}
-static void *new_prop_obj(size_t size, prop_off_t *off)
+static void *allocate_obj(const size_t size, uint32_t *const off)
{
prop_area *pa = __system_property_area__;
- size = ALIGN(size, sizeof(uint32_t));
-
- if (pa->bytes_used + size > pa_data_size)
+ const size_t aligned = ALIGN(size, sizeof(uint32_t));
+ if (pa->bytes_used + aligned > pa_data_size) {
return NULL;
+ }
*off = pa->bytes_used;
- __system_property_area__->bytes_used += size;
- return __system_property_area__->data + *off;
+ pa->bytes_used += aligned;
+ return pa->data + *off;
}
-static prop_bt *new_prop_bt(const char *name, uint8_t namelen, prop_off_t *off)
+static prop_bt *new_prop_bt(const char *name, uint8_t namelen, uint32_t *const off)
{
- prop_off_t off_tmp;
- prop_bt *bt = new_prop_obj(sizeof(prop_bt) + namelen + 1, &off_tmp);
- if (bt) {
- memcpy(bt->name, name, namelen);
- bt->name[namelen] = '\0';
- bt->namelen = namelen;
- ANDROID_MEMBAR_FULL();
- *off = off_tmp;
+ uint32_t new_offset;
+ void *const offset = allocate_obj(sizeof(prop_bt) + namelen + 1, &new_offset);
+ if (offset) {
+ prop_bt* bt = new(offset) prop_bt(name, namelen);
+ *off = new_offset;
+ return bt;
}
- return bt;
+ return NULL;
}
static prop_info *new_prop_info(const char *name, uint8_t namelen,
- const char *value, uint8_t valuelen, prop_off_t *off)
+ const char *value, uint8_t valuelen, uint32_t *const off)
{
- prop_off_t off_tmp;
- prop_info *info = new_prop_obj(sizeof(prop_info) + namelen + 1, &off_tmp);
- if (info) {
- memcpy(info->name, name, namelen);
- info->name[namelen] = '\0';
- info->serial = (valuelen << 24);
- memcpy(info->value, value, valuelen);
- info->value[valuelen] = '\0';
- ANDROID_MEMBAR_FULL();
+ uint32_t off_tmp;
+ void* const offset = allocate_obj(sizeof(prop_info) + namelen + 1, &off_tmp);
+ if (offset) {
+ prop_info* info = new(offset) prop_info(name, namelen, value, valuelen);
*off = off_tmp;
+ return info;
}
- return info;
+ return NULL;
}
-static void *to_prop_obj(prop_off_t off)
+static void *to_prop_obj(const uint32_t off)
{
if (off > pa_data_size)
return NULL;
if (!__system_property_area__)
return NULL;
- return __system_property_area__->data + off;
+ return (__system_property_area__->data + off);
}
static prop_bt *root_node()
{
- return to_prop_obj(0);
+ return reinterpret_cast<prop_bt*>(to_prop_obj(0));
}
static int cmp_prop_name(const char *one, uint8_t one_len, const char *two,
return strncmp(one, two, one_len);
}
-static prop_bt *find_prop_bt(prop_bt *bt, const char *name, uint8_t namelen,
- bool alloc_if_needed)
+static prop_bt *find_prop_bt(prop_bt *const bt, const char *name,
+ uint8_t namelen, bool alloc_if_needed)
{
+
+ prop_bt* current = bt;
while (true) {
- int ret;
- if (!bt)
- return bt;
- ret = cmp_prop_name(name, namelen, bt->name, bt->namelen);
+ if (!current) {
+ return NULL;
+ }
+ const int ret = cmp_prop_name(name, namelen, current->name, current->namelen);
if (ret == 0) {
- return bt;
- } else if (ret < 0) {
- if (bt->left) {
- bt = to_prop_obj(bt->left);
+ return current;
+ }
+
+ if (ret < 0) {
+ if (current->left) {
+ current = reinterpret_cast<prop_bt*>(to_prop_obj(current->left));
} else {
- if (!alloc_if_needed)
+ if (!alloc_if_needed) {
return NULL;
-
- bt = new_prop_bt(name, namelen, &bt->left);
+ }
+
+ // Note that there isn't a race condition here. "clients" never
+ // reach this code-path since It's only the (single threaded) server
+ // that allocates new nodes. Though "bt->left" is volatile, it can't
+ // have changed since the last value was last read.
+ uint32_t new_offset = 0;
+ prop_bt* new_bt = new_prop_bt(name, namelen, &new_offset);
+ if (new_bt) {
+ current->left = new_offset;
+ }
+ return new_bt;
}
} else {
- if (bt->right) {
- bt = to_prop_obj(bt->right);
+ if (current->right) {
+ current = reinterpret_cast<prop_bt*>(to_prop_obj(current->right));
} else {
- if (!alloc_if_needed)
+ if (!alloc_if_needed) {
return NULL;
-
- bt = new_prop_bt(name, namelen, &bt->right);
+ }
+
+ uint32_t new_offset;
+ prop_bt* new_bt = new_prop_bt(name, namelen, &new_offset);
+ if (new_bt) {
+ current->right = new_offset;
+ }
+ return new_bt;
}
}
}
}
-static const prop_info *find_property(prop_bt *trie, const char *name,
+static const prop_info *find_property(prop_bt *const trie, const char *name,
uint8_t namelen, const char *value, uint8_t valuelen,
bool alloc_if_needed)
{
- const char *remaining_name = name;
-
if (!trie) return NULL;
+ const char *remaining_name = name;
+ prop_bt* current = trie;
while (true) {
- char *sep = strchr(remaining_name, '.');
- bool want_subtree = (sep != NULL);
- uint8_t substr_size;
-
- prop_bt *root;
+ const char *sep = strchr(remaining_name, '.');
+ const bool want_subtree = (sep != NULL);
+ const uint8_t substr_size = (want_subtree) ?
+ sep - remaining_name : strlen(remaining_name);
- if (want_subtree) {
- substr_size = sep - remaining_name;
- } else {
- substr_size = strlen(remaining_name);
- }
-
- if (!substr_size)
+ if (!substr_size) {
return NULL;
+ }
- if (trie->children) {
- root = to_prop_obj(trie->children);
+ prop_bt* root = NULL;
+ if (current->children) {
+ root = reinterpret_cast<prop_bt*>(to_prop_obj(current->children));
} else if (alloc_if_needed) {
- root = new_prop_bt(remaining_name, substr_size, &trie->children);
- } else {
- root = NULL;
+ uint32_t new_bt_offset;
+ root = new_prop_bt(remaining_name, substr_size, &new_bt_offset);
+ if (root) {
+ current->children = new_bt_offset;
+ }
}
- if (!root)
+ if (!root) {
return NULL;
+ }
- trie = find_prop_bt(root, remaining_name, substr_size, alloc_if_needed);
- if (!trie)
+ current = find_prop_bt(root, remaining_name, substr_size, alloc_if_needed);
+ if (!current) {
return NULL;
+ }
if (!want_subtree)
break;
remaining_name = sep + 1;
}
- if (trie->prop) {
- return to_prop_obj(trie->prop);
+ if (current->prop) {
+ return reinterpret_cast<prop_info*>(to_prop_obj(current->prop));
} else if (alloc_if_needed) {
- return new_prop_info(name, namelen, value, valuelen, &trie->prop);
+ uint32_t new_info_offset;
+ prop_info* new_info = new_prop_info(name, namelen, value, valuelen, &new_info_offset);
+ if (new_info) {
+ current->prop = new_info_offset;
+ }
+
+ return new_info;
} else {
return NULL;
}
}
+static int send_prop_msg(const prop_msg *msg)
+{
+ const int fd = socket(AF_LOCAL, SOCK_STREAM, 0);
+ if (fd < 0) {
+ return -1;
+ }
+
+ const size_t namelen = strlen(property_service_socket);
+
+ sockaddr_un addr;
+ memset(&addr, 0, sizeof(addr));
+ strlcpy(addr.sun_path, property_service_socket, sizeof(addr.sun_path));
+ addr.sun_family = AF_LOCAL;
+ socklen_t alen = namelen + offsetof(sockaddr_un, sun_path) + 1;
+ if (TEMP_FAILURE_RETRY(connect(fd, reinterpret_cast<sockaddr*>(&addr), alen)) < 0) {
+ close(fd);
+ return -1;
+ }
+
+ const int num_bytes = TEMP_FAILURE_RETRY(send(fd, msg, sizeof(prop_msg), 0));
+
+ int result = -1;
+ if (num_bytes == sizeof(prop_msg)) {
+ // We successfully wrote to the property server but now we
+ // wait for the property server to finish its work. It
+ // acknowledges its completion by closing the socket so we
+ // poll here (on nothing), waiting for the socket to close.
+ // If you 'adb shell setprop foo bar' you'll see the POLLHUP
+ // once the socket closes. Out of paranoia we cap our poll
+ // at 250 ms.
+ pollfd pollfds[1];
+ pollfds[0].fd = fd;
+ pollfds[0].events = 0;
+ const int poll_result = TEMP_FAILURE_RETRY(poll(pollfds, 1, 250 /* ms */));
+ if (poll_result == 1 && (pollfds[0].revents & POLLHUP) != 0) {
+ result = 0;
+ } else {
+ // Ignore the timeout and treat it like a success anyway.
+ // The init process is single-threaded and its property
+ // service is sometimes slow to respond (perhaps it's off
+ // starting a child process or something) and thus this
+ // times out and the caller thinks it failed, even though
+ // it's still getting around to it. So we fake it here,
+ // mostly for ctl.* properties, but we do try and wait 250
+ // ms so callers who do read-after-write can reliably see
+ // what they've written. Most of the time.
+ // TODO: fix the system properties design.
+ result = 0;
+ }
+ }
+
+ close(fd);
+ return result;
+}
+
+static void find_nth_fn(const prop_info *pi, void *ptr)
+{
+ find_nth_cookie *cookie = reinterpret_cast<find_nth_cookie*>(ptr);
+
+ if (cookie->n == cookie->count)
+ cookie->pi = pi;
+
+ cookie->count++;
+}
+
+static int foreach_property(const uint32_t off,
+ void (*propfn)(const prop_info *pi, void *cookie), void *cookie)
+{
+ prop_bt *trie = reinterpret_cast<prop_bt*>(to_prop_obj(off));
+ if (!trie)
+ return -1;
+
+ if (trie->left) {
+ const int err = foreach_property(trie->left, propfn, cookie);
+ if (err < 0)
+ return -1;
+ }
+ if (trie->prop) {
+ prop_info *info = reinterpret_cast<prop_info*>(to_prop_obj(trie->prop));
+ if (!info)
+ return -1;
+ propfn(info, cookie);
+ }
+ if (trie->children) {
+ const int err = foreach_property(trie->children, propfn, cookie);
+ if (err < 0)
+ return -1;
+ }
+ if (trie->right) {
+ const int err = foreach_property(trie->right, propfn, cookie);
+ if (err < 0)
+ return -1;
+ }
+
+ return 0;
+}
+
+int __system_properties_init()
+{
+ return map_prop_area();
+}
+
+int __system_property_set_filename(const char *filename)
+{
+ size_t len = strlen(filename);
+ if (len >= sizeof(property_filename))
+ return -1;
+
+ strcpy(property_filename, filename);
+ return 0;
+}
+
+int __system_property_area_init()
+{
+ return map_prop_area_rw();
+}
+
const prop_info *__system_property_find(const char *name)
{
if (__predict_false(compat_mode)) {
{
const prop_info *pi = __system_property_find(name);
- if(pi != 0) {
+ if (pi != 0) {
return __system_property_read(pi, 0, value);
} else {
value[0] = 0;
}
}
-
-static int send_prop_msg(prop_msg *msg)
-{
- struct pollfd pollfds[1];
- struct sockaddr_un addr;
- socklen_t alen;
- size_t namelen;
- int s;
- int r;
- int result = -1;
-
- s = socket(AF_LOCAL, SOCK_STREAM, 0);
- if(s < 0) {
- return result;
- }
-
- memset(&addr, 0, sizeof(addr));
- namelen = strlen(property_service_socket);
- strlcpy(addr.sun_path, property_service_socket, sizeof addr.sun_path);
- addr.sun_family = AF_LOCAL;
- alen = namelen + offsetof(struct sockaddr_un, sun_path) + 1;
-
- if(TEMP_FAILURE_RETRY(connect(s, (struct sockaddr *) &addr, alen)) < 0) {
- close(s);
- return result;
- }
-
- r = TEMP_FAILURE_RETRY(send(s, msg, sizeof(prop_msg), 0));
-
- if(r == sizeof(prop_msg)) {
- // We successfully wrote to the property server but now we
- // wait for the property server to finish its work. It
- // acknowledges its completion by closing the socket so we
- // poll here (on nothing), waiting for the socket to close.
- // If you 'adb shell setprop foo bar' you'll see the POLLHUP
- // once the socket closes. Out of paranoia we cap our poll
- // at 250 ms.
- pollfds[0].fd = s;
- pollfds[0].events = 0;
- r = TEMP_FAILURE_RETRY(poll(pollfds, 1, 250 /* ms */));
- if (r == 1 && (pollfds[0].revents & POLLHUP) != 0) {
- result = 0;
- } else {
- // Ignore the timeout and treat it like a success anyway.
- // The init process is single-threaded and its property
- // service is sometimes slow to respond (perhaps it's off
- // starting a child process or something) and thus this
- // times out and the caller thinks it failed, even though
- // it's still getting around to it. So we fake it here,
- // mostly for ctl.* properties, but we do try and wait 250
- // ms so callers who do read-after-write can reliably see
- // what they've written. Most of the time.
- // TODO: fix the system properties design.
- result = 0;
- }
- }
-
- close(s);
- return result;
-}
-
int __system_property_set(const char *key, const char *value)
{
- int err;
- prop_msg msg;
-
- if(key == 0) return -1;
- if(value == 0) value = "";
- if(strlen(key) >= PROP_NAME_MAX) return -1;
- if(strlen(value) >= PROP_VALUE_MAX) return -1;
+ if (key == 0) return -1;
+ if (value == 0) value = "";
+ if (strlen(key) >= PROP_NAME_MAX) return -1;
+ if (strlen(value) >= PROP_VALUE_MAX) return -1;
+ prop_msg msg;
memset(&msg, 0, sizeof msg);
msg.cmd = PROP_MSG_SETPROP;
strlcpy(msg.name, key, sizeof msg.name);
strlcpy(msg.value, value, sizeof msg.value);
- err = send_prop_msg(&msg);
- if(err < 0) {
+ const int err = send_prop_msg(&msg);
+ if (err < 0) {
return err;
}
int __system_property_wait(const prop_info *pi)
{
- unsigned n;
- if(pi == 0) {
+ if (pi == 0) {
prop_area *pa = __system_property_area__;
- n = pa->serial;
+ const uint32_t n = pa->serial;
do {
__futex_wait(&pa->serial, n, NULL);
- } while(n == pa->serial);
+ } while (n == pa->serial);
} else {
- n = pi->serial;
+ const uint32_t n = pi->serial;
do {
__futex_wait((volatile void *)&pi->serial, n, NULL);
} while(n == pi->serial);
@@ -602,7 +702,6 @@ int __system_property_update(prop_info *pi, const char *value, unsigned int len)
return 0;
}
-
int __system_property_add(const char *name, unsigned int namelen,
const char *value, unsigned int valuelen)
{
return pa->serial;
}
-struct find_nth_cookie {
- unsigned count;
- unsigned n;
- const prop_info *pi;
-};
-
-static void find_nth_fn(const prop_info *pi, void *ptr)
-{
- struct find_nth_cookie *cookie = ptr;
-
- if (cookie->n == cookie->count)
- cookie->pi = pi;
-
- cookie->count++;
-}
-
const prop_info *__system_property_find_nth(unsigned n)
{
- struct find_nth_cookie cookie;
- int err;
+ find_nth_cookie cookie(n);
- memset(&cookie, 0, sizeof(cookie));
- cookie.n = n;
-
- err = __system_property_foreach(find_nth_fn, &cookie);
- if (err < 0)
+ const int err = __system_property_foreach(find_nth_fn, &cookie);
+ if (err < 0) {
return NULL;
-
- return cookie.pi;
-}
-
-static int foreach_property(prop_off_t off,
- void (*propfn)(const prop_info *pi, void *cookie), void *cookie)
-{
- prop_bt *trie = to_prop_obj(off);
- if (!trie)
- return -1;
-
- if (trie->left) {
- int err = foreach_property(trie->left, propfn, cookie);
- if (err < 0)
- return -1;
- }
- if (trie->prop) {
- prop_info *info = to_prop_obj(trie->prop);
- if (!info)
- return -1;
- propfn(info, cookie);
- }
- if (trie->children) {
- int err = foreach_property(trie->children, propfn, cookie);
- if (err < 0)
- return -1;
- }
- if (trie->right) {
- int err = foreach_property(trie->right, propfn, cookie);
- if (err < 0)
- return -1;
}
- return 0;
+ return cookie.pi;
}
int __system_property_foreach(void (*propfn)(const prop_info *pi, void *cookie),
@@ -709,6 +757,7 @@ int __system_property_foreach(void (*propfn)(const prop_info *pi, void *cookie),
{
if (__predict_false(compat_mode)) {
return __system_property_foreach_compat(propfn, cookie);
- }
+ }
+
return foreach_property(0, propfn, cookie);
}
diff --git a/libc/include/limits.h b/libc/include/limits.h
index b9d43545007a14f90a2a94cd6bf501758e990e93..471d380095a30f1f240a7785afa910a1aa0bdfb9 100644 (file)
--- a/libc/include/limits.h
+++ b/libc/include/limits.h
#define ULONG_LONG_MAX ULLONG_MAX
#endif
+/* New code should use sysconf(_SC_PAGE_SIZE) instead. */
+#ifndef PAGE_SIZE
+#define PAGE_SIZE 4096
+#endif
#ifndef PAGESIZE
-#include <asm/page.h>
#define PAGESIZE PAGE_SIZE
#endif
+/* glibc's PAGE_MASK is the bitwise negation of BSD's! TODO: remove? */
+#define PAGE_MASK (~(PAGE_SIZE - 1))
+
#endif /* !_LIMITS_H_ */
index 5eee7f09700bb36030c3c9d981ea40818eb78ea5..5a681df725956391dc0ca1d3f9c16710018f7f98 100644 (file)
void (*propfn)(const prop_info *pi, void *cookie),
void *cookie);
+/* Initialize the system properties area in read only mode.
+ * Should be done by all processes that need to read system
+ * properties.
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int __system_properties_init();
+
__END_DECLS
#endif
index 7c5f8d774a4f2ab2012fa84e883a58fe7aaf2fb7..5a8c9858fe5b4a7846f776ae92cbfd947d60ac65 100644 (file)
--- a/libc/include/sys/mman.h
+++ b/libc/include/sys/mman.h
#include <sys/cdefs.h>
#include <sys/types.h>
#include <asm/mman.h>
-#include <asm/page.h>
__BEGIN_DECLS
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
-extern void* mmap(void *, size_t, int, int, int, off_t);
-extern void* mmap64(void *, size_t, int, int, int, off64_t);
-extern int munmap(void *, size_t);
-extern int msync(const void *, size_t, int);
-extern int mprotect(const void *, size_t, int);
-extern void* mremap(void *, size_t, size_t, unsigned long);
+extern void* mmap(void*, size_t, int, int, int, off_t);
+extern void* mmap64(void*, size_t, int, int, int, off64_t);
+extern int munmap(void*, size_t);
+extern int msync(const void*, size_t, int);
+extern int mprotect(const void*, size_t, int);
+extern void* mremap(void*, size_t, size_t, unsigned long);
-extern int mlockall(int);
-extern int munlockall(void);
-extern int mlock(const void *, size_t);
-extern int munlock(const void *, size_t);
-extern int madvise(const void *, size_t, int);
+extern int mlockall(int);
+extern int munlockall(void);
+extern int mlock(const void*, size_t);
+extern int munlock(const void*, size_t);
+extern int madvise(const void*, size_t, int);
-extern int mlock(const void *addr, size_t len);
-extern int munlock(const void *addr, size_t len);
+extern int mlock(const void*, size_t);
+extern int munlock(const void*, size_t);
-extern int mincore(void* start, size_t length, unsigned char* vec);
+extern int mincore(void*, size_t, unsigned char*);
__END_DECLS
index 90cce80835b8951b44173eb7e75afb7d0e1179c4..e16b1a55c55430be3733d8895acc5ee926153f17 100644 (file)
--- a/libc/include/sys/user.h
+++ b/libc/include/sys/user.h
#define _SYS_USER_H_
#include <sys/cdefs.h>
+#include <limits.h> /* For PAGE_SIZE. */
__BEGIN_DECLS
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 70cc4c54931a0e564a3111af94835aa00e954f46..d21f23d3ff0f6b90298d7167d7bf1e49163159b9 100644 (file)
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
extern int execv(const char *, char * const *);
extern int execvp(const char *, char * const *);
+extern int execvpe(const char *, char * const *, char * const *);
extern int execve(const char *, char * const *, char * const *);
extern int execl(const char *, const char *, ...);
extern int execlp(const char *, const char *, ...);
extern int tcsetpgrp(int fd, pid_t _pid);
#if 0 /* MISSING FROM BIONIC */
-extern int execvpe(const char *, char * const *, char * const *);
extern int execlpe(const char *, const char *, ...);
extern int getfsuid(uid_t);
extern int setfsuid(uid_t);
diff --git a/libc/netbsd/resolv/res_compat.c b/libc/netbsd/resolv/res_compat.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $NetBSD: res_compat.c,v 1.1 2004/06/09 18:07:03 christos Exp $ */
-
-/*-
- * Copyright (c) 2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * 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. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: res_compat.c,v 1.1 2004/06/09 18:07:03 christos Exp $");
-#endif
-
-#include <sys/types.h>
-#include <arpa/inet.h>
-#include "arpa_nameser.h"
-#include <netdb.h>
-#include <string.h>
-#define __OLD_RES_STATE
-#ifdef ANDROID_CHANGES
-#include "resolv_private.h"
-#else
-#include "resolv.h"
-#endif
-
-#undef _res
-
-/*
- * Binary Compatibility; this symbol does not appear in a header file
- * Most userland programs use this to set res_options before res_init()
- * is called. There are hooks to res_init() to consult the data in this
- * structure. The hooks are provided indirectly by the two functions below.
- * We depend on the fact the the first 440 [32 bit machines] bytes are
- * shared between the two structures.
- */
-#ifndef __BIND_NOSTATIC
-struct __res_state _res
-#if defined(__BIND_RES_TEXT)
- = { RES_TIMEOUT, } /* Motorola, et al. */
-# endif
-;
-
-void *__res_get_old_state(void);
-void __res_put_old_state(void *);
-
-void *
-__res_get_old_state(void)
-{
- return &_res;
-}
-
-void
-__res_put_old_state(void *res)
-{
- (void)memcpy(&_res, res, sizeof(_res));
-}
-#endif
diff --git a/libc/netbsd/resolv/res_random.c b/libc/netbsd/resolv/res_random.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* $OpenBSD: res_random.c,v 1.17 2008/04/13 00:28:35 djm Exp $ */
-
-/*
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- * Copyright 2008 Damien Miller <djm@openbsd.org>
- * Copyright 2008 Android Open Source Project (thread-safety)
- * All rights reserved.
- *
- * Theo de Raadt <deraadt@openbsd.org> came up with the idea of using
- * such a mathematical system to generate more random (yet non-repeating)
- * ids to solve the resolver/named problem. But Niels designed the
- * actual system based on the constraints.
- *
- * Later modified by Damien Miller to wrap the LCG output in a 15-bit
- * permutation generator based on a Luby-Rackoff block cipher. This
- * ensures the output is non-repeating and preserves the MSB twiddle
- * trick, but makes it more resistant to LCG prediction.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-/*
- * seed = random 15bit
- * n = prime, g0 = generator to n,
- * j = random so that gcd(j,n-1) == 1
- * g = g0^j mod n will be a generator again.
- *
- * X[0] = random seed.
- * X[n] = a*X[n-1]+b mod m is a Linear Congruential Generator
- * with a = 7^(even random) mod m,
- * b = random with gcd(b,m) == 1
- * m = 31104 and a maximal period of m-1.
- *
- * The transaction id is determined by:
- * id[n] = seed xor (g^X[n] mod n)
- *
- * Effectivly the id is restricted to the lower 15 bits, thus
- * yielding two different cycles by toggling the msb on and off.
- * This avoids reuse issues caused by reseeding.
- *
- * The output of this generator is then randomly permuted though a
- * custom 15 bit Luby-Rackoff block cipher.
- */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <sys/time.h>
-#include "resolv_private.h"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* BIONIC-BEGIN */
-static pthread_mutex_t _res_random_lock = PTHREAD_MUTEX_INITIALIZER;
-#define _RES_RANDOM_LOCK() pthread_mutex_lock(&_res_random_lock)
-#define _RES_RANDOM_UNLOCK() pthread_mutex_unlock(&_res_random_lock)
-/* BIONIC-END */
-
-#define RU_OUT 180 /* Time after wich will be reseeded */
-#define RU_MAX 30000 /* Uniq cycle, avoid blackjack prediction */
-#define RU_GEN 2 /* Starting generator */
-#define RU_N 32749 /* RU_N-1 = 2*2*3*2729 */
-#define RU_AGEN 7 /* determine ru_a as RU_AGEN^(2*rand) */
-#define RU_M 31104 /* RU_M = 2^7*3^5 - don't change */
-#define RU_ROUNDS 11 /* Number of rounds for permute (odd) */
-
-struct prf_ctx {
- /* PRF lookup table for odd rounds (7 bits input to 8 bits output) */
- u_char prf7[(RU_ROUNDS / 2) * (1 << 7)];
-
- /* PRF lookup table for even rounds (8 bits input to 7 bits output) */
- u_char prf8[((RU_ROUNDS + 1) / 2) * (1 << 8)];
-};
-
-#define PFAC_N 3
-const static u_int16_t pfacts[PFAC_N] = {
- 2,
- 3,
- 2729
-};
-
-static u_int16_t ru_x;
-static u_int16_t ru_seed, ru_seed2;
-static u_int16_t ru_a, ru_b;
-static u_int16_t ru_g;
-static u_int16_t ru_counter = 0;
-static u_int16_t ru_msb = 0;
-static struct prf_ctx *ru_prf = NULL;
-static long ru_reseed;
-
-static u_int16_t pmod(u_int16_t, u_int16_t, u_int16_t);
-static void res_initid(void);
-
-/*
- * Do a fast modular exponation, returned value will be in the range
- * of 0 - (mod-1)
- */
-static u_int16_t
-pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod)
-{
- u_int16_t s, t, u;
-
- s = 1;
- t = gen;
- u = exp;
-
- while (u) {
- if (u & 1)
- s = (s * t) % mod;
- u >>= 1;
- t = (t * t) % mod;
- }
- return (s);
-}
-
-/*
- * 15-bit permutation based on Luby-Rackoff block cipher
- */
-u_int
-permute15(u_int in)
-{
- int i;
- u_int left, right, tmp;
-
- if (ru_prf == NULL)
- return in;
-
- left = (in >> 8) & 0x7f;
- right = in & 0xff;
-
- /*
- * Each round swaps the width of left and right. Even rounds have
- * a 7-bit left, odd rounds have an 8-bit left. Since this uses an
- * odd number of rounds, left is always 8 bits wide at the end.
- */
- for (i = 0; i < RU_ROUNDS; i++) {
- if ((i & 1) == 0)
- tmp = ru_prf->prf8[(i << (8 - 1)) | right] & 0x7f;
- else
- tmp = ru_prf->prf7[((i - 1) << (7 - 1)) | right];
- tmp ^= left;
- left = right;
- right = tmp;
- }
-
- return (right << 8) | left;
-}
-
-/*
- * Initializes the seed and chooses a suitable generator. Also toggles
- * the msb flag. The msb flag is used to generate two distinct
- * cycles of random numbers and thus avoiding reuse of ids.
- *
- * This function is called from res_randomid() when needed, an
- * application does not have to worry about it.
- */
-static void
-res_initid(void)
-{
- u_int16_t j, i;
- u_int32_t tmp;
- int noprime = 1;
- struct timeval tv;
-
- ru_x = arc4random_uniform(RU_M);
-
- /* 15 bits of random seed */
- tmp = arc4random();
- ru_seed = (tmp >> 16) & 0x7FFF;
- ru_seed2 = tmp & 0x7FFF;
-
- /* Determine the LCG we use */
- tmp = arc4random();
- ru_b = (tmp & 0xfffe) | 1;
- ru_a = pmod(RU_AGEN, (tmp >> 16) & 0xfffe, RU_M);
- while (ru_b % 3 == 0)
- ru_b += 2;
-
- j = arc4random_uniform(RU_N);
-
- /*
- * Do a fast gcd(j,RU_N-1), so we can find a j with
- * gcd(j, RU_N-1) == 1, giving a new generator for
- * RU_GEN^j mod RU_N
- */
-
- while (noprime) {
- for (i = 0; i < PFAC_N; i++)
- if (j % pfacts[i] == 0)
- break;
-
- if (i >= PFAC_N)
- noprime = 0;
- else
- j = (j + 1) % RU_N;
- }
-
- ru_g = pmod(RU_GEN, j, RU_N);
- ru_counter = 0;
-
- /* Initialise PRF for Luby-Rackoff permutation */
- if (ru_prf == NULL)
- ru_prf = malloc(sizeof(*ru_prf));
- if (ru_prf != NULL)
- arc4random_buf(ru_prf, sizeof(*ru_prf));
-
- gettimeofday(&tv, NULL);
- ru_reseed = tv.tv_sec + RU_OUT;
- ru_msb = ru_msb == 0x8000 ? 0 : 0x8000;
-}
-
-u_int
-res_randomid(void)
-{
- struct timeval tv;
- u_int result;
-
- _RES_RANDOM_LOCK()
- gettimeofday(&tv, NULL);
- if (ru_counter >= RU_MAX || tv.tv_sec > ru_reseed)
- res_initid();
-
- /* Linear Congruential Generator */
- ru_x = (ru_a * ru_x + ru_b) % RU_M;
- ru_counter++;
-
- result = permute15(ru_seed ^ pmod(ru_g, ru_seed2 + ru_x, RU_N)) | ru_msb;
- _RES_RANDOM_UNLOCK()
- return result;
-}
-
-#if 0
-int
-main(int argc, char **argv)
-{
- int i, n;
- u_int16_t wert;
-
- res_initid();
-
- printf("Generator: %u\n", ru_g);
- printf("Seed: %u\n", ru_seed);
- printf("Reseed at %ld\n", ru_reseed);
- printf("Ru_X: %u\n", ru_x);
- printf("Ru_A: %u\n", ru_a);
- printf("Ru_B: %u\n", ru_b);
-
- n = argc > 1 ? atoi(argv[1]) : 60001;
- for (i=0;i<n;i++) {
- wert = res_randomid();
- printf("%u\n", wert);
- }
- return 0;
-}
-#endif
-
index 803ff29fceb45dfa825742a9c65db0fbc90f2291..7c2686f3869843b172a8cc0f436f457857b15d45 100644 (file)
#ifndef _PRIVATE_BIONIC_ASM_H_
#define _PRIVATE_BIONIC_ASM_H_
-#if !defined(__mips__)
-/* <machine/asm.h> causes trouble on mips by including regdefs.h. */
-#include <machine/asm.h>
-#endif
-
#include <asm/unistd.h> /* For system call numbers. */
#define MAX_ERRNO 4095 /* For recognizing system call error returns. */
-/* TODO: add ENTRY_PRIVATE. */
-/* TODO: add ASM_ALIAS macro. */
+#define __bionic_asm_custom_entry(f)
+#define __bionic_asm_custom_end(f)
+#define __bionic_asm_function_type @function
+
+#include <machine/asm.h>
+
+#define ENTRY(f) \
+ .text; \
+ .globl f; \
+ _ALIGN_TEXT; \
+ .type f, __bionic_asm_function_type; \
+ f: \
+ __bionic_asm_custom_entry(f); \
+ .cfi_startproc \
+
+#define END(f) \
+ .cfi_endproc; \
+ .size f, .-f; \
+ __bionic_asm_custom_end(f) \
+
+/* Like ENTRY, but with hidden visibility. */
+#define ENTRY_PRIVATE(f) \
+ ENTRY(f); \
+ .hidden f \
#endif /* _PRIVATE_BIONIC_ASM_H_ */
diff --git a/libc/tools/genlibgcc_compat.py b/libc/tools/genlibgcc_compat.py
--- /dev/null
@@ -0,0 +1,144 @@
+#!/usr/bin/python
+
+'''
+/* This file generates libgcc_compat.c file that contains dummy
+ * references to libgcc.a functions to force the dynamic linker
+ * to copy their definition into the final libc.so binary.
+ *
+ * They are required to ensure backwards binary compatibility with
+ * libc.so provided by the platform and binaries built with the NDK or
+ * different versions/configurations of toolchains.
+ *
+ * Now, for a more elaborate description of the issue:
+ *
+ * libgcc.a is a compiler-specific library containing various helper
+ * functions used to implement certain operations that are not necessarily
+ * supported by the target CPU. For example, integer division doesn't have a
+ * corresponding CPU instruction on ARMv5, and is instead implemented in the
+ * compiler-generated machine code as a call to an __idiv helper function.
+ *
+ * Normally, one has to place libgcc.a in the link command used to generate
+ * target binaries (shared libraries and executables) after all objects and
+ * static libraries, but before dependent shared libraries, i.e. something
+ * like:
+ * gcc <options> -o libfoo.so foo.a libgcc.a -lc -lm
+ *
+ * This ensures that any helper function needed by the code in foo.a is copied
+ * into the final libfoo.so. However, doing so will link a bunch of other __cxa
+ * functions from libgcc.a into each .so and executable, causing 4k+ increase
+ * in every binary. Therefore the Android platform build system has been
+ * using this instead:
+ *
+ * gcc <options> -o libfoo.so foo.a -lc -lm libgcc.a
+ *
+ * The problem with this is that if one helper function needed by foo.a has
+ * already been copied into libc.so or libm.so, then nothing will be copied
+ * into libfoo.so. Instead, a symbol import definition will be added to it
+ * so libfoo.so can directly call the one in libc.so at runtime.
+ *
+ * When refreshing toolchains for new versions or using different architecture
+ * flags, the set of helper functions copied to libc.so may change, which
+ * resulted in some native shared libraries generated with the NDK or prebuilts
+ * from vendors to fail to load properly.
+ *
+ * The NDK has been fixed after 1.6_r1 to use the correct link command, so
+ * any native shared library generated with it should now be safe from that
+ * problem. On the other hand, existing shared libraries distributed with
+ * applications that were generated with a previous version of the NDK
+ * still need all 1.5/1.6 helper functions in libc.so and libm.so
+ *
+ * After 3.2, the toolchain was updated again, adding __aeabi_f2uiz to the
+ * list of requirements. Technically, this is due to mis-linked NDK libraries
+ * but it is easier to add a single function here than asking several app
+ * developers to fix their build.
+ *
+ * The __aeabi_idiv function is added to the list since cortex-a15 supports
+ * HW idiv instructions so the system libc.so doesn't pull in the reference to
+ * __aeabi_idiv but legacy libraries built against cortex-a9 targets still need
+ * it.
+ *
+ * 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,
+ * since libm.so depends on libc.so, it's easier to put all of
+ * these in libc.so instead, since the dynamic linker will always
+ * search in libc.so before libm.so for dependencies.
+ */
+'''
+
+import os
+import sys
+import subprocess
+import tempfile
+import re
+
+libgcc_compat_header = "/* Generated by genlibgcc_compat.py */\n" + \
+"""
+#define COMPAT_FUNCTIONS_LIST \\
+"""
+
+libgcc_compat_footer = """
+
+#define XX(f) extern void f(void);
+COMPAT_FUNCTIONS_LIST
+#undef XX
+
+void __bionic_libgcc_compat_hooks(void) {
+#define XX(f) f();
+COMPAT_FUNCTIONS_LIST
+#undef XX
+}
+"""
+
+class Generator:
+ def process(self):
+ android_build_top_path = os.environ["ANDROID_BUILD_TOP"]
+ build_path = android_build_top_path + "/bionic/libc"
+ file_name = "libgcc_compat.c"
+ file_path = build_path + "/arch-arm/bionic/" + file_name
+
+ print "* ANDROID_BUILD_TOP=" + android_build_top_path
+
+ # Check TARGET_ARCH
+ arch = subprocess.check_output(["CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make --no-print-directory -f build/core/config.mk dumpvar-TARGET_ARCH"],
+ cwd=android_build_top_path, shell=True).strip()
+
+ if arch != 'arm':
+ sys.exit("Error: Invalid TARGET_ARCH='" + arch + "' expecting 'arm'")
+
+ build_output_file_path = tempfile.mkstemp()[1]
+
+ p = subprocess.Popen(["ONE_SHOT_MAKEFILE=bionic/libc/Android.mk make -C " + android_build_top_path
+ + " -f build/core/main.mk all_modules TARGET_LIBGCC= -j20 -B 2>&1 | tee " + build_output_file_path],
+ cwd=build_path, shell=True)
+ p.wait()
+
+ print "* Build complete, logfile: " + build_output_file_path
+
+ func_set = set()
+ prog=re.compile("(?<=undefined reference to ')\w+")
+ fd = open(build_output_file_path, 'r')
+ for line in fd:
+ m = prog.search(line)
+ if m:
+ func_set.add(m.group(0))
+
+ fd.close()
+
+ func_list = sorted(func_set)
+
+ print "* Found " + repr(len(func_list)) + " referenced functions: " + repr(func_list)
+
+ if 0 == len(func_list):
+ sys.exit("Error: function list is empty, please check the build log: " + build_output_file_path)
+
+ print "* Generating " + file_path
+ fres = open(file_path, 'w')
+ fres.write(libgcc_compat_header)
+ for func_name in func_list:
+ fres.write(" XX("+func_name+") \\\n")
+ fres.write(libgcc_compat_footer)
+ fres.close()
+
+generator = Generator()
+generator.process()
+
index 6388ee18db25d71e51cc944df5615a06203565c0..8a5f3d2e067415f5f99e5ee0e4cefa7803f3506e 100755 (executable)
# MIPS assembler templates for each syscall stub
#
-mips_call = "/* " + warning + " */\n" + \
-"""
-#include <asm/unistd.h>
- .text
- .globl %(func)s
- .align 4
- .ent %(func)s
-
-%(func)s:
+mips_call = syscall_stub_header + """\
.set noreorder
- .cpload $t9
- li $v0, %(__NR_name)s
+ .cpload t9
+ li v0, %(__NR_name)s
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end %(func)s
+END(%(func)s)
"""
# MIPS64 assembler templates for each syscall stub
#
-mips64_call = "/* " + warning + " */\n" + \
-"""
-#include <asm/unistd.h>
-#include <machine/asm.h>
-#include <machine/regdef.h>
- .text
- .globl %(func)s
- .align 4
- .ent %(func)s
-
-%(func)s:
+mips64_call = syscall_stub_header + """\
.set push
.set noreorder
li v0, %(__NR_name)s
j t9
move ra, t0
.set pop
- .end %(func)s
+END(%(func)s)
"""
# Use hidden visibility for any functions beginning with underscores.
if pointer_length == 64 and syscall["func"].startswith("__"):
- stub += '.hidden _C_LABEL(' + syscall["func"] + ')\n'
+ stub += '.hidden ' + syscall["func"] + '\n'
return stub
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/ftw.c
rename to libc/upstream-netbsd/lib/libc/gen/ftw.c
rename from libc/upstream-netbsd/libc/gen/ftw.c
rename to libc/upstream-netbsd/lib/libc/gen/ftw.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/nftw.c
rename to libc/upstream-netbsd/lib/libc/gen/nftw.c
rename from libc/upstream-netbsd/libc/gen/nftw.c
rename to libc/upstream-netbsd/lib/libc/gen/nftw.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/nice.c
rename to libc/upstream-netbsd/lib/libc/gen/nice.c
rename from libc/upstream-netbsd/libc/gen/nice.c
rename to libc/upstream-netbsd/lib/libc/gen/nice.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/popen.c
rename to libc/upstream-netbsd/lib/libc/gen/popen.c
rename from libc/upstream-netbsd/libc/gen/popen.c
rename to libc/upstream-netbsd/lib/libc/gen/popen.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/psignal.c
rename to libc/upstream-netbsd/lib/libc/gen/psignal.c
rename from libc/upstream-netbsd/libc/gen/psignal.c
rename to libc/upstream-netbsd/lib/libc/gen/psignal.c
diff --git a/libc/upstream-netbsd/libc/gen/setjmperr.c b/libc/upstream-netbsd/lib/libc/gen/setjmperr.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/setjmperr.c
rename to libc/upstream-netbsd/lib/libc/gen/setjmperr.c
rename from libc/upstream-netbsd/libc/gen/setjmperr.c
rename to libc/upstream-netbsd/lib/libc/gen/setjmperr.c
similarity index 100%
rename from libc/upstream-netbsd/libc/gen/utime.c
rename to libc/upstream-netbsd/lib/libc/gen/utime.c
rename from libc/upstream-netbsd/libc/gen/utime.c
rename to libc/upstream-netbsd/lib/libc/gen/utime.c
diff --git a/libc/upstream-netbsd/libc/include/isc/assertions.h b/libc/upstream-netbsd/lib/libc/include/isc/assertions.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/assertions.h
rename to libc/upstream-netbsd/lib/libc/include/isc/assertions.h
rename from libc/upstream-netbsd/libc/include/isc/assertions.h
rename to libc/upstream-netbsd/lib/libc/include/isc/assertions.h
diff --git a/libc/upstream-netbsd/libc/include/isc/dst.h b/libc/upstream-netbsd/lib/libc/include/isc/dst.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/dst.h
rename to libc/upstream-netbsd/lib/libc/include/isc/dst.h
rename from libc/upstream-netbsd/libc/include/isc/dst.h
rename to libc/upstream-netbsd/lib/libc/include/isc/dst.h
diff --git a/libc/upstream-netbsd/libc/include/isc/eventlib.h b/libc/upstream-netbsd/lib/libc/include/isc/eventlib.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/eventlib.h
rename to libc/upstream-netbsd/lib/libc/include/isc/eventlib.h
rename from libc/upstream-netbsd/libc/include/isc/eventlib.h
rename to libc/upstream-netbsd/lib/libc/include/isc/eventlib.h
diff --git a/libc/upstream-netbsd/libc/include/isc/heap.h b/libc/upstream-netbsd/lib/libc/include/isc/heap.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/heap.h
rename to libc/upstream-netbsd/lib/libc/include/isc/heap.h
rename from libc/upstream-netbsd/libc/include/isc/heap.h
rename to libc/upstream-netbsd/lib/libc/include/isc/heap.h
diff --git a/libc/upstream-netbsd/libc/include/isc/list.h b/libc/upstream-netbsd/lib/libc/include/isc/list.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/list.h
rename to libc/upstream-netbsd/lib/libc/include/isc/list.h
rename from libc/upstream-netbsd/libc/include/isc/list.h
rename to libc/upstream-netbsd/lib/libc/include/isc/list.h
diff --git a/libc/upstream-netbsd/libc/include/isc/memcluster.h b/libc/upstream-netbsd/lib/libc/include/isc/memcluster.h
similarity index 100%
rename from libc/upstream-netbsd/libc/include/isc/memcluster.h
rename to libc/upstream-netbsd/lib/libc/include/isc/memcluster.h
rename from libc/upstream-netbsd/libc/include/isc/memcluster.h
rename to libc/upstream-netbsd/lib/libc/include/isc/memcluster.h
diff --git a/libc/upstream-netbsd/libc/inet/inet_ntoa.c b/libc/upstream-netbsd/lib/libc/inet/inet_ntoa.c
similarity index 100%
rename from libc/upstream-netbsd/libc/inet/inet_ntoa.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_ntoa.c
rename from libc/upstream-netbsd/libc/inet/inet_ntoa.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_ntoa.c
diff --git a/libc/upstream-netbsd/libc/inet/inet_ntop.c b/libc/upstream-netbsd/lib/libc/inet/inet_ntop.c
similarity index 100%
rename from libc/upstream-netbsd/libc/inet/inet_ntop.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_ntop.c
rename from libc/upstream-netbsd/libc/inet/inet_ntop.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_ntop.c
diff --git a/libc/upstream-netbsd/libc/inet/inet_pton.c b/libc/upstream-netbsd/lib/libc/inet/inet_pton.c
similarity index 100%
rename from libc/upstream-netbsd/libc/inet/inet_pton.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_pton.c
rename from libc/upstream-netbsd/libc/inet/inet_pton.c
rename to libc/upstream-netbsd/lib/libc/inet/inet_pton.c
diff --git a/libc/upstream-netbsd/libc/isc/ev_streams.c b/libc/upstream-netbsd/lib/libc/isc/ev_streams.c
similarity index 100%
rename from libc/upstream-netbsd/libc/isc/ev_streams.c
rename to libc/upstream-netbsd/lib/libc/isc/ev_streams.c
rename from libc/upstream-netbsd/libc/isc/ev_streams.c
rename to libc/upstream-netbsd/lib/libc/isc/ev_streams.c
diff --git a/libc/upstream-netbsd/libc/isc/ev_timers.c b/libc/upstream-netbsd/lib/libc/isc/ev_timers.c
similarity index 100%
rename from libc/upstream-netbsd/libc/isc/ev_timers.c
rename to libc/upstream-netbsd/lib/libc/isc/ev_timers.c
rename from libc/upstream-netbsd/libc/isc/ev_timers.c
rename to libc/upstream-netbsd/lib/libc/isc/ev_timers.c
diff --git a/libc/upstream-netbsd/libc/isc/eventlib_p.h b/libc/upstream-netbsd/lib/libc/isc/eventlib_p.h
similarity index 100%
rename from libc/upstream-netbsd/libc/isc/eventlib_p.h
rename to libc/upstream-netbsd/lib/libc/isc/eventlib_p.h
rename from libc/upstream-netbsd/libc/isc/eventlib_p.h
rename to libc/upstream-netbsd/lib/libc/isc/eventlib_p.h
diff --git a/libc/upstream-netbsd/libc/regex/cclass.h b/libc/upstream-netbsd/lib/libc/regex/cclass.h
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/cclass.h
rename to libc/upstream-netbsd/lib/libc/regex/cclass.h
rename from libc/upstream-netbsd/libc/regex/cclass.h
rename to libc/upstream-netbsd/lib/libc/regex/cclass.h
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/cname.h
rename to libc/upstream-netbsd/lib/libc/regex/cname.h
rename from libc/upstream-netbsd/libc/regex/cname.h
rename to libc/upstream-netbsd/lib/libc/regex/cname.h
diff --git a/libc/upstream-netbsd/libc/regex/engine.c b/libc/upstream-netbsd/lib/libc/regex/engine.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/engine.c
rename to libc/upstream-netbsd/lib/libc/regex/engine.c
rename from libc/upstream-netbsd/libc/regex/engine.c
rename to libc/upstream-netbsd/lib/libc/regex/engine.c
diff --git a/libc/upstream-netbsd/libc/regex/regcomp.c b/libc/upstream-netbsd/lib/libc/regex/regcomp.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/regcomp.c
rename to libc/upstream-netbsd/lib/libc/regex/regcomp.c
rename from libc/upstream-netbsd/libc/regex/regcomp.c
rename to libc/upstream-netbsd/lib/libc/regex/regcomp.c
diff --git a/libc/upstream-netbsd/libc/regex/regerror.c b/libc/upstream-netbsd/lib/libc/regex/regerror.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/regerror.c
rename to libc/upstream-netbsd/lib/libc/regex/regerror.c
rename from libc/upstream-netbsd/libc/regex/regerror.c
rename to libc/upstream-netbsd/lib/libc/regex/regerror.c
diff --git a/libc/upstream-netbsd/libc/regex/regex2.h b/libc/upstream-netbsd/lib/libc/regex/regex2.h
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/regex2.h
rename to libc/upstream-netbsd/lib/libc/regex/regex2.h
rename from libc/upstream-netbsd/libc/regex/regex2.h
rename to libc/upstream-netbsd/lib/libc/regex/regex2.h
diff --git a/libc/upstream-netbsd/libc/regex/regexec.c b/libc/upstream-netbsd/lib/libc/regex/regexec.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/regexec.c
rename to libc/upstream-netbsd/lib/libc/regex/regexec.c
rename from libc/upstream-netbsd/libc/regex/regexec.c
rename to libc/upstream-netbsd/lib/libc/regex/regexec.c
diff --git a/libc/upstream-netbsd/libc/regex/regfree.c b/libc/upstream-netbsd/lib/libc/regex/regfree.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/regfree.c
rename to libc/upstream-netbsd/lib/libc/regex/regfree.c
rename from libc/upstream-netbsd/libc/regex/regfree.c
rename to libc/upstream-netbsd/lib/libc/regex/regfree.c
similarity index 100%
rename from libc/upstream-netbsd/libc/regex/utils.h
rename to libc/upstream-netbsd/lib/libc/regex/utils.h
rename from libc/upstream-netbsd/libc/regex/utils.h
rename to libc/upstream-netbsd/lib/libc/regex/utils.h
diff --git a/libc/upstream-netbsd/libc/stdlib/_rand48.c b/libc/upstream-netbsd/lib/libc/stdlib/_rand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/_rand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/_rand48.c
rename from libc/upstream-netbsd/libc/stdlib/_rand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/_rand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/bsearch.c b/libc/upstream-netbsd/lib/libc/stdlib/bsearch.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/bsearch.c
rename to libc/upstream-netbsd/lib/libc/stdlib/bsearch.c
rename from libc/upstream-netbsd/libc/stdlib/bsearch.c
rename to libc/upstream-netbsd/lib/libc/stdlib/bsearch.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/div.c
rename to libc/upstream-netbsd/lib/libc/stdlib/div.c
rename from libc/upstream-netbsd/libc/stdlib/div.c
rename to libc/upstream-netbsd/lib/libc/stdlib/div.c
diff --git a/libc/upstream-netbsd/libc/stdlib/drand48.c b/libc/upstream-netbsd/lib/libc/stdlib/drand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/drand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/drand48.c
rename from libc/upstream-netbsd/libc/stdlib/drand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/drand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/erand48.c b/libc/upstream-netbsd/lib/libc/stdlib/erand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/erand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/erand48.c
rename from libc/upstream-netbsd/libc/stdlib/erand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/erand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/exit.c
rename to libc/upstream-netbsd/lib/libc/stdlib/exit.c
rename from libc/upstream-netbsd/libc/stdlib/exit.c
rename to libc/upstream-netbsd/lib/libc/stdlib/exit.c
diff --git a/libc/upstream-netbsd/libc/stdlib/jrand48.c b/libc/upstream-netbsd/lib/libc/stdlib/jrand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/jrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/jrand48.c
rename from libc/upstream-netbsd/libc/stdlib/jrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/jrand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/ldiv.c
rename to libc/upstream-netbsd/lib/libc/stdlib/ldiv.c
rename from libc/upstream-netbsd/libc/stdlib/ldiv.c
rename to libc/upstream-netbsd/lib/libc/stdlib/ldiv.c
diff --git a/libc/upstream-netbsd/libc/stdlib/lldiv.c b/libc/upstream-netbsd/lib/libc/stdlib/lldiv.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/lldiv.c
rename to libc/upstream-netbsd/lib/libc/stdlib/lldiv.c
rename from libc/upstream-netbsd/libc/stdlib/lldiv.c
rename to libc/upstream-netbsd/lib/libc/stdlib/lldiv.c
diff --git a/libc/upstream-netbsd/libc/stdlib/lrand48.c b/libc/upstream-netbsd/lib/libc/stdlib/lrand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/lrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/lrand48.c
rename from libc/upstream-netbsd/libc/stdlib/lrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/lrand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/mrand48.c b/libc/upstream-netbsd/lib/libc/stdlib/mrand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/mrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/mrand48.c
rename from libc/upstream-netbsd/libc/stdlib/mrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/mrand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/nrand48.c b/libc/upstream-netbsd/lib/libc/stdlib/nrand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/nrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/nrand48.c
rename from libc/upstream-netbsd/libc/stdlib/nrand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/nrand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/seed48.c b/libc/upstream-netbsd/lib/libc/stdlib/seed48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/seed48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/seed48.c
rename from libc/upstream-netbsd/libc/stdlib/seed48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/seed48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/srand48.c b/libc/upstream-netbsd/lib/libc/stdlib/srand48.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/srand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/srand48.c
rename from libc/upstream-netbsd/libc/stdlib/srand48.c
rename to libc/upstream-netbsd/lib/libc/stdlib/srand48.c
diff --git a/libc/upstream-netbsd/libc/stdlib/tdelete.c b/libc/upstream-netbsd/lib/libc/stdlib/tdelete.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/tdelete.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tdelete.c
rename from libc/upstream-netbsd/libc/stdlib/tdelete.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tdelete.c
diff --git a/libc/upstream-netbsd/libc/stdlib/tfind.c b/libc/upstream-netbsd/lib/libc/stdlib/tfind.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/tfind.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tfind.c
rename from libc/upstream-netbsd/libc/stdlib/tfind.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tfind.c
diff --git a/libc/upstream-netbsd/libc/stdlib/tsearch.c b/libc/upstream-netbsd/lib/libc/stdlib/tsearch.c
similarity index 100%
rename from libc/upstream-netbsd/libc/stdlib/tsearch.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tsearch.c
rename from libc/upstream-netbsd/libc/stdlib/tsearch.c
rename to libc/upstream-netbsd/lib/libc/stdlib/tsearch.c
diff --git a/libc/upstream-netbsd/libc/string/memccpy.c b/libc/upstream-netbsd/lib/libc/string/memccpy.c
similarity index 100%
rename from libc/upstream-netbsd/libc/string/memccpy.c
rename to libc/upstream-netbsd/lib/libc/string/memccpy.c
rename from libc/upstream-netbsd/libc/string/memccpy.c
rename to libc/upstream-netbsd/lib/libc/string/memccpy.c
diff --git a/libc/upstream-netbsd/libc/string/strcasestr.c b/libc/upstream-netbsd/lib/libc/string/strcasestr.c
similarity index 100%
rename from libc/upstream-netbsd/libc/string/strcasestr.c
rename to libc/upstream-netbsd/lib/libc/string/strcasestr.c
rename from libc/upstream-netbsd/libc/string/strcasestr.c
rename to libc/upstream-netbsd/lib/libc/string/strcasestr.c
diff --git a/libc/upstream-netbsd/libc/string/strcoll.c b/libc/upstream-netbsd/lib/libc/string/strcoll.c
similarity index 100%
rename from libc/upstream-netbsd/libc/string/strcoll.c
rename to libc/upstream-netbsd/lib/libc/string/strcoll.c
rename from libc/upstream-netbsd/libc/string/strcoll.c
rename to libc/upstream-netbsd/lib/libc/string/strcoll.c
diff --git a/libc/upstream-netbsd/libc/string/strxfrm.c b/libc/upstream-netbsd/lib/libc/string/strxfrm.c
similarity index 100%
rename from libc/upstream-netbsd/libc/string/strxfrm.c
rename to libc/upstream-netbsd/lib/libc/string/strxfrm.c
rename from libc/upstream-netbsd/libc/string/strxfrm.c
rename to libc/upstream-netbsd/lib/libc/string/strxfrm.c
diff --git a/libc/upstream-netbsd/libc/thread-stub/__isthreaded.c b/libc/upstream-netbsd/lib/libc/thread-stub/__isthreaded.c
similarity index 100%
rename from libc/upstream-netbsd/libc/thread-stub/__isthreaded.c
rename to libc/upstream-netbsd/lib/libc/thread-stub/__isthreaded.c
rename from libc/upstream-netbsd/libc/thread-stub/__isthreaded.c
rename to libc/upstream-netbsd/lib/libc/thread-stub/__isthreaded.c
diff --git a/libc/upstream-netbsd/libc/unistd/killpg.c b/libc/upstream-netbsd/lib/libc/unistd/killpg.c
similarity index 100%
rename from libc/upstream-netbsd/libc/unistd/killpg.c
rename to libc/upstream-netbsd/lib/libc/unistd/killpg.c
rename from libc/upstream-netbsd/libc/unistd/killpg.c
rename to libc/upstream-netbsd/lib/libc/unistd/killpg.c
similarity index 100%
rename from libc/unistd/charclass.h
rename to libc/upstream-openbsd/lib/libc/gen/charclass.h
rename from libc/unistd/charclass.h
rename to libc/upstream-openbsd/lib/libc/gen/charclass.h
similarity index 90%
rename from libc/unistd/exec.c
rename to libc/upstream-openbsd/lib/libc/gen/exec.c
index 2fe2a4e0a67227e8de870661fe9c544b2a8a0a78..1e2f7d97dd2601d1e5130ef96b9b5f64f950a47a 100644 (file)
rename from libc/unistd/exec.c
rename to libc/upstream-openbsd/lib/libc/gen/exec.c
index 2fe2a4e0a67227e8de870661fe9c544b2a8a0a78..1e2f7d97dd2601d1e5130ef96b9b5f64f950a47a 100644 (file)
--- a/libc/unistd/exec.c
-/* $OpenBSD: exec.c,v 1.18 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: exec.c,v 1.21 2013/09/30 12:02:33 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/uio.h>
+
#include <errno.h>
-#include <unistd.h>
#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <stdio.h>
#include <paths.h>
#include <stdarg.h>
-#include <alloca.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
extern char **environ;
}
int
-execv(const char *name, char * const *argv)
+execv(const char *name, char *const *argv)
{
(void)execve(name, argv, environ);
return (-1);
}
int
-execvp(const char *name, char * const *argv)
+execvpe(const char *name, char *const *argv, char *const *envp)
{
char **memp;
- int cnt, lp, ln, len;
+ int cnt;
+ size_t lp, ln, len;
char *p;
int eacces = 0;
- char *bp, *cur, *path, buf[MAXPATHLEN];
+ char *bp, *cur, *path, buf[PATH_MAX];
/*
* Do not allow null name
* security issue; given a way to make the path too long
* the user may execute the wrong program.
*/
- if (lp + ln + 2 > (int)sizeof(buf)) {
+ if (lp + ln + 2 > sizeof(buf)) {
struct iovec iov[3];
iov[0].iov_base = "execvp: ";
(void)writev(STDERR_FILENO, iov, 3);
continue;
}
- memcpy(buf, p, lp);
+ bcopy(p, buf, lp);
buf[lp] = '/';
- memcpy(buf + lp + 1, name, ln);
+ bcopy(name, buf + lp + 1, ln);
buf[lp + ln + 1] = '\0';
-retry: (void)execve(bp, argv, environ);
+retry: (void)execve(bp, argv, envp);
switch(errno) {
case E2BIG:
goto done;
goto done;
memp[0] = "sh";
memp[1] = bp;
- memcpy(memp + 2, argv + 1, cnt * sizeof(char *));
- (void)execve(_PATH_BSHELL, memp, environ);
+ bcopy(argv + 1, memp + 2, cnt * sizeof(char *));
+ (void)execve(_PATH_BSHELL, memp, envp);
goto done;
case ENOMEM:
goto done;
done:
return (-1);
}
+
+int
+execvp(const char *name, char *const *argv)
+{
+ return execvpe(name, argv, environ);
+}
+
similarity index 100%
rename from libc/unistd/fnmatch.c
rename to libc/upstream-openbsd/lib/libc/gen/fnmatch.c
rename from libc/unistd/fnmatch.c
rename to libc/upstream-openbsd/lib/libc/gen/fnmatch.c
diff --git a/libc/upstream-openbsd/lib/libc/gen/ftok.c b/libc/upstream-openbsd/lib/libc/gen/ftok.c
--- /dev/null
@@ -0,0 +1,43 @@
+/* $OpenBSD: ftok.c,v 1.7 2005/08/08 08:05:34 espie Exp $ */
+/*
+ * Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
+ * 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 author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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/types.h>
+#include <sys/stat.h>
+#include <sys/ipc.h>
+
+key_t
+ftok(const char *path, int id)
+{
+ struct stat st;
+
+ if (stat(path, &st) < 0)
+ return (key_t)-1;
+
+ return (key_t)
+ ((id & 0xff) << 24 | (st.st_dev & 0xff) << 16 | (st.st_ino & 0xffff));
+}
similarity index 100%
rename from libc/stdlib/tolower_.c
rename to libc/upstream-openbsd/lib/libc/gen/tolower_.c
rename from libc/stdlib/tolower_.c
rename to libc/upstream-openbsd/lib/libc/gen/tolower_.c
similarity index 100%
rename from libc/stdlib/toupper_.c
rename to libc/upstream-openbsd/lib/libc/gen/toupper_.c
rename from libc/stdlib/toupper_.c
rename to libc/upstream-openbsd/lib/libc/gen/toupper_.c
diff --git a/libc/upstream-freebsd/lib/libc/stdio/clrerr.c b/libc/upstream-openbsd/lib/libc/stdio/clrerr.c
similarity index 83%
rename from libc/upstream-freebsd/lib/libc/stdio/clrerr.c
rename to libc/upstream-openbsd/lib/libc/stdio/clrerr.c
index f161a6e1e802532cf9a11088c0889a159f64faa8..ac08c72cd11411eceb80000f75a913c9ad9f887e 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/clrerr.c
rename to libc/upstream-openbsd/lib/libc/stdio/clrerr.c
index f161a6e1e802532cf9a11088c0889a159f64faa8..ac08c72cd11411eceb80000f75a913c9ad9f887e 100644 (file)
+/* $OpenBSD: clrerr.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)clrerr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "libc_private.h"
-
-#undef clearerr
-#undef clearerr_unlocked
+#include "local.h"
+#undef clearerr
void
clearerr(FILE *fp)
__sclearerr(fp);
FUNLOCKFILE(fp);
}
-
-void
-clearerr_unlocked(FILE *fp)
-{
-
- __sclearerr(fp);
-}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fdopen.c b/libc/upstream-openbsd/lib/libc/stdio/fdopen.c
similarity index 77%
rename from libc/upstream-freebsd/lib/libc/stdio/fdopen.c
rename to libc/upstream-openbsd/lib/libc/stdio/fdopen.c
index 2e19b9febcd8b6dfaa940cf861a1242034e7c9a3..3e47f2c7426ae9b4c714198fd533b229b03679b4 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fdopen.c
rename to libc/upstream-openbsd/lib/libc/stdio/fdopen.c
index 2e19b9febcd8b6dfaa940cf861a1242034e7c9a3..3e47f2c7426ae9b4c714198fd533b229b03679b4 100644 (file)
+/* $OpenBSD: fdopen.c,v 1.6 2008/04/21 12:28:35 otto Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fdopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <sys/types.h>
#include <fcntl.h>
+#include <limits.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
-#include <limits.h>
-#include "un-namespace.h"
#include "local.h"
FILE *
FILE *fp;
int flags, oflags, fdflags, tmp;
- /*
- * File descriptors are a full int, but _file is only a short.
- * If we get a valid file descriptor that is greater than
- * SHRT_MAX, then the fd will get sign-extended into an
- * invalid file descriptor. Handle this case by failing the
- * open.
- */
+ /* _file is only a short */
if (fd > SHRT_MAX) {
errno = EMFILE;
return (NULL);
return (NULL);
/* Make sure the mode the user wants is a subset of the actual mode. */
- if ((fdflags = _fcntl(fd, F_GETFL, 0)) < 0)
+ if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
return (NULL);
tmp = fdflags & O_ACCMODE;
if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) {
if ((fp = __sfp()) == NULL)
return (NULL);
-
- if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
- fp->_flags = 0;
- return (NULL);
- }
-
fp->_flags = flags;
/*
* If opened for appending, but underlying descriptor does not have
- * O_APPEND bit set, assert __SAPP so that __swrite() caller
- * will _sseek() to the end before write.
+ * O_APPEND bit set, assert __SAPP so that __swrite() will lseek to
+ * end before each write.
*/
if ((oflags & O_APPEND) && !(fdflags & O_APPEND))
fp->_flags |= __SAPP;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/feof.c b/libc/upstream-openbsd/lib/libc/stdio/feof.c
similarity index 83%
rename from libc/upstream-freebsd/lib/libc/stdio/feof.c
rename to libc/upstream-openbsd/lib/libc/stdio/feof.c
index b970248a31284b3a4ea895bd53f36bf801beedc4..0036bab7d0ead746fb4ef6a97cdfc3edd39355e4 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/feof.c
rename to libc/upstream-openbsd/lib/libc/stdio/feof.c
index b970248a31284b3a4ea895bd53f36bf801beedc4..0036bab7d0ead746fb4ef6a97cdfc3edd39355e4 100644 (file)
+/* $OpenBSD: feof.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)feof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "libc_private.h"
+#include "local.h"
+/*
+ * A subroutine version of the macro feof.
+ */
#undef feof
-#undef feof_unlocked
int
feof(FILE *fp)
int ret;
FLOCKFILE(fp);
- ret= __sfeof(fp);
+ ret = __sfeof(fp);
FUNLOCKFILE(fp);
return (ret);
}
-
-int
-feof_unlocked(FILE *fp)
-{
-
- return (__sfeof(fp));
-}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/ferror.c b/libc/upstream-openbsd/lib/libc/stdio/ferror.c
similarity index 83%
rename from libc/upstream-freebsd/lib/libc/stdio/ferror.c
rename to libc/upstream-openbsd/lib/libc/stdio/ferror.c
index 7e0f8f95716570267279a0affbe3788e4e8d6d15..00b9c8b2c686c0487556f8faeac70cedebc89871 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/ferror.c
rename to libc/upstream-openbsd/lib/libc/stdio/ferror.c
index 7e0f8f95716570267279a0affbe3788e4e8d6d15..00b9c8b2c686c0487556f8faeac70cedebc89871 100644 (file)
+/* $OpenBSD: ferror.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ferror.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "libc_private.h"
+#include "local.h"
+/*
+ * A subroutine version of the macro ferror.
+ */
#undef ferror
-#undef ferror_unlocked
int
ferror(FILE *fp)
{
- int ret;
+ int ret;
FLOCKFILE(fp);
ret = __sferror(fp);
FUNLOCKFILE(fp);
return (ret);
}
-
-int
-ferror_unlocked(FILE *fp)
-{
-
- return (__sferror(fp));
-}
similarity index 97%
rename from libc/stdio/fflush.c
rename to libc/upstream-openbsd/lib/libc/stdio/fflush.c
index e69bdcc77f86407cad5eec18ce145f23cd9396bb..3e30f1086ffe2ed6cf1006ceae1f74776cbbd308 100644 (file)
rename from libc/stdio/fflush.c
rename to libc/upstream-openbsd/lib/libc/stdio/fflush.c
index e69bdcc77f86407cad5eec18ce145f23cd9396bb..3e30f1086ffe2ed6cf1006ceae1f74776cbbd308 100644 (file)
--- a/libc/stdio/fflush.c
-/* $OpenBSD: fflush.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fflush.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
int
fflush(FILE *fp)
{
- int r;
+ int r;
if (fp == NULL)
return (_fwalk(__sflush_locked));
int
__sflush_locked(FILE *fp)
{
- int r;
+ int r;
FLOCKFILE(fp);
r = __sflush(fp);
similarity index 96%
rename from libc/stdio/fgetc.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetc.c
index 0a6d54eec19c744e91932efdc8e814cc09e8e536..c5d7dde2d06e2ecd4cba1c2056dcc8dec691e212 100644 (file)
rename from libc/stdio/fgetc.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetc.c
index 0a6d54eec19c744e91932efdc8e814cc09e8e536..c5d7dde2d06e2ecd4cba1c2056dcc8dec691e212 100644 (file)
--- a/libc/stdio/fgetc.c
-/* $OpenBSD: fgetc.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fgetc.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgetln.c b/libc/upstream-openbsd/lib/libc/stdio/fgetln.c
similarity index 86%
rename from libc/upstream-freebsd/lib/libc/stdio/fgetln.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetln.c
index 1779de2ae5595e345fb2a6a234256f7f9157d994..539b3c081cd6a32fed9be182adbe49ca61b69cac 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fgetln.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetln.c
index 1779de2ae5595e345fb2a6a234256f7f9157d994..539b3c081cd6a32fed9be182adbe49ca61b69cac 100644 (file)
+/* $OpenBSD: fgetln.c,v 1.11 2009/11/21 09:53:44 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fgetln.c 8.2 (Berkeley) 1/2/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "un-namespace.h"
-#include "libc_private.h"
#include "local.h"
/*
/*
* Get an input line. The returned pointer often (but not always)
- * points into a stdio buffer. Fgetln does not alter the text of
+ * points into a stdio buffer. Fgetline does not alter the text of
* the returned line (which is thus not a C string because it will
* not necessarily end with '\0'), but does allow callers to modify
* it if they wish. Thus, we set __SMOD in case the caller does.
fgetln(FILE *fp, size_t *lenp)
{
unsigned char *p;
+ char *ret;
size_t len;
size_t off;
FLOCKFILE(fp);
- ORIENT(fp, -1);
+ _SET_ORIENTATION(fp, -1);
+
/* make sure there is input */
- if (fp->_r <= 0 && __srefill(fp)) {
- *lenp = 0;
- FUNLOCKFILE(fp);
- return (NULL);
- }
+ if (fp->_r <= 0 && __srefill(fp))
+ goto error;
/* look for a newline in the input */
- if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) != NULL) {
- char *ret;
-
+ if ((p = memchr((void *)fp->_p, '\n', fp->_r)) != NULL) {
/*
* Found one. Flag buffer as modified to keep fseek from
* `optimising' a backward seek, in case the user stomps on
off = len;
if (__srefill(fp))
break; /* EOF or error: return partial line */
- if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) == NULL)
+ if ((p = memchr((void *)fp->_p, '\n', fp->_r)) == NULL)
continue;
/* got it: finish up the line (like code above) */
break;
}
*lenp = len;
+ ret = (char *)fp->_lb._base;
#ifdef notdef
- fp->_lb._base[len] = 0;
+ ret[len] = '\0';
#endif
FUNLOCKFILE(fp);
- return ((char *)fp->_lb._base);
+ return (ret);
error:
*lenp = 0; /* ??? */
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgetpos.c b/libc/upstream-openbsd/lib/libc/stdio/fgetpos.c
similarity index 82%
rename from libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetpos.c
index f161f4325fd3485c7a4b37d760cdc6a5b869c1a2..e6188e5a6b11adc113097c9b05ab50290dec1f0e 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fgetpos.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgetpos.c
index f161f4325fd3485c7a4b37d760cdc6a5b869c1a2..e6188e5a6b11adc113097c9b05ab50290dec1f0e 100644 (file)
+/* $OpenBSD: fgetpos.c,v 1.6 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fgetpos.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <stdio.h>
+/*
+ * fgetpos: like ftello.
+ */
int
-fgetpos(FILE * __restrict fp, fpos_t * __restrict pos)
+fgetpos(FILE *fp, fpos_t *pos)
{
- /*
- * ftello is thread-safe; no need to lock fp.
- */
- if ((*pos = ftello(fp)) == (fpos_t)-1)
- return (-1);
- else
- return (0);
+ return((*pos = ftello(fp)) == (fpos_t)-1);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fgets.c b/libc/upstream-openbsd/lib/libc/stdio/fgets.c
similarity index 86%
rename from libc/upstream-freebsd/lib/libc/stdio/fgets.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgets.c
index 9abf559bf108de80a5e59df72e34aa5d025a1e9a..0ba8770e33b9da081aea2012259e8ee69416732b 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fgets.c
rename to libc/upstream-openbsd/lib/libc/stdio/fgets.c
index 9abf559bf108de80a5e59df72e34aa5d025a1e9a..0ba8770e33b9da081aea2012259e8ee69416732b 100644 (file)
+/* $OpenBSD: fgets.c,v 1.14 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fgets.c 8.2 (Berkeley) 12/22/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
+#include <errno.h>
#include <stdio.h>
#include <string.h>
-#include "un-namespace.h"
#include "local.h"
-#include "libc_private.h"
/*
* Read at most n-1 characters from the given file.
* Stop when a newline has been read, or the count runs out.
* Return first argument, or NULL if no characters were read.
+ * Do not return NULL if n == 1.
*/
char *
-fgets(char * __restrict buf, int n, FILE * __restrict fp)
+fgets(char *buf, int n, FILE *fp)
{
size_t len;
char *s;
unsigned char *p, *t;
- if (n <= 0) /* sanity check */
+ if (n <= 0) { /* sanity check */
+ errno = EINVAL;
return (NULL);
+ }
FLOCKFILE(fp);
- ORIENT(fp, -1);
+ _SET_ORIENTATION(fp, -1);
s = buf;
n--; /* leave space for NUL */
while (n != 0) {
/*
* If the buffer is empty, refill it.
*/
- if ((len = fp->_r) <= 0) {
+ if (fp->_r <= 0) {
if (__srefill(fp)) {
/* EOF/error: stop with partial or no line */
if (s == buf) {
}
break;
}
- len = fp->_r;
}
+ len = fp->_r;
p = fp->_p;
/*
fp->_r -= len;
fp->_p = t;
(void)memcpy((void *)s, (void *)p, len);
- s[len] = 0;
+ s[len] = '\0';
FUNLOCKFILE(fp);
return (buf);
}
s += len;
n -= len;
}
- *s = 0;
+ *s = '\0';
FUNLOCKFILE(fp);
return (buf);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fileno.c b/libc/upstream-openbsd/lib/libc/stdio/fileno.c
similarity index 82%
rename from libc/upstream-freebsd/lib/libc/stdio/fileno.c
rename to libc/upstream-openbsd/lib/libc/stdio/fileno.c
index 3ac183010ef68cd1df47615f4ca804c654333331..58628da3c10f65d6c00147eaec90751d18c26231 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fileno.c
rename to libc/upstream-openbsd/lib/libc/stdio/fileno.c
index 3ac183010ef68cd1df47615f4ca804c654333331..58628da3c10f65d6c00147eaec90751d18c26231 100644 (file)
+/* $OpenBSD: fileno.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fileno.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "libc_private.h"
+#include "local.h"
+/*
+ * A subroutine version of the macro fileno.
+ */
#undef fileno
-#undef fileno_unlocked
int
fileno(FILE *fp)
{
- int fd;
+ int ret;
FLOCKFILE(fp);
- fd = __sfileno(fp);
+ ret = __sfileno(fp);
FUNLOCKFILE(fp);
-
- return (fd);
-}
-
-int
-fileno_unlocked(FILE *fp)
-{
-
- return (__sfileno(fp));
+ return (ret);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fpurge.c b/libc/upstream-openbsd/lib/libc/stdio/fpurge.c
similarity index 80%
rename from libc/upstream-freebsd/lib/libc/stdio/fpurge.c
rename to libc/upstream-openbsd/lib/libc/stdio/fpurge.c
index f205bdfc3bf54839618693ee3737d0a845336a90..65bd74994f48890d85bab0cceae7d06b46f29f59 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fpurge.c
rename to libc/upstream-openbsd/lib/libc/stdio/fpurge.c
index f205bdfc3bf54839618693ee3737d0a845336a90..65bd74994f48890d85bab0cceae7d06b46f29f59 100644 (file)
+/* $OpenBSD: fpurge.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fpurge.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include "un-namespace.h"
#include "local.h"
-#include "libc_private.h"
/*
* fpurge: like fflush, but without writing anything: leave the
int
fpurge(FILE *fp)
{
- int retval;
FLOCKFILE(fp);
if (!fp->_flags) {
+ FUNLOCKFILE(fp);
errno = EBADF;
- retval = EOF;
- } else {
- if (HASUB(fp))
- FREEUB(fp);
- fp->_p = fp->_bf._base;
- fp->_r = 0;
- fp->_w = fp->_flags & (__SLBF|__SNBF|__SRD) ? 0 : fp->_bf._size;
- retval = 0;
+ return(EOF);
}
+
+ if (HASUB(fp))
+ FREEUB(fp);
+ WCIO_FREE(fp);
+ fp->_p = fp->_bf._base;
+ fp->_r = 0;
+ fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
FUNLOCKFILE(fp);
- return (retval);
+ return (0);
}
similarity index 96%
rename from libc/stdio/fputc.c
rename to libc/upstream-openbsd/lib/libc/stdio/fputc.c
index 90809e2342319d17ccf8ad9779d8c0c1919e87d5..98e39603f0445390f46a9d1bd0fda9210fdfd63c 100644 (file)
rename from libc/stdio/fputc.c
rename to libc/upstream-openbsd/lib/libc/stdio/fputc.c
index 90809e2342319d17ccf8ad9779d8c0c1919e87d5..98e39603f0445390f46a9d1bd0fda9210fdfd63c 100644 (file)
--- a/libc/stdio/fputc.c
-/* $OpenBSD: fputc.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fputc.c,v 1.10 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fputs.c b/libc/upstream-openbsd/lib/libc/stdio/fputs.c
similarity index 83%
rename from libc/upstream-freebsd/lib/libc/stdio/fputs.c
rename to libc/upstream-openbsd/lib/libc/stdio/fputs.c
index 3b8f2c9d1b68630722c42fb5dfddbbd28da42529..ea8556a29cf65e06b4bc6112b70eb2125fa79649 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fputs.c
rename to libc/upstream-openbsd/lib/libc/stdio/fputs.c
index 3b8f2c9d1b68630722c42fb5dfddbbd28da42529..ea8556a29cf65e06b4bc6112b70eb2125fa79649 100644 (file)
+/* $OpenBSD: fputs.c,v 1.10 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fputs.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
#include <string.h>
-#include "un-namespace.h"
-#include "fvwrite.h"
-#include "libc_private.h"
#include "local.h"
+#include "fvwrite.h"
/*
* Write the given string to the given file.
*/
int
-fputs(const char * __restrict s, FILE * __restrict fp)
+fputs(const char *s, FILE *fp)
{
- int retval;
struct __suio uio;
struct __siov iov;
+ int ret;
iov.iov_base = (void *)s;
iov.iov_len = uio.uio_resid = strlen(s);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
FLOCKFILE(fp);
- ORIENT(fp, -1);
- retval = __sfvwrite(fp, &uio);
+ _SET_ORIENTATION(fp, -1);
+ ret = __sfvwrite(fp, &uio);
FUNLOCKFILE(fp);
- return (retval);
+ return (ret);
}
similarity index 95%
rename from libc/stdio/fscanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/fscanf.c
index 2f3fcebb21b084e72d6041b982b7d8ba79041339..5fd10d4a464577fe5cc68cd659d069e5f1e3d036 100644 (file)
rename from libc/stdio/fscanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/fscanf.c
index 2f3fcebb21b084e72d6041b982b7d8ba79041339..5fd10d4a464577fe5cc68cd659d069e5f1e3d036 100644 (file)
--- a/libc/stdio/fscanf.c
-/* $OpenBSD: fscanf.c,v 1.9 2005/10/10 17:37:44 espie Exp $ */
+/* $OpenBSD: fscanf.c,v 1.10 2011/05/30 18:48:33 martynas Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
#include <stdio.h>
#include <stdarg.h>
+/* SCANFLIKE2 */
int
fscanf(FILE *fp, const char *fmt, ...)
{
similarity index 93%
rename from libc/stdio/fseek.c
rename to libc/upstream-openbsd/lib/libc/stdio/fseek.c
index 38697f53f53b46d9029cb22d9103c54dca64911d..cdd40b62f8a3ed358f56d658d26140eb14cfda1b 100644 (file)
rename from libc/stdio/fseek.c
rename to libc/upstream-openbsd/lib/libc/stdio/fseek.c
index 38697f53f53b46d9029cb22d9103c54dca64911d..cdd40b62f8a3ed358f56d658d26140eb14cfda1b 100644 (file)
--- a/libc/stdio/fseek.c
-/* $OpenBSD: fseek.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fseek.c,v 1.11 2012/05/21 22:24:19 matthew Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* skip this; see fgetln.c.)
*/
if ((fp->_flags & __SMOD) == 0 &&
- target >= curoff && target < (fpos_t)(curoff + n)) {
+ target >= curoff && target < curoff + n) {
int o = target - curoff;
fp->_p = fp->_bf._base + o;
if ((*seekfn)(fp->_cookie, curoff, SEEK_SET) == POS_ERR)
goto dumb;
fp->_r = 0;
- fp->_p = fp->_bf._base;
+ fp->_p = fp->_bf._base;
if (HASUB(fp))
FREEUB(fp);
fp->_flags &= ~__SEOF;
n = target - curoff;
if (n) {
- if (__srefill(fp) || (size_t)fp->_r < n)
+ if (__srefill(fp) || fp->_r < n)
goto dumb;
fp->_p += n;
fp->_r -= n;
return (0);
}
-/*
- * fseek()'s offset is a long and sizeof(off_t) != sizeof(long) on all arches
- */
-#if defined(__alpha__) && defined(__indr_reference)
-__indr_reference(fseeko, fseek);
-#else
int
fseek(FILE *fp, long offset, int whence)
{
- off_t off = offset;
-
- return(fseeko(fp, off, whence));
+ return (fseeko(fp, offset, whence));
}
-#endif
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fsetpos.c b/libc/upstream-openbsd/lib/libc/stdio/fsetpos.c
similarity index 88%
rename from libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
rename to libc/upstream-openbsd/lib/libc/stdio/fsetpos.c
index c6b8b785918d8cf70487d63be0fbe2e18997501c..9624fe565420f5de8d938fbfad185d3009754cdd 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fsetpos.c
rename to libc/upstream-openbsd/lib/libc/stdio/fsetpos.c
index c6b8b785918d8cf70487d63be0fbe2e18997501c..9624fe565420f5de8d938fbfad185d3009754cdd 100644 (file)
+/* $OpenBSD: fsetpos.c,v 1.6 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fsetpos.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
#include <stdio.h>
/*
- * fsetpos: like fseek.
+ * fsetpos: like fseeko.
*/
int
fsetpos(FILE *iop, const fpos_t *pos)
similarity index 88%
rename from libc/stdio/ftell.c
rename to libc/upstream-openbsd/lib/libc/stdio/ftell.c
index 9f850ee859388a2c346681bf0caa6f7658b9bff8..0a2016ce10ba81c4e662fbba4dd909d996821fa6 100644 (file)
rename from libc/stdio/ftell.c
rename to libc/upstream-openbsd/lib/libc/stdio/ftell.c
index 9f850ee859388a2c346681bf0caa6f7658b9bff8..0a2016ce10ba81c4e662fbba4dd909d996821fa6 100644 (file)
--- a/libc/stdio/ftell.c
-/* $OpenBSD: ftell.c,v 1.6 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: ftell.c,v 1.10 2012/05/21 22:24:19 matthew Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
#include <stdio.h>
#include <errno.h>
+#include <limits.h>
#include "local.h"
/*
if (fp->_seek == NULL) {
errno = ESPIPE; /* historic practice */
pos = -1;
- goto out;
+ goto out;
}
/*
* Find offset of underlying I/O object, then
* adjust for buffered bytes.
*/
- FLOCKFILE(fp);
+ FLOCKFILE(fp);
__sflush(fp); /* may adjust seek offset on append stream */
if (fp->_flags & __SOFF)
pos = fp->_offset;
return (pos);
}
-/*
- * ftell() returns a long and sizeof(off_t) != sizeof(long) on all arches
- */
-#if defined(__alpha__) && defined(__indr_reference)
-__indr_reference(ftello, ftell);
-#else
long
ftell(FILE *fp)
{
- long pos;
-
- pos = (long)ftello(fp);
- return(pos);
+ off_t offset = ftello(fp);
+ if (offset > LONG_MAX) {
+ errno = EOVERFLOW;
+ return (-1);
+ }
+ return ((long)offset);
}
-#endif
diff --git a/libc/upstream-freebsd/lib/libc/stdio/funopen.c b/libc/upstream-openbsd/lib/libc/stdio/funopen.c
similarity index 86%
rename from libc/upstream-freebsd/lib/libc/stdio/funopen.c
rename to libc/upstream-openbsd/lib/libc/stdio/funopen.c
index 983fe501190285d67e019b325da09a937cc0756c..b85ee96a1f7a8c1544f1e0ad2c2f1f03ac886889 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/funopen.c
rename to libc/upstream-openbsd/lib/libc/stdio/funopen.c
index 983fe501190285d67e019b325da09a937cc0756c..b85ee96a1f7a8c1544f1e0ad2c2f1f03ac886889 100644 (file)
+/* $OpenBSD: funopen.c,v 1.8 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)funopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <stdio.h>
#include <errno.h>
-
#include "local.h"
FILE *
-funopen(const void *cookie,
- int (*readfn)(void *, char *, int),
+funopen(const void *cookie, int (*readfn)(void *, char *, int),
int (*writefn)(void *, const char *, int),
- fpos_t (*seekfn)(void *, fpos_t, int),
- int (*closefn)(void *))
+ fpos_t (*seekfn)(void *, fpos_t, int), int (*closefn)(void *))
{
FILE *fp;
int flags;
return (NULL);
fp->_flags = flags;
fp->_file = -1;
- fp->_cookie = (void *)cookie;
+ fp->_cookie = (void *)cookie; /* SAFE: cookie not modified */
fp->_read = readfn;
fp->_write = writefn;
fp->_seek = seekfn;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/fwalk.c b/libc/upstream-openbsd/lib/libc/stdio/fwalk.c
similarity index 79%
rename from libc/upstream-freebsd/lib/libc/stdio/fwalk.c
rename to libc/upstream-openbsd/lib/libc/stdio/fwalk.c
index 151837b2902528942533c64f336e396792697872..8ac6628aa2b1054d402237bce3b436bbea35fa1d 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/fwalk.c
rename to libc/upstream-openbsd/lib/libc/stdio/fwalk.c
index 151837b2902528942533c64f336e396792697872..8ac6628aa2b1054d402237bce3b436bbea35fa1d 100644 (file)
+/* $OpenBSD: fwalk.c,v 1.10 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fwalk.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
+#include <errno.h>
#include <stdio.h>
#include "local.h"
#include "glue.h"
struct glue *g;
ret = 0;
- /*
- * It should be safe to walk the list without locking it;
- * new nodes are only added to the end and none are ever
- * removed.
- *
- * Avoid locking this list while walking it or else you will
- * introduce a potential deadlock in [at least] refill.c.
- */
for (g = &__sglue; g != NULL; g = g->next)
- for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
+ for (fp = g->iobs, n = g->niobs; --n >= 0; fp++) {
if ((fp->_flags != 0) && ((fp->_flags & __SIGN) == 0))
ret |= (*function)(fp);
+ }
return (ret);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/getc.c b/libc/upstream-openbsd/lib/libc/stdio/getc.c
similarity index 82%
rename from libc/upstream-freebsd/lib/libc/stdio/getc.c
rename to libc/upstream-openbsd/lib/libc/stdio/getc.c
index 4963c8ce68e77a8ddc443dde560ae21d065aea17..6879cbb791391c6ef272a5858dca35960013c5bf 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/getc.c
rename to libc/upstream-openbsd/lib/libc/stdio/getc.c
index 4963c8ce68e77a8ddc443dde560ae21d065aea17..6879cbb791391c6ef272a5858dca35960013c5bf 100644 (file)
+/* $OpenBSD: getc.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "libc_private.h"
#include "local.h"
-#undef getc
+/*
+ * A subroutine version of the macro getc_unlocked.
+ */
#undef getc_unlocked
int
-getc(FILE *fp)
+getc_unlocked(FILE *fp)
{
- int retval;
- FLOCKFILE(fp);
- /* Orientation set by __sgetc() when buffer is empty. */
- /* ORIENT(fp, -1); */
- retval = __sgetc(fp);
- FUNLOCKFILE(fp);
- return (retval);
+ return (__sgetc(fp));
}
+/*
+ * A subroutine version of the macro getc.
+ */
+#undef getc
+
int
-getc_unlocked(FILE *fp)
+getc(FILE *fp)
{
+ int c;
- return (__sgetc(fp));
+ FLOCKFILE(fp);
+ c = __sgetc(fp);
+ FUNLOCKFILE(fp);
+ return (c);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/getchar.c b/libc/upstream-openbsd/lib/libc/stdio/getchar.c
similarity index 78%
rename from libc/upstream-freebsd/lib/libc/stdio/getchar.c
rename to libc/upstream-openbsd/lib/libc/stdio/getchar.c
index 21040bc8c4163ce02f481c4a1fcb205d7a46237c..550817de028e120d9346ca25ce1c5065a17c9a80 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/getchar.c
rename to libc/upstream-openbsd/lib/libc/stdio/getchar.c
index 21040bc8c4163ce02f481c4a1fcb205d7a46237c..550817de028e120d9346ca25ce1c5065a17c9a80 100644 (file)
+/* $OpenBSD: getchar.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getchar.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+#include <stdio.h>
/*
- * A subroutine version of the macro getchar.
+ * A subroutine version of the macro getchar_unlocked.
*/
-#include "namespace.h"
-#include <stdio.h>
-#include "un-namespace.h"
-#include "local.h"
-#include "libc_private.h"
-
-#undef getchar
#undef getchar_unlocked
int
-getchar()
+getchar_unlocked(void)
{
- int retval;
- FLOCKFILE(stdin);
- /* Orientation set by __sgetc() when buffer is empty. */
- /* ORIENT(stdin, -1); */
- retval = __sgetc(stdin);
- FUNLOCKFILE(stdin);
- return (retval);
+ return (getc_unlocked(stdin));
}
+
+/*
+ * A subroutine version of the macro getchar.
+ */
+
+#undef getchar
+
int
-getchar_unlocked(void)
+getchar(void)
{
-
- return (__sgetc(stdin));
+ return (getc(stdin));
}
diff --git a/libc/upstream-netbsd/libc/stdio/getdelim.c b/libc/upstream-openbsd/lib/libc/stdio/getdelim.c
similarity index 88%
rename from libc/upstream-netbsd/libc/stdio/getdelim.c
rename to libc/upstream-openbsd/lib/libc/stdio/getdelim.c
index acce3764b54d6b39c7be5f008e8bdfcfc5f557d1..dcde0c34e6138a015169b74c575b1d444fd62277 100644 (file)
rename from libc/upstream-netbsd/libc/stdio/getdelim.c
rename to libc/upstream-openbsd/lib/libc/stdio/getdelim.c
index acce3764b54d6b39c7be5f008e8bdfcfc5f557d1..dcde0c34e6138a015169b74c575b1d444fd62277 100644 (file)
+/* $OpenBSD: getdelim.c,v 1.1 2012/03/21 23:44:35 fgsch Exp $ */
/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */
/*
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $");
-
-#include "namespace.h"
-
-#include <sys/param.h>
-
-#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "reentrant.h"
#include "local.h"
-#ifdef __weak_alias
-__weak_alias(getdelim, _getdelim)
-#endif
-
/* Minimum buffer size we create.
* This should allow config files to fit into our power of 2 buffer growth
* without the need for a realloc. */
#define MINBUF 128
ssize_t
-__getdelim(char **__restrict buf, size_t *__restrict buflen,
+getdelim(char **__restrict buf, size_t *__restrict buflen,
int sep, FILE *__restrict fp)
{
unsigned char *p;
size_t len, newlen, off;
char *newb;
- _DIAGASSERT(fp != NULL);
+ FLOCKFILE(fp);
if (buf == NULL || buflen == NULL) {
errno = EINVAL;
if (newlen > *buflen) {
if (newlen < MINBUF)
newlen = MINBUF;
+#define powerof2(x) ((((x)-1)&(x))==0)
if (!powerof2(newlen)) {
/* Grow the buffer to the next power of 2 */
newlen--;
off += len;
} while (p == NULL);
+ FUNLOCKFILE(fp);
+
/* POSIX demands we return -1 on EOF. */
- if (off == 0)
+ if (off == 0)
return -1;
if (*buf != NULL)
error:
fp->_flags |= __SERR;
- return -1;
-}
-
-ssize_t
-getdelim(char **__restrict buf, size_t *__restrict buflen,
- int sep, FILE *__restrict fp)
-{
- ssize_t n;
-
- FLOCKFILE(fp);
- n = __getdelim(buf, buflen, sep, fp);
FUNLOCKFILE(fp);
- return n;
+ return -1;
}
diff --git a/libc/upstream-netbsd/libc/stdio/getline.c b/libc/upstream-openbsd/lib/libc/stdio/getline.c
similarity index 90%
rename from libc/upstream-netbsd/libc/stdio/getline.c
rename to libc/upstream-openbsd/lib/libc/stdio/getline.c
index e5d4bab26e8ed84c510d6d2a7f78e21fadc9b8b9..55ad39675b9603176b26eb463f4ee6637f768e49 100644 (file)
rename from libc/upstream-netbsd/libc/stdio/getline.c
rename to libc/upstream-openbsd/lib/libc/stdio/getline.c
index e5d4bab26e8ed84c510d6d2a7f78e21fadc9b8b9..55ad39675b9603176b26eb463f4ee6637f768e49 100644 (file)
+/* $OpenBSD: getline.c,v 1.1 2012/03/21 23:44:35 fgsch Exp $ */
/* $NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $ */
/*
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__RCSID("$NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $");
-
-#include "namespace.h"
-
#include <stdio.h>
-#ifdef __weak_alias
-__weak_alias(getline, _getline)
-#endif
-
ssize_t
getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp)
{
similarity index 97%
rename from libc/stdio/gets.c
rename to libc/upstream-openbsd/lib/libc/stdio/gets.c
index 93e2edd12fc388423a359812b74aa6c94adaeb13..c2e1b50574e8e4ec6825f398ef0b63c258727fdc 100644 (file)
rename from libc/stdio/gets.c
rename to libc/upstream-openbsd/lib/libc/stdio/gets.c
index 93e2edd12fc388423a359812b74aa6c94adaeb13..c2e1b50574e8e4ec6825f398ef0b63c258727fdc 100644 (file)
--- a/libc/stdio/gets.c
-/* $OpenBSD: gets.c,v 1.9 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: gets.c,v 1.12 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/libc/upstream-openbsd/lib/libc/stdio/perror.c b/libc/upstream-openbsd/lib/libc/stdio/perror.c
--- /dev/null
@@ -0,0 +1,62 @@
+/* $OpenBSD: perror.c,v 1.8 2005/08/08 08:05:36 espie Exp $ */
+/*
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. 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. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+
+void
+perror(const char *s)
+{
+ struct iovec *v;
+ struct iovec iov[4];
+ char buf[NL_TEXTMAX];
+
+ v = iov;
+ if (s && *s) {
+ v->iov_base = (char *)s;
+ v->iov_len = strlen(s);
+ v++;
+ v->iov_base = ": ";
+ v->iov_len = 2;
+ v++;
+ }
+ (void)strerror_r(errno, buf, sizeof(buf));
+ v->iov_base = buf;
+ v->iov_len = strlen(v->iov_base);
+ v++;
+ v->iov_base = "\n";
+ v->iov_len = 1;
+ (void)writev(STDERR_FILENO, iov, (v - iov) + 1);
+}
similarity index 95%
rename from libc/stdio/printf.c
rename to libc/upstream-openbsd/lib/libc/stdio/printf.c
index 614b43515483adad5106989594511af86fed030c..09bb3d7f7db64e3c2bc515ba398e9bc37b67c5d1 100644 (file)
rename from libc/stdio/printf.c
rename to libc/upstream-openbsd/lib/libc/stdio/printf.c
index 614b43515483adad5106989594511af86fed030c..09bb3d7f7db64e3c2bc515ba398e9bc37b67c5d1 100644 (file)
--- a/libc/stdio/printf.c
-/* $OpenBSD: printf.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: printf.c,v 1.8 2011/05/30 18:48:33 martynas Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
#include <stdio.h>
#include <stdarg.h>
+/* PRINTFLIKE1 */
int
printf(const char *fmt, ...)
{
diff --git a/libc/upstream-freebsd/lib/libc/stdio/putc.c b/libc/upstream-openbsd/lib/libc/stdio/putc.c
similarity index 80%
rename from libc/upstream-freebsd/lib/libc/stdio/putc.c
rename to libc/upstream-openbsd/lib/libc/stdio/putc.c
index aaffece49d76d65781a5d4183b7e885d6d5a2e12..762fecb2d38cbd30b28bd299ef78df131daf7d7e 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/putc.c
rename to libc/upstream-openbsd/lib/libc/stdio/putc.c
index aaffece49d76d65781a5d4183b7e885d6d5a2e12..762fecb2d38cbd30b28bd299ef78df131daf7d7e 100644 (file)
+/* $OpenBSD: putc.c,v 1.12 2009/11/21 10:11:54 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)putc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
+#include <errno.h>
#include "local.h"
-#include "libc_private.h"
-#undef putc
+/*
+ * A subroutine version of the macro putc_unlocked.
+ */
#undef putc_unlocked
int
-putc(int c, FILE *fp)
+putc_unlocked(int c, FILE *fp)
{
- int retval;
- FLOCKFILE(fp);
- /* Orientation set by __sputc() when buffer is full. */
- /* ORIENT(fp, -1); */
- retval = __sputc(c, fp);
- FUNLOCKFILE(fp);
- return (retval);
+ if (cantwrite(fp)) {
+ errno = EBADF;
+ return (EOF);
+ }
+ _SET_ORIENTATION(fp, -1);
+ return (__sputc(c, fp));
}
+/*
+ * A subroutine version of the macro putc.
+ */
+#undef putc
+
int
-putc_unlocked(int ch, FILE *fp)
+putc(int c, FILE *fp)
{
+ int ret;
- return (__sputc(ch, fp));
+ FLOCKFILE(fp);
+ ret = putc_unlocked(c, fp);
+ FUNLOCKFILE(fp);
+ return (ret);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/putchar.c b/libc/upstream-openbsd/lib/libc/stdio/putchar.c
similarity index 78%
rename from libc/upstream-freebsd/lib/libc/stdio/putchar.c
rename to libc/upstream-openbsd/lib/libc/stdio/putchar.c
index 756155902f29998a41dd90a386f6edb8fbf923c6..233cdfd0268f62c0ae110a0f14edaaad10617dfd 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/putchar.c
rename to libc/upstream-openbsd/lib/libc/stdio/putchar.c
index 756155902f29998a41dd90a386f6edb8fbf923c6..233cdfd0268f62c0ae110a0f14edaaad10617dfd 100644 (file)
+/* $OpenBSD: putchar.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)putchar.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
-#include "un-namespace.h"
-#include "local.h"
-#include "libc_private.h"
-#undef putchar
#undef putchar_unlocked
-
/*
- * A subroutine version of the macro putchar
+ * A subrouting version of the macro putchar_unlocked
*/
int
-putchar(int c)
+putchar_unlocked(int c)
{
- int retval;
FILE *so = stdout;
- FLOCKFILE(so);
- /* Orientation set by __sputc() when buffer is full. */
- /* ORIENT(so, -1); */
- retval = __sputc(c, so);
- FUNLOCKFILE(so);
- return (retval);
+ return (putc_unlocked(c,so));
}
+#undef putchar
+
+/*
+ * A subroutine version of the macro putchar
+ */
int
-putchar_unlocked(int ch)
+putchar(int c)
{
+ FILE *so = stdout;
- return (__sputc(ch, stdout));
+ return (putc(c, so));
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/puts.c b/libc/upstream-openbsd/lib/libc/stdio/puts.c
similarity index 84%
rename from libc/upstream-freebsd/lib/libc/stdio/puts.c
rename to libc/upstream-openbsd/lib/libc/stdio/puts.c
index 5ee7fc1c63f0f606274262ef2147a1630906c4a8..655aed7ec9d12e5ea7eb81e0530984ca568a7027 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/puts.c
rename to libc/upstream-openbsd/lib/libc/stdio/puts.c
index 5ee7fc1c63f0f606274262ef2147a1630906c4a8..655aed7ec9d12e5ea7eb81e0530984ca568a7027 100644 (file)
+/* $OpenBSD: puts.c,v 1.11 2009/11/21 09:53:44 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)puts.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include "namespace.h"
#include <stdio.h>
#include <string.h>
-#include "un-namespace.h"
-#include "fvwrite.h"
-#include "libc_private.h"
#include "local.h"
+#include "fvwrite.h"
/*
* Write the given string to stdout, appending a newline.
*/
int
-puts(char const *s)
+puts(const char *s)
{
- int retval;
size_t c = strlen(s);
struct __suio uio;
struct __siov iov[2];
+ int ret;
iov[0].iov_base = (void *)s;
iov[0].iov_len = c;
uio.uio_iov = &iov[0];
uio.uio_iovcnt = 2;
FLOCKFILE(stdout);
- ORIENT(stdout, -1);
- retval = __sfvwrite(stdout, &uio) ? EOF : '\n';
+ _SET_ORIENTATION(stdout, -1);
+ ret = __sfvwrite(stdout, &uio);
FUNLOCKFILE(stdout);
- return (retval);
+ return (ret ? EOF : '\n');
}
similarity index 96%
rename from libc/stdio/refill.c
rename to libc/upstream-openbsd/lib/libc/stdio/refill.c
index 7cb6b7892392a82873c0c7f23d6d8a4491b5a9c1..165c72a64ba77318fd4589adf7fb989a29d86a70 100644 (file)
rename from libc/stdio/refill.c
rename to libc/upstream-openbsd/lib/libc/stdio/refill.c
index 7cb6b7892392a82873c0c7f23d6d8a4491b5a9c1..165c72a64ba77318fd4589adf7fb989a29d86a70 100644 (file)
--- a/libc/stdio/refill.c
-/* $OpenBSD: refill.c,v 1.8 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: refill.c,v 1.11 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
lflush(FILE *fp)
{
if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
- return (__sflush_locked(fp)); /* ignored... */
+ return (__sflush_locked(fp)); /* ignored... */
return (0);
}
/* Now flush this file without locking it. */
if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
- __sflush(fp);
+ __sflush(fp);
}
fp->_p = fp->_bf._base;
fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/remove.c b/libc/upstream-openbsd/lib/libc/stdio/remove.c
similarity index 86%
rename from libc/upstream-freebsd/lib/libc/stdio/remove.c
rename to libc/upstream-openbsd/lib/libc/stdio/remove.c
index 2e984baf9360688db57dddcdbb7e6649d1c0b7ae..d09d76f9df2c6016b71f753c0dce5181555257b1 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/remove.c
rename to libc/upstream-openbsd/lib/libc/stdio/remove.c
index 2e984baf9360688db57dddcdbb7e6649d1c0b7ae..d09d76f9df2c6016b71f753c0dce5181555257b1 100644 (file)
+/* $OpenBSD: remove.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)remove.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
#include <stdio.h>
+#include <unistd.h>
+#include <sys/stat.h>
int
remove(const char *file)
{
- struct stat sb;
+ struct stat st;
- if (lstat(file, &sb) < 0)
+ if (lstat(file, &st) < 0)
return (-1);
- if (S_ISDIR(sb.st_mode))
+ if (S_ISDIR(st.st_mode))
return (rmdir(file));
return (unlink(file));
}
similarity index 100%
rename from libc/stdio/rewind.c
rename to libc/upstream-openbsd/lib/libc/stdio/rewind.c
rename from libc/stdio/rewind.c
rename to libc/upstream-openbsd/lib/libc/stdio/rewind.c
diff --git a/libc/upstream-freebsd/lib/libc/stdio/rget.c b/libc/upstream-openbsd/lib/libc/stdio/rget.c
similarity index 91%
rename from libc/upstream-freebsd/lib/libc/stdio/rget.c
rename to libc/upstream-openbsd/lib/libc/stdio/rget.c
index bdc0311674e112b9ca296ead0c4c6a55eca86b5d..4cd97cbe9a49e4c61ca789a3a88a1bf4cb4ba465 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/rget.c
rename to libc/upstream-openbsd/lib/libc/stdio/rget.c
index bdc0311674e112b9ca296ead0c4c6a55eca86b5d..4cd97cbe9a49e4c61ca789a3a88a1bf4cb4ba465 100644 (file)
+/* $OpenBSD: rget.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rget.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <stdio.h>
#include "local.h"
int
__srget(FILE *fp)
{
+ _SET_ORIENTATION(fp, -1);
if (__srefill(fp) == 0) {
fp->_r--;
return (*fp->_p++);
similarity index 95%
rename from libc/stdio/scanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/scanf.c
index 71194d04e7a69144d0e11685029e15e35eb2366a..90cf12a3ba721e94f3668410cbe44182a307bfec 100644 (file)
rename from libc/stdio/scanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/scanf.c
index 71194d04e7a69144d0e11685029e15e35eb2366a..90cf12a3ba721e94f3668410cbe44182a307bfec 100644 (file)
--- a/libc/stdio/scanf.c
-/* $OpenBSD: scanf.c,v 1.9 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: scanf.c,v 1.10 2011/05/30 18:48:33 martynas Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
#include <stdio.h>
#include <stdarg.h>
+/* SCANFLIKE1 */
int
scanf(const char *fmt, ...)
{
diff --git a/libc/upstream-freebsd/lib/libc/stdio/setbuf.c b/libc/upstream-openbsd/lib/libc/stdio/setbuf.c
similarity index 88%
rename from libc/upstream-freebsd/lib/libc/stdio/setbuf.c
rename to libc/upstream-openbsd/lib/libc/stdio/setbuf.c
index 5c65f976c9de1aeaa115ec70c48320d8e460ace4..883b89532b8d9e5ac08c3d101cba74a38c8a3b63 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/setbuf.c
rename to libc/upstream-openbsd/lib/libc/stdio/setbuf.c
index 5c65f976c9de1aeaa115ec70c48320d8e460ace4..883b89532b8d9e5ac08c3d101cba74a38c8a3b63 100644 (file)
+/* $OpenBSD: setbuf.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setbuf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <stdio.h>
#include "local.h"
void
-setbuf(FILE * __restrict fp, char * __restrict buf)
+setbuf(FILE *fp, char *buf)
{
(void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}
diff --git a/libc/upstream-freebsd/lib/libc/stdio/setbuffer.c b/libc/upstream-openbsd/lib/libc/stdio/setbuffer.c
similarity index 88%
rename from libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
rename to libc/upstream-openbsd/lib/libc/stdio/setbuffer.c
index af5eb3cabf6e2de46ac27cd144568ecb970f5cbf..8725ff795589665ee731bb09fd04f4d0644daf40 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/setbuffer.c
rename to libc/upstream-openbsd/lib/libc/stdio/setbuffer.c
index af5eb3cabf6e2de46ac27cd144568ecb970f5cbf..8725ff795589665ee731bb09fd04f4d0644daf40 100644 (file)
+/* $OpenBSD: setbuffer.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setbuffer.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <stdio.h>
void
setbuffer(FILE *fp, char *buf, int size)
{
- (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
+ (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size);
}
/*
similarity index 99%
rename from libc/stdio/stdio.c
rename to libc/upstream-openbsd/lib/libc/stdio/stdio.c
index 1596ebf6c3ab1c7f4458a106097fa88af80eef70..a4a27b53b64cb6fb085f47f94b3df75a16259240 100644 (file)
rename from libc/stdio/stdio.c
rename to libc/upstream-openbsd/lib/libc/stdio/stdio.c
index 1596ebf6c3ab1c7f4458a106097fa88af80eef70..a4a27b53b64cb6fb085f47f94b3df75a16259240 100644 (file)
--- a/libc/stdio/stdio.c
{
FILE *fp = cookie;
int ret;
-
+
ret = read(fp->_file, buf, n);
/* if the read succeeded, update the current offset */
if (ret >= 0)
{
FILE *fp = cookie;
off_t ret;
-
+
ret = lseek(fp->_file, (off_t)offset, whence);
if (ret == (off_t)-1)
fp->_flags &= ~__SOFF;
diff --git a/libc/upstream-freebsd/lib/libc/stdio/tempnam.c b/libc/upstream-openbsd/lib/libc/stdio/tempnam.c
similarity index 71%
rename from libc/upstream-freebsd/lib/libc/stdio/tempnam.c
rename to libc/upstream-openbsd/lib/libc/stdio/tempnam.c
index e15746f31a4d9dd860434be3b6e8436a886ce673..e3f2ab6476cf7e4d6da0156bb64841b1196e3c3d 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/tempnam.c
rename to libc/upstream-openbsd/lib/libc/stdio/tempnam.c
index e15746f31a4d9dd860434be3b6e8436a886ce673..e3f2ab6476cf7e4d6da0156bb64841b1196e3c3d 100644 (file)
+/* $OpenBSD: tempnam.c,v 1.17 2013/09/30 12:02:35 millert Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)tempnam.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
#include <errno.h>
+#include <limits.h>
+#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <paths.h>
__warn_references(tempnam,
"warning: tempnam() possibly used unsafely; consider using mkstemp()");
char *
tempnam(const char *dir, const char *pfx)
{
- int sverrno;
+ int sverrno, len;
char *f, *name;
- if (!(name = malloc(MAXPATHLEN)))
+ if (!(name = malloc(PATH_MAX)))
return(NULL);
if (!pfx)
pfx = "tmp.";
- if (issetugid() == 0 && (f = getenv("TMPDIR"))) {
- (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
- *(f + strlen(f) - 1) == '/'? "": "/", pfx);
+ if (issetugid() == 0 && (f = getenv("TMPDIR")) && *f != '\0') {
+ len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f,
+ f[strlen(f) - 1] == '/' ? "" : "/", pfx);
+ if (len < 0 || len >= PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return(NULL);
+ }
if ((f = _mktemp(name)))
return(f);
}
- if ((f = (char *)dir)) {
- (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
- *(f + strlen(f) - 1) == '/'? "": "/", pfx);
+ if (dir != NULL) {
+ f = *dir ? (char *)dir : ".";
+ len = snprintf(name, PATH_MAX, "%s%s%sXXXXXXXXXX", f,
+ f[strlen(f) - 1] == '/' ? "" : "/", pfx);
+ if (len < 0 || len >= PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return(NULL);
+ }
if ((f = _mktemp(name)))
return(f);
}
f = P_tmpdir;
- (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
+ len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx);
+ if (len < 0 || len >= PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return(NULL);
+ }
if ((f = _mktemp(name)))
return(f);
f = _PATH_TMP;
- (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
+ len = snprintf(name, PATH_MAX, "%s%sXXXXXXXXX", f, pfx);
+ if (len < 0 || len >= PATH_MAX) {
+ errno = ENAMETOOLONG;
+ return(NULL);
+ }
if ((f = _mktemp(name)))
return(f);
diff --git a/libc/upstream-freebsd/lib/libc/stdio/tmpnam.c b/libc/upstream-openbsd/lib/libc/stdio/tmpnam.c
similarity index 88%
rename from libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
rename to libc/upstream-openbsd/lib/libc/stdio/tmpnam.c
index ce32dcc28149561c02da8baf903c66cf424c8527..32e0a22020230ee3f91a3ba2402b8415808ac5c4 100644 (file)
rename from libc/upstream-freebsd/lib/libc/stdio/tmpnam.c
rename to libc/upstream-openbsd/lib/libc/stdio/tmpnam.c
index ce32dcc28149561c02da8baf903c66cf424c8527..32e0a22020230ee3f91a3ba2402b8415808ac5c4 100644 (file)
+/* $OpenBSD: tmpnam.c,v 1.10 2005/08/08 08:05:36 espie Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)tmpnam.c 8.3 (Berkeley) 3/28/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/types.h>
#include <stdio.h>
if (s == NULL)
s = buf;
- (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXX", P_tmpdir, tmpcount);
+ (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXXXXX", P_tmpdir, tmpcount);
++tmpcount;
return (_mktemp(s));
}
similarity index 98%
rename from libc/stdio/ungetc.c
rename to libc/upstream-openbsd/lib/libc/stdio/ungetc.c
index b493d21be8dba7a6b35a9a28e97206708b19fb3e..675733aa6f79b13ed65d1d855e331a294c2d5334 100644 (file)
rename from libc/stdio/ungetc.c
rename to libc/upstream-openbsd/lib/libc/stdio/ungetc.c
index b493d21be8dba7a6b35a9a28e97206708b19fb3e..675733aa6f79b13ed65d1d855e331a294c2d5334 100644 (file)
--- a/libc/stdio/ungetc.c
-/* $OpenBSD: ungetc.c,v 1.9 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: ungetc.c,v 1.12 2009/11/09 00:18:27 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
similarity index 91%
rename from libc/stdio/vasprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vasprintf.c
index 1630ccbd0df13b70d737e8ef31713db1a0fc0f17..8fe7c5bb553b704f3e1ce8784d08ca63278c2498 100644 (file)
rename from libc/stdio/vasprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vasprintf.c
index 1630ccbd0df13b70d737e8ef31713db1a0fc0f17..8fe7c5bb553b704f3e1ce8784d08ca63278c2498 100644 (file)
--- a/libc/stdio/vasprintf.c
-/* $OpenBSD: vasprintf.c,v 1.13 2006/01/06 18:53:04 millert Exp $ */
+/* $OpenBSD: vasprintf.c,v 1.16 2009/11/09 00:18:27 kurt Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
return (ret);
err:
- free(f._bf._base);
+ if (f._bf._base) {
+ free(f._bf._base);
+ f._bf._base = NULL;
+ }
*str = NULL;
errno = ENOMEM;
return (-1);
similarity index 100%
rename from libc/stdio/vprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vprintf.c
rename from libc/stdio/vprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vprintf.c
similarity index 100%
rename from libc/stdio/vscanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vscanf.c
rename from libc/stdio/vscanf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vscanf.c
similarity index 97%
rename from libc/stdio/vsnprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vsnprintf.c
index ca30f94012eead46adb2e3161e0f31149018746a..8b1a088da8527fdec3c8d12f9a0ae56457d11370 100644 (file)
rename from libc/stdio/vsnprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vsnprintf.c
index ca30f94012eead46adb2e3161e0f31149018746a..8b1a088da8527fdec3c8d12f9a0ae56457d11370 100644 (file)
--- a/libc/stdio/vsnprintf.c
-/* $OpenBSD: vsnprintf.c,v 1.12 2006/01/06 18:53:04 millert Exp $ */
+/* $OpenBSD: vsnprintf.c,v 1.15 2009/11/09 00:18:28 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
similarity index 96%
rename from libc/stdio/vsprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vsprintf.c
index 846ee8a902007545681d142719440889c35baf24..308ff375ad26c110cba2bd6ed164088d6c65b467 100644 (file)
rename from libc/stdio/vsprintf.c
rename to libc/upstream-openbsd/lib/libc/stdio/vsprintf.c
index 846ee8a902007545681d142719440889c35baf24..308ff375ad26c110cba2bd6ed164088d6c65b467 100644 (file)
--- a/libc/stdio/vsprintf.c
-/* $OpenBSD: vsprintf.c,v 1.13 2006/01/06 18:53:04 millert Exp $ */
+/* $OpenBSD: vsprintf.c,v 1.16 2009/11/09 00:18:28 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
similarity index 98%
rename from libc/stdio/wbuf.c
rename to libc/upstream-openbsd/lib/libc/stdio/wbuf.c
index e09ac594ed2f001fb1f17ab6d0c6074f564126ca..6aa00e1d6c4665619934cbc0437b203ee760d0eb 100644 (file)
rename from libc/stdio/wbuf.c
rename to libc/upstream-openbsd/lib/libc/stdio/wbuf.c
index e09ac594ed2f001fb1f17ab6d0c6074f564126ca..6aa00e1d6c4665619934cbc0437b203ee760d0eb 100644 (file)
--- a/libc/stdio/wbuf.c
-/* $OpenBSD: wbuf.c,v 1.9 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: wbuf.c,v 1.12 2009/11/09 00:18:28 kurt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
similarity index 74%
rename from libc/stdlib/strtoull.c
rename to libc/upstream-openbsd/lib/libc/stdlib/atoi.c
index 36698acc66190530514bdd40e5ffa8a230355f9c..b0842678e2f59b395e696bf0f8e09114ae3b696d 100644 (file)
rename from libc/stdlib/strtoull.c
rename to libc/upstream-openbsd/lib/libc/stdlib/atoi.c
index 36698acc66190530514bdd40e5ffa8a230355f9c..b0842678e2f59b395e696bf0f8e09114ae3b696d 100644 (file)
--- a/libc/stdlib/strtoull.c
-/* $OpenBSD: strtoull.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */
-/*-
- * Copyright (c) 1992 The Regents of the University of California.
+/* $OpenBSD: atoi.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/*
+ * Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* SUCH DAMAGE.
*/
-#include <sys/types.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
#include <stdlib.h>
-#include <inttypes.h>
-/*
- * Convert a string to an unsigned long long.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long long
-strtoull(const char *nptr, char **endptr, int base)
+int
+atoi(const char *str)
{
- return (unsigned long long)strtoumax(nptr, endptr, base);
+ return((int)strtol(str, (char **)NULL, 10));
}
diff --git a/libc/upstream-openbsd/lib/libc/stdlib/atol.c b/libc/upstream-openbsd/lib/libc/stdlib/atol.c
--- /dev/null
@@ -0,0 +1,37 @@
+/* $OpenBSD: atol.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * 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. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 <stdlib.h>
+
+long
+atol(const char *str)
+{
+ return(strtol(str, (char **)NULL, 10));
+}
similarity index 76%
rename from libc/stdlib/strtoll.c
rename to libc/upstream-openbsd/lib/libc/stdlib/atoll.c
index 3c75271b02a2244118ea5f4acd543dcc7b79b999..a65e682cfb4db2ac2571f0ead0c1165284d133a6 100644 (file)
rename from libc/stdlib/strtoll.c
rename to libc/upstream-openbsd/lib/libc/stdlib/atoll.c
index 3c75271b02a2244118ea5f4acd543dcc7b79b999..a65e682cfb4db2ac2571f0ead0c1165284d133a6 100644 (file)
--- a/libc/stdlib/strtoll.c
-/* $OpenBSD: strtoll.c,v 1.6 2005/11/10 10:00:17 espie Exp $ */
-/*-
- * Copyright (c) 1992 The Regents of the University of California.
+/* $OpenBSD: atoll.c,v 1.3 2005/08/08 08:05:36 espie Exp $ */
+/*
+ * Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* SUCH DAMAGE.
*/
-#include <sys/types.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
#include <stdlib.h>
-#include <inttypes.h>
-/*
- * Convert a string to a long long.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
long long
-strtoll(const char *nptr, char **endptr, int base)
+atoll(str)
+ const char *str;
{
- return strtoimax(nptr, endptr, base);
+ return(strtoll(str, (char **)NULL, 10));
}
-
similarity index 82%
rename from libc/stdlib/strtoimax.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoimax.c
index 0b4323d3e58e7043b01ba4647f5e644ff6c9d655..2c77f41650390be3d6af2c1b233b2c2040b5b217 100644 (file)
rename from libc/stdlib/strtoimax.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoimax.c
index 0b4323d3e58e7043b01ba4647f5e644ff6c9d655..2c77f41650390be3d6af2c1b233b2c2040b5b217 100644 (file)
--- a/libc/stdlib/strtoimax.c
* Set any if any `digits' consumed; make it negative to indicate
* overflow.
*/
-
- /* BIONIC: avoid division and module for common cases */
-#define CASE_BASE(x) \
- case x: \
- if (neg) { \
- cutlim = INTMAX_MIN % x; \
- cutoff = INTMAX_MIN / x; \
- } else { \
- cutlim = INTMAX_MAX % x; \
- cutoff = INTMAX_MAX / x; \
- }; \
- break
-
- switch (base) {
- case 4:
- if (neg) {
- cutlim = (int)(INTMAX_MIN % 4);
- cutoff = INTMAX_MIN / 4;
- } else {
- cutlim = (int)(INTMAX_MAX % 4);
- cutoff = INTMAX_MAX / 4;
- }
- break;
-
- CASE_BASE(8);
- CASE_BASE(10);
- CASE_BASE(16);
- default:
- cutoff = neg ? INTMAX_MIN : INTMAX_MAX;
- cutlim = cutoff % base;
- cutoff /= base;
- }
-#undef CASE_BASE
-
+ cutoff = neg ? INTMAX_MIN : INTMAX_MAX;
+ cutlim = cutoff % base;
+ cutoff /= base;
if (neg) {
if (cutlim > 0) {
cutlim -= base;
similarity index 93%
rename from libc/stdlib/strtol.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtol.c
index a3cdbcdd233c5d015fa8d86bf2f610962d1d7203..dc2cf8871cc96651e71576c6ac6fe5ab0ea5738b 100644 (file)
rename from libc/stdlib/strtol.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtol.c
index a3cdbcdd233c5d015fa8d86bf2f610962d1d7203..dc2cf8871cc96651e71576c6ac6fe5ab0ea5738b 100644 (file)
--- a/libc/stdlib/strtol.c
-/* $OpenBSD: strtol.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: strtol.c,v 1.9 2013/04/17 17:40:35 tedu Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
int c;
int neg, any, cutlim;
+ /*
+ * Ensure that base is between 2 and 36 inclusive, or the special
+ * value of 0.
+ */
+ if (base != 0 && (base < 2 || base > 36)) {
+ if (endptr != 0)
+ *endptr = (char *)nptr;
+ errno = EINVAL;
+ return 0;
+ }
+
/*
* Skip white space and pick up leading +/- sign if any.
* If base is 0, allow 0x for hex and 0 for octal, else
diff --git a/libc/upstream-openbsd/lib/libc/stdlib/strtoll.c b/libc/upstream-openbsd/lib/libc/stdlib/strtoll.c
--- /dev/null
@@ -0,0 +1,144 @@
+/* $OpenBSD: strtoll.c,v 1.7 2013/03/28 18:09:38 martynas Exp $ */
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * 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. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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/types.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+/*
+ * Convert a string to a long long.
+ *
+ * Ignores `locale' stuff. Assumes that the upper and lower case
+ * alphabets and digits are each contiguous.
+ */
+long long
+strtoll(const char *nptr, char **endptr, int base)
+{
+ const char *s;
+ long long acc, cutoff;
+ int c;
+ int neg, any, cutlim;
+
+ /*
+ * Skip white space and pick up leading +/- sign if any.
+ * If base is 0, allow 0x for hex and 0 for octal, else
+ * assume decimal; if base is already 16, allow 0x.
+ */
+ s = nptr;
+ do {
+ c = (unsigned char) *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else {
+ neg = 0;
+ if (c == '+')
+ c = *s++;
+ }
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
+ /*
+ * Compute the cutoff value between legal numbers and illegal
+ * numbers. That is the largest legal value, divided by the
+ * base. An input number that is greater than this value, if
+ * followed by a legal input character, is too big. One that
+ * is equal to this value may be valid or not; the limit
+ * between valid and invalid numbers is then based on the last
+ * digit. For instance, if the range for long longs is
+ * [-9223372036854775808..9223372036854775807] and the input base
+ * is 10, cutoff will be set to 922337203685477580 and cutlim to
+ * either 7 (neg==0) or 8 (neg==1), meaning that if we have
+ * accumulated a value > 922337203685477580, or equal but the
+ * next digit is > 7 (or 8), the number is too big, and we will
+ * return a range error.
+ *
+ * Set any if any `digits' consumed; make it negative to indicate
+ * overflow.
+ */
+ cutoff = neg ? LLONG_MIN : LLONG_MAX;
+ cutlim = cutoff % base;
+ cutoff /= base;
+ if (neg) {
+ if (cutlim > 0) {
+ cutlim -= base;
+ cutoff += 1;
+ }
+ cutlim = -cutlim;
+ }
+ for (acc = 0, any = 0;; c = (unsigned char) *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0)
+ continue;
+ if (neg) {
+ if (acc < cutoff || (acc == cutoff && c > cutlim)) {
+ any = -1;
+ acc = LLONG_MIN;
+ errno = ERANGE;
+ } else {
+ any = 1;
+ acc *= base;
+ acc -= c;
+ }
+ } else {
+ if (acc > cutoff || (acc == cutoff && c > cutlim)) {
+ any = -1;
+ acc = LLONG_MAX;
+ errno = ERANGE;
+ } else {
+ any = 1;
+ acc *= base;
+ acc += c;
+ }
+ }
+ }
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+ return (acc);
+}
+
+__strong_alias(strtoq, strtoll);
similarity index 97%
rename from libc/stdlib/strtoul.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoul.c
index 61dbb6fac6e4e34f6015a0d522d88e91b0b4a349..a236365d2f914c9b74aacb7e14feb0b1e06458d5 100644 (file)
rename from libc/stdlib/strtoul.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoul.c
index 61dbb6fac6e4e34f6015a0d522d88e91b0b4a349..a236365d2f914c9b74aacb7e14feb0b1e06458d5 100644 (file)
--- a/libc/stdlib/strtoul.c
-/* $OpenBSD: strtoul.c,v 1.7 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: strtoul.c,v 1.8 2013/04/17 17:40:35 tedu Exp $ */
/*
* Copyright (c) 1990 Regents of the University of California.
* All rights reserved.
diff --git a/libc/upstream-openbsd/lib/libc/stdlib/strtoull.c b/libc/upstream-openbsd/lib/libc/stdlib/strtoull.c
--- /dev/null
@@ -0,0 +1,106 @@
+/* $OpenBSD: strtoull.c,v 1.6 2013/03/28 18:09:38 martynas Exp $ */
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * 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. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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/types.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+/*
+ * Convert a string to an unsigned long long.
+ *
+ * Ignores `locale' stuff. Assumes that the upper and lower case
+ * alphabets and digits are each contiguous.
+ */
+unsigned long long
+strtoull(const char *nptr, char **endptr, int base)
+{
+ const char *s;
+ unsigned long long acc, cutoff;
+ int c;
+ int neg, any, cutlim;
+
+ /*
+ * See strtoq for comments as to the logic used.
+ */
+ s = nptr;
+ do {
+ c = (unsigned char) *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else {
+ neg = 0;
+ if (c == '+')
+ c = *s++;
+ }
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+
+ cutoff = ULLONG_MAX / (unsigned long long)base;
+ cutlim = ULLONG_MAX % (unsigned long long)base;
+ for (acc = 0, any = 0;; c = (unsigned char) *s++) {
+ if (isdigit(c))
+ c -= '0';
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ if (any < 0)
+ continue;
+ if (acc > cutoff || (acc == cutoff && c > cutlim)) {
+ any = -1;
+ acc = ULLONG_MAX;
+ errno = ERANGE;
+ } else {
+ any = 1;
+ acc *= (unsigned long long)base;
+ acc += c;
+ }
+ }
+ if (neg && any > 0)
+ acc = -acc;
+ if (endptr != 0)
+ *endptr = (char *) (any ? s - 1 : nptr);
+ return (acc);
+}
+
+__strong_alias(strtouq, strtoull);
similarity index 88%
rename from libc/stdlib/strtoumax.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoumax.c
index e1ff623774544d801d62b2478e51edc4c0da792d..ce6e2c00f18fc489d727e13df4690cd07101e85c 100644 (file)
rename from libc/stdlib/strtoumax.c
rename to libc/upstream-openbsd/lib/libc/stdlib/strtoumax.c
index e1ff623774544d801d62b2478e51edc4c0da792d..ce6e2c00f18fc489d727e13df4690cd07101e85c 100644 (file)
--- a/libc/stdlib/strtoumax.c
if (c == '-') {
neg = 1;
c = *s++;
- } else {
+ } else {
neg = 0;
if (c == '+')
c = *s++;
if (base == 0)
base = c == '0' ? 8 : 10;
- /* BIONIC: avoid division and modulo for common cases */
-#define CASE_BASE(x) \
- case x: cutoff = UINTMAX_MAX / x; \
- cutlim = UINTMAX_MAX % x; \
- break
-
- switch (base) {
- CASE_BASE(8);
- CASE_BASE(10);
- CASE_BASE(16);
- default:
- cutoff = UINTMAX_MAX / base;
- cutlim = UINTMAX_MAX % base;
- }
-
+ cutoff = UINTMAX_MAX / (uintmax_t)base;
+ cutlim = UINTMAX_MAX % (uintmax_t)base;
for (acc = 0, any = 0;; c = (unsigned char) *s++) {
if (isdigit(c))
c -= '0';
similarity index 100%
rename from libc/string/strcasecmp.c
rename to libc/upstream-openbsd/lib/libc/string/strcasecmp.c
rename from libc/string/strcasecmp.c
rename to libc/upstream-openbsd/lib/libc/string/strcasecmp.c
similarity index 100%
rename from libc/string/strcspn.c
rename to libc/upstream-openbsd/lib/libc/string/strcspn.c
rename from libc/string/strcspn.c
rename to libc/upstream-openbsd/lib/libc/string/strcspn.c
similarity index 100%
rename from libc/string/strdup.c
rename to libc/upstream-openbsd/lib/libc/string/strdup.c
rename from libc/string/strdup.c
rename to libc/upstream-openbsd/lib/libc/string/strdup.c
diff --git a/libc/upstream-openbsd/lib/libc/string/strndup.c b/libc/upstream-openbsd/lib/libc/string/strndup.c
--- /dev/null
@@ -0,0 +1,39 @@
+/* $OpenBSD: strndup.c,v 1.1 2010/05/18 22:24:55 tedu Exp $ */
+
+/*
+ * Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+char *
+strndup(const char *str, size_t maxlen)
+{
+ char *copy;
+ size_t len;
+
+ len = strnlen(str, maxlen);
+ copy = malloc(len + 1);
+ if (copy != NULL) {
+ (void)memcpy(copy, str, len);
+ copy[len] = '\0';
+ }
+
+ return copy;
+}
similarity index 100%
rename from libc/string/strpbrk.c
rename to libc/upstream-openbsd/lib/libc/string/strpbrk.c
rename from libc/string/strpbrk.c
rename to libc/upstream-openbsd/lib/libc/string/strpbrk.c
similarity index 98%
rename from libc/string/strsep.c
rename to libc/upstream-openbsd/lib/libc/string/strsep.c
index c44bc5b2ac809c43f9ac2ad7ccd1dd0514c6bfc5..bcca681e0334d1688e3e1a97bfc5847e1eae2b07 100644 (file)
rename from libc/string/strsep.c
rename to libc/upstream-openbsd/lib/libc/string/strsep.c
index c44bc5b2ac809c43f9ac2ad7ccd1dd0514c6bfc5..bcca681e0334d1688e3e1a97bfc5847e1eae2b07 100644 (file)
--- a/libc/string/strsep.c
/*
* Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
+ * strings separated by characters from delim.
*
* Writes NULs into the string at *stringp to end tokens.
* delim need not remain constant from call to call.
similarity index 100%
rename from libc/string/strspn.c
rename to libc/upstream-openbsd/lib/libc/string/strspn.c
rename from libc/string/strspn.c
rename to libc/upstream-openbsd/lib/libc/string/strspn.c
similarity index 100%
rename from libc/string/strstr.c
rename to libc/upstream-openbsd/lib/libc/string/strstr.c
rename from libc/string/strstr.c
rename to libc/upstream-openbsd/lib/libc/string/strstr.c
similarity index 100%
rename from libc/string/strtok.c
rename to libc/upstream-openbsd/lib/libc/string/strtok.c
rename from libc/string/strtok.c
rename to libc/upstream-openbsd/lib/libc/string/strtok.c
similarity index 69%
rename from libc/include/asm/page.h
rename to libc/upstream-openbsd/openbsd-compat.h
index d401a3fe3e25b696d05df03b780071afc02e3187..428156fddc11fed6aa629d4f40619e12119fc62b 100644 (file)
rename from libc/include/asm/page.h
rename to libc/upstream-openbsd/openbsd-compat.h
index d401a3fe3e25b696d05df03b780071afc02e3187..428156fddc11fed6aa629d4f40619e12119fc62b 100644 (file)
--- a/libc/include/asm/page.h
/*
- * Copyright (C) 2013 The Android Open Source Project
+ * Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#ifndef __ASM_PAGE_H
-#define __ASM_PAGE_H
+#ifndef _BIONIC_OPENBSD_COMPAT_H_included
+#define _BIONIC_OPENBSD_COMPAT_H_included
-/* New code should use sysconf(_SC_PAGESIZE) instead. */
-#define PAGE_SHIFT 12
-#define PAGE_SIZE (1ULL << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE - 1))
+#define _GNU_SOURCE
#endif
index 55618b7f3aede2811d508355fad27f7a9c7580c9..c96ede787582eee89fa53f15366812c2219890e2 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(_start)
mov x0, sp
index 9a85925cfd4fa7f3ee19710c7ec8620a4d7b5684..9e741c022e508ad102eb1535480efb46a35e14c0 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32)
#define ELF_DYNSZ 8
index 9ecad1aeedd26d73c9f3dddb0adbda6df1287a03..aff46600df3e4240d4dfa325d1035ac29c479597 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(_start)
/* Pass elfdata to __linker_init. */
diff --git a/linker/linker.cpp b/linker/linker.cpp
index ead9bd43d82c660b005225ab97f5230288495daf..156864c99b40de2cc5df1bde6e04ba95a62d60c4 100755 (executable)
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
case DT_MIPS_RLD_MAP:
// Set the DT_MIPS_RLD_MAP entry to the address of _r_debug for GDB.
{
- r_debug** dp = reinterpret_cast<r_debug**>(d->d_un.d_ptr);
+ r_debug** dp = reinterpret_cast<r_debug**>(base + d->d_un.d_ptr);
*dp = &_r_debug;
}
break;
diff --git a/tests/math_test.cpp b/tests/math_test.cpp
index c8974d3b02b5633f7a3d0872c2fb665fe6d14f12..fc561bc8c211318c7a7f2fe5dbc3a41765ff781b 100644 (file)
--- a/tests/math_test.cpp
+++ b/tests/math_test.cpp
#define _DECLARE_C99_LDBL_MATH 1
+// This include (and the associated definition of __test_capture_signbit)
+// must be placed before any files that include <cmath> (gtest.h in this case).
+//
+// <math.h> is required to define generic macros signbit, isfinite and
+// several other such functions.
+//
+// <cmath> is required to undef declarations of these macros in the global
+// namespace and make equivalent functions available in namespace std. Our
+// stlport implementation does this only for signbit, isfinite, isinf and
+// isnan.
+//
+// NOTE: We don't write our test using std::signbit because we want to be
+// sure that we're testing the bionic version of signbit. The C++ libraries
+// are free to reimplement signbit or delegate to compiler builtins if they
+// please.
+#include <math.h>
+
+namespace {
+template<typename T> inline int test_capture_signbit(const T in) {
+ return signbit(in);
+}
+template<typename T> inline int test_capture_isfinite(const T in) {
+ return isfinite(in);
+}
+template<typename T> inline int test_capture_isnan(const T in) {
+ return isnan(in);
+}
+template<typename T> inline int test_capture_isinf(const T in) {
+ return isinf(in);
+}
+}
+
#include <gtest/gtest.h>
#include <fenv.h>
#include <limits.h>
-#include <math.h>
#include <stdint.h>
float float_subnormal() {
ASSERT_EQ(FP_ZERO, fpclassify(0.0));
}
-/* TODO: stlport breaks the isfinite macro
TEST(math, isfinite) {
- ASSERT_TRUE(isfinite(123.0f));
- ASSERT_TRUE(isfinite(123.0));
- ASSERT_FALSE(isfinite(HUGE_VALF));
- ASSERT_FALSE(isfinite(HUGE_VAL));
+ ASSERT_TRUE(test_capture_isfinite(123.0f));
+ ASSERT_TRUE(test_capture_isfinite(123.0));
+ ASSERT_FALSE(test_capture_isfinite(HUGE_VALF));
+ ASSERT_FALSE(test_capture_isfinite(HUGE_VAL));
}
-*/
TEST(math, isinf) {
- ASSERT_FALSE(isinf(123.0f));
- ASSERT_FALSE(isinf(123.0));
- ASSERT_TRUE(isinf(HUGE_VALF));
- ASSERT_TRUE(isinf(HUGE_VAL));
+ ASSERT_FALSE(test_capture_isinf(123.0f));
+ ASSERT_FALSE(test_capture_isinf(123.0));
+ ASSERT_TRUE(test_capture_isinf(HUGE_VALF));
+ ASSERT_TRUE(test_capture_isinf(HUGE_VAL));
}
TEST(math, isnan) {
- ASSERT_FALSE(isnan(123.0f));
- ASSERT_FALSE(isnan(123.0));
- ASSERT_TRUE(isnan(nanf("")));
- ASSERT_TRUE(isnan(nan("")));
+ ASSERT_FALSE(test_capture_isnan(123.0f));
+ ASSERT_FALSE(test_capture_isnan(123.0));
+ ASSERT_TRUE(test_capture_isnan(nanf("")));
+ ASSERT_TRUE(test_capture_isnan(nan("")));
}
TEST(math, isnormal) {
}
// TODO: isgreater, isgreaterequals, isless, islessequal, islessgreater, isunordered
-
-/* TODO: stlport breaks the signbit macro
TEST(math, signbit) {
- ASSERT_EQ(0, signbit(0.0f));
- ASSERT_EQ(0, signbit(0.0));
+ ASSERT_EQ(0, test_capture_signbit(0.0f));
+ ASSERT_EQ(0, test_capture_signbit(0.0));
- ASSERT_EQ(0, signbit(1.0f));
- ASSERT_EQ(0, signbit(1.0));
+ ASSERT_EQ(0, test_capture_signbit(1.0f));
+ ASSERT_EQ(0, test_capture_signbit(1.0));
- ASSERT_NE(0, signbit(-1.0f));
- ASSERT_NE(0, signbit(-1.0));
+ ASSERT_NE(0, test_capture_signbit(-1.0f));
+ ASSERT_NE(0, test_capture_signbit(-1.0));
}
-*/
TEST(math, __fpclassifyd) {
#if defined(__BIONIC__)
index 57067d70f1511bd0cadd4c439828b3461220d575..6ac279f2594924322a3021082561b8b0eae953c2 100644 (file)
--- a/tests/sys_mman_test.cpp
+++ b/tests/sys_mman_test.cpp
#include <unistd.h>
TEST(sys_mman, mmap_negative) {
- off_t off = -sysconf(_SC_PAGESIZE); // Aligned but negative.
+ off_t off = -sysconf(_SC_PAGE_SIZE); // Aligned but negative.
ASSERT_EQ(MAP_FAILED, mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, off));
}
TEST(sys_mman, mmap64_negative) {
- off64_t off64 = -sysconf(_SC_PAGESIZE); // Aligned but negative.
+ off64_t off64 = -sysconf(_SC_PAGE_SIZE); // Aligned but negative.
ASSERT_EQ(MAP_FAILED, mmap64(NULL, 4096, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, off64));
}