Compare commits

..

180 Commits

Author SHA1 Message Date
Robert Greenwalt
028ccf5d40 Merge "Avoid multiple dns lookups for the same query" 2012-06-12 15:06:24 -07:00
Elliott Hughes
e096144512 Merge "Remove the meaningless on Linux if_dl.h header." 2012-06-11 16:49:57 -07:00
Elliott Hughes
c75491e291 Merge "Remove an obsolete jamfile." 2012-06-11 16:29:46 -07:00
Elliott Hughes
4c19e4f64f Remove an obsolete jamfile.
Was bionic ever built with jam? Weird!

Change-Id: Iea9a7af8bf46ee8319963e642da48e3bb49f6c60
2012-06-11 16:17:45 -07:00
Elliott Hughes
c3d45b822c Remove the meaningless on Linux if_dl.h header.
This was misleading 'configure' into thinking we actually support AF_LINK,
but we're Linux, so we don't, and we never implemented the functions we
declared here either.

Reported to AOSP by Jun-ya Kato.

(cherry-pick of 5056f1fad1187cd67729bb04ba72397d78256f03.)

Change-Id: Ic67f674d2221497c8166994812bb5fc7f0831066
2012-06-11 15:13:37 -07:00
Elliott Hughes
2b89f1e37d Merge "Fix sysconf(_SC_NPROCESSORS_CONF) on ARM." 2012-06-06 13:32:19 -07:00
Elliott Hughes
a985076bfe Fix sysconf(_SC_NPROCESSORS_CONF) on ARM.
Bug: http://code.google.com/p/enh/issues/detail?id=33
Change-Id: I679b4cd888d362031042284e8edf01c5273a92aa
2012-06-06 12:04:38 -07:00
Elliott Hughes
c2bba24d0a Merge "Give the timer_create SIGEV_THREAD helper threads sensible names." 2012-06-06 10:44:32 -07:00
Elliott Hughes
470631ed79 Give the timer_create SIGEV_THREAD helper threads sensible names.
Bug: 6609676
Change-Id: I286b197c75beee4d9930b0973f2d7dd47c14e91c
2012-06-06 10:32:56 -07:00
Jean-Baptiste Queru
c7882ab2a9 Merge "bionic: add clean kernel header ucontext.h" 2012-05-17 12:25:02 -07:00
Elliott Hughes
70cf0bc049 Merge "Remove the last references to SuperH." 2012-05-16 09:56:37 -07:00
Elliott Hughes
e33af61c70 Remove the last references to SuperH.
Change-Id: Icb44c1f94cb178d90b4c2b1e8f6d175586aec4e1
2012-05-15 17:08:41 -07:00
Nick Kralevich
cf8e554c72 Merge "Make the linker relocatable." 2012-05-15 15:10:24 -07:00
Nick Kralevich
36e0345af8 Merge "linker: set LOCAL_NO_CRT := true" 2012-05-15 15:10:12 -07:00
Nick Kralevich
1adc7c0389 Merge "linker: Fix the computation of si->base" 2012-05-15 15:10:01 -07:00
Nick Kralevich
cd6b2007b8 Merge "Add linker support for PIE" 2012-05-15 15:09:45 -07:00
Nick Kralevich
dcbc3787bf Make the linker relocatable.
Previously, the linker always loaded itself into the same
location in memory, which inhibited the effectiveness of Android's
ASLR implementation. Modify the linker code so it can be relocatable
and link itself at runtime.

Change-Id: Ia80273d7a00ff648b4da545f4b69debee6343968
2012-05-15 10:41:14 -07:00
Nick Kralevich
e742c1f564 linker: set LOCAL_NO_CRT := true
Use LOCAL_NO_CRT to prevent linking against crtbegin.o, rather than
messing with build rules. This also prevents linking against crtend.o,
which isn't needed for the linker.

Change-Id: I0c5b9999be7e8676560fe145c1c033ffce8db4d1
2012-05-15 10:08:39 -07:00
David 'Digit' Turner
077891b199 linker: Fix the computation of si->base
The computation of si->base assumed that the first entry in the
program header table is a PT_PHDR. This results in the dynamic
linker crashing with a SIGSEGV/MAPERR when trying to load some
of the NDK unit test programs, which happen to have an EXIDX
header first, followed byu a PHDR one.

This patch fixes the computation by parsing the program header
table, looking explicitely for the PHDR entry. This fixes the
load of the NDK unit test programs, and doesn't affect system
libraries.

Change-Id: Id18ea6037dbe950b5abbbce816c2960321f0b81d
2012-05-15 09:58:33 -07:00
Nick Kralevich
6cdefd06c0 Add linker support for PIE
Modify the dynamic linker so that executables can be loaded
at locations other than 0x00000000.

Modify crtbegin* so that non-PIC compilant "thumb interwork
veneers" are not created by the linker.

Bug: 5323301
Change-Id: Iece0272e2b708c79034f302c20160e1fe9029588
2012-05-15 09:56:32 -07:00
Kito Cheng
c425bc0532 bionic: add clean kernel header ucontext.h
Change-Id: I34fd0b0147fa33fd74c13480bc11827634233a41
2012-05-14 01:42:12 +08:00
Elliott Hughes
4f05d1c758 Merge "bionic/x86: Optimization for memcpy" 2012-05-10 10:14:44 -07:00
Elliott Hughes
edb7cad9b7 Merge "Actually set the header guard in "linux-syscalls.h"." 2012-05-09 16:39:40 -07:00
Elliott Hughes
1928523c87 Actually set the header guard in "linux-syscalls.h".
Spotted while merging a MIPS change.

Change-Id: I36fb5a07d0bba0c117e9fe9733957bd37ca4b4c0
2012-05-09 16:34:11 -07:00
Elliott Hughes
e54089079b Merge "[MIPS] Add support for MIPS syscalls" 2012-05-09 11:50:07 -07:00
Raghu Gandham
1fa0d84957 [MIPS] Add support for MIPS syscalls
Change-Id: I4deba67e15c865c4c2db03064c04098a09828ea6
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
2012-05-09 11:46:28 -07:00
Elliott Hughes
7eb1cc23f8 Merge "bionic: allow the board to customize MALLOC_ALIGNMENT" 2012-05-09 09:52:56 -07:00
Jack Ren
2fd81ef71c bionic: allow the board to customize MALLOC_ALIGNMENT
Currently the dlmalloc allocates the memory with 8-byte alignment.
According to the com.aurorasoftworks.quadrant.ui.professional benchmark data:
We can get much better memory performance if we change it to be 16-byte aligned.
For example, On Nexus-S:
8-byte aligned :
    1378 1070  1142 1665 1765  1163 1179  1263  1404 avg: 1336.555555556
16-byte aligned:
    1691 1731  1780 1691 1671  1678 1802  1758  1780 avg: 1731.333333333
                                                    gain: 29.53%

That patch provides flexibity to customize the MALLOC_ALIGNMENT from the
board config.The macro MALLOC_ALIGNMENT defaults to 8.
To change it, please define BOARD_MALLOC_ALIGNMENT in the BoardConfig.mk:
BOARD_MALLOC_ALIGNMENT := <whatever>

Change-Id: I8da0376944a0bbcef1d0fc026bfb6d9125db9739
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
2012-05-09 09:52:22 -07:00
Elliott Hughes
fd95503347 Merge "pthread: Invalidate stale stack pointers on pthread_exit()" 2012-05-09 09:46:02 -07:00
Bjorn Andersson
0753dc653e pthread: Invalidate stale stack pointers on pthread_exit()
A call to pthread_key_delete() after pthread_exit() have unmapped the stack of a thread
but before the ongoing pthread_join() have finished executing will result in an access
to unmapped memory.
Avoid this by invalidating the stack_base and tls pointers during pthread_exit().

This is based on the investigation and proprosed solution by
Srinavasa Nagaraju <srinavasa.x.nagaraju@sonyericsson.com>

Change-Id: I145fb5d57930e91b00f1609d7b2cd16a55d5b3a9
2012-05-08 17:43:57 -07:00
Elliott Hughes
3919b96ecc Merge "Implement the "abort" stub in assembly for ARM." 2012-05-08 14:54:57 -07:00
Ben Cheng
eda7be454d Implement the "abort" stub in assembly for ARM.
So that we can always get the full stack trace regardless of gcc's handling
of the "noreturn" attribute associated with abort().

(Cherry pick of Id264a5167e7cabbf11515fbc48f5469c527e34d4.)

Bug: 6455193

Conflicts:

	libc/Android.mk

Change-Id: I568fc5303fd1d747075ca933355f914122f94dac
2012-05-08 14:47:20 -07:00
Jack Ren
c47703a521 bionic/x86: Optimization for memcpy
Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Wei A Jin <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>

Conflicts:

	libc/arch-x86/string/ssse3-memcpy5.S

Change-Id: I41e70d1d19d5457e65c89b64da452fbdaf3a00a7
2012-05-08 12:18:25 -07:00
Elliott Hughes
20bea00090 Merge "Cherry-pick "generate PIC code"." 2012-05-08 11:56:13 -07:00
Nick Kralevich
5982e33aca Cherry-pick "generate PIC code".
Change-Id: I7d5f2e5663df263493f65e364c959e663fc4d13a
2012-05-08 11:53:28 -07:00
Elliott Hughes
6cf3c7c50a Merge "Let pthread_create fail if schedparam can't be set" 2012-05-08 10:56:01 -07:00
Pierre Peiffer
d0c884d359 Let pthread_create fail if schedparam can't be set
The creation of a thread succeeds even if the requested scheduling
parameters can not be set. This is not POSIX compliant, and even
worse, it leads to a wrong behavior. Let pthread_create() fail in this
case.

Change-Id: Ice66e2a720975c6bde9fe86c2cf8f649533a169c
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2012-05-08 10:54:51 -07:00
Mattias Falk
a59cfcfd08 Avoid multiple dns lookups for the same query
If two or more rapid dns requests for the same server are done
from different threads it turns into separate dns reques, if
the response of the request isn't found in the cache.

This patch avoid multiple request for the same server by
letting subsequents request wait until the first request
has finished.

Change-Id: Ic72ea0e7d3964a4164eddf866feb4357ec4dfe54
2012-05-07 18:04:25 -07:00
Elliott Hughes
e3bc7192ec Merge "bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()" 2012-05-07 10:51:29 -07:00
Xi Wang
7f5aa4f35e bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()
The allocation size in chk_malloc(), leak_malloc(), and leak_memalign()
functions may be rounded up to a small value, leading to buffer overflows.
The code only runs in debugging mode.

This patch complements commit 6f04a0f4 (CVE-2009-0607).

Change-Id: Id899bcd2bcd2ea2205e5753c433390710032dc83
Signed-off-by: Xi Wang <xi.wang@gmail.com>
2012-05-07 10:50:21 -07:00
Elliott Hughes
73a6566da3 Merge "Remove expired dns cache entries before removing oldest" 2012-05-07 10:41:53 -07:00
Elliott Hughes
8657eafc35 Merge "Adjust memcpy for ARM Cortex A9 cache line size" 2012-05-07 09:13:35 -07:00
Henrik Smiding
fe6338da91 Adjust memcpy for ARM Cortex A9 cache line size
ARM Cortex A8 use 64 bytes and ARM Cortex A9 use 32 bytes cache line
size.

The following patch:
  Adds code to adjust memcpy cache line size to match A9 cache line
  size.
  Adds a flag to select between 32 bytes and 64 bytes cache line
  size.

  Copyright (C) ST-Ericsson SA 2010
    Modified neon implementation to fit Cortex A9 cache line size
    Author: Henrik Smiding henrik.smiding@stericsson.com for
            ST-Ericsson.

Change-Id: I8a55946bfb074e6ec0a14805ed65f73fcd0984a3
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2012-05-07 14:18:02 +02:00
Elliott Hughes
f7db5ecc4d Merge "MIPS support to libm, libdl and libthread_db" 2012-05-04 12:00:19 -07:00
Chris Dearman
726800e8f4 MIPS support to libm, libdl and libthread_db
Change-Id: I9106721af7fe0cd45df82976250db0d300a20117
Signed-off-by: Raghu Gandham <raghu@mips.com>
2012-05-04 11:34:40 -07:00
Elliott Hughes
10579fc43d Merge "Update s_fabsl.c to upstream head." 2012-04-30 22:35:02 -07:00
Elliott Hughes
7735a38935 Update s_fabsl.c to upstream head.
Bug: http://code.google.com/p/android/issues/detail?id=29539
Change-Id: I843dcfcbfe49e8e9f43c49aae6ade1edb57a3053
2012-04-30 16:12:43 -07:00
Ken Sumrall
6baffed252 Add the posix_memalign(3) function to bionic
The posix_memalign(3) function is very similar to the traditional
memalign(3) function, but with better error reporting and a guarantee
that the memory it allocates can be freed.  In bionic, memalign(3)
allocated memory can be freed, so posix_memalign(3) is just a wrapper
around memalign(3).

Change-Id: I62ee908aa5ba6b887d8446a00d8298d080a6a299
2012-04-27 09:34:53 -07:00
Andrew Hsieh
1e343cb119 Merge "[MIPS] Fix the warning originating from the kernel header signal.h. This is a clean header generated from the corresponding change in external/kernel-headers repository. (CL 35760)" 2012-04-24 23:44:18 -07:00
Raghu Gandham
e328ce6c55 [MIPS] Fix the warning originating from the kernel header signal.h.
This is a clean header generated from the corresponding change in
external/kernel-headers repository. (CL 35760)
2012-04-23 18:59:41 -07:00
Elliott Hughes
418e647a83 Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation." 2012-04-16 09:13:13 -07:00
Elliott Hughes
4994deaef5 Merge "Bionic: Fix wrong prototype of system call clock_nanosleep" 2012-04-16 09:09:05 -07:00
Elliott Hughes
7b8666e683 Merge "bionic: Fix wrong prototype of system call getresuid/getresgid" 2012-04-16 09:06:22 -07:00
Jack Ren
d515ce465b Bionic: Fix wrong prototype of system call clock_nanosleep
In bionic/libc/SYSCALLS.TXT, the prototype of system call
clock_nanosleep is incorrect.

According to man page:
int clock_nanosleep(clockid_t clock_id, int flags,
                    const struct timespec *request,
                    struct timespec *remain);

Change-Id: Ic44c6db3d632293aa17998035554eacd664c2d57
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-04-16 23:53:05 +08:00
Elliott Hughes
6435d27f9d Merge "bionic: fix NULL parameter failure in getcwd()" 2012-04-16 08:48:19 -07:00
Jack Ren
41070dd15f bionic: Fix wrong prototype of system call getresuid/getresgid
In bionic/libc/SYSCALLS.TXT, the prototypes of system call
getresuid/getresgid are incorrect.

According to man page, they should be:
    int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
    int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);

Change-Id: I676098868bb05a9e1fe45419b234cf397626fdad
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-04-16 23:45:36 +08:00
Jack Ren
e5bf068147 bionic: fix NULL parameter failure in getcwd()
LTP: getcwd01 failed in LTP

Need to check getcwd parameters, otherwise it will lead to
posix test case to fail.

Change-Id: Ieb673b6dd4ca6481da81c5339dbf7ec0a463f263
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-04-16 23:35:05 +08:00
Fengwei Yin
ee18fb4aac libstdc++: Fix x86 thread-safe one-time-construction implementation.
The root of the problem is that the existing implementation is based on the
ARM C++ ABI, which mandates a different guard variable layout than the
Itanium/x86 C++ one.

This patch modifies the implementation in a way that satisfies both ABIs (and
doesn't require changing the toolchains).

Change-Id: I885e9adc7f088b9c0a78355bd752f1e6aeec9f07
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-04-16 14:20:30 +08:00
Elliott Hughes
6bc18fa588 Merge "libm: fix invalid result of function remquo/remquof" 2012-04-13 14:57:59 -07:00
Jack Ren
bd0383acf8 libm: fix invalid result of function remquo/remquof
Currently we will get the wrong result as follows:
remquof(0x7bb33336, 0x63000000) = -671088640, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = 1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490188, 0x0000000000000004
while the correct one should be:
remquof(0x7bb33336, 0x63000000) = 1476395008, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = -1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490189, 0x0000000000000001

Fixed in this patch.

Change-Id: I540b348cd10a539f3b39b1753945c893c4c7ec46
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-04-10 12:55:43 +08:00
Elliott Hughes
b88f810d58 Merge "Update to tzdata2012c." 2012-04-02 10:25:43 -07:00
Elliott Hughes
8f78ddb422 Update to tzdata2012c.
From the release notes:

       africa
               Summer time changes for Morocco (to start late April 2012)

       asia
               Changes for 2012 for Gaza & the West Bank (Hebron) and Syria

       northamerica
               Haiti following US/Canada rules for 2012 (and we're assuming,
               for now anyway, for the future).

Also include a change made internally to the 'generate' script as part of
the tzdata2011m update that apparently never made it to AOSP; the original
checkin comment for which was:

    Update to tzdata2011m.

    Fixes for Europe/Tiraspol (Moldova) and all four Ukrainian zones.

    Also show the MD5 of the downloaded data, for comparison against the MD5
    given in the announcement mails. (There's a plan to move to proper signing,
    but that's not implemented on their end yet.)

(I'm repeating the tzdata change for the convenience of anyone grepping the
log, since the 2012 tzdata releases also contain the 2011m changes; 2011m
is the only missing release I noticed.)

Change-Id: I9a2e530b3a8ea88e3375334a12376e3d8526f267
2012-04-02 07:43:15 -07:00
Elliott Hughes
63b1475551 Merge "libc/x86: ensure the stack 16-byte aligned when tasks created" 2012-03-30 13:42:42 -07:00
Elliott Hughes
d509f9ccbb am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."
* commit '09ce7749d74733b28d4fa7a1d36457cb366cc5da':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.
2012-03-27 17:53:35 -07:00
Elliott Hughes
09ce7749d7 Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture." 2012-03-27 16:49:29 -07:00
Raghu Gandham
82fa43febc [MIPS] Clean Kernel headers are generated by running
libc/kernel/tools/update_all.py script. This patch ignores
any changes to libc/kernel directory not related to MIPS
architecture.

Change-Id: I2c9e461dccb7c33eb4420be2db1a562f45137c8d
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
2012-03-27 11:38:00 -07:00
Jean-Baptiste Queru
d7c6147eff am 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"
* commit '56731351de7230180fc99a1a4b0afd12f881b0f7':
  bionic: fix atfork hanlder_mutex deadlock
2012-03-26 18:25:43 -07:00
Jean-Baptiste Queru
56731351de Merge "bionic: fix atfork hanlder_mutex deadlock" 2012-03-26 16:19:36 -07:00
Jack Ren
cb08204053 libc/x86: ensure the stack 16-byte aligned when tasks created
Currently Renderscript sample code RsBalls crashed on x86 when SSE2
enabled. The root cause is that the stack was not 16-byte aligned
from the beginning when the processes/threads were created, so the
RsBalls crashed when SSE2 instructions tried to access the variables
on the stack.

- For the thread created by fork():
Its stack alignment is determined by crtbegin_{dynamic, static}.S

- For the thread created by pthread_create():
Its stack alignment is determined by clone.S. __thread_entry( ) is
a standard C function. In order to have its stack be aligned with
16 byte properly, __thread_entry() needs the stack with following
layout when it is called:
layout #1 (correct)
--------------
|            |
-------------- <--ESP (ECX - 20)
| ret EIP    |
-------------- <--ECX - 16
| arg0       |
-------------- <--ECX - 12
| arg1       |
-------------- <--ECX - 8
| arg2       |
-------------- <--ECX - 4
| unused     |
-------------- <--ECX (16-byte boundary)

But it has following layout for now:
layout #2: (incorrect)
--------------
|            |
-------------- <--ESP (ECX - 16)
| unused     |
-------------- <--ECX - 12
| arg0       |
-------------- <--ECX - 8
| arg1       |
-------------- <--ECX - 4
| arg2       |
-------------- <--ECX (16-byte boundary)

Fixed in this patch.

Change-Id: Ibe01f64db14be14033c505d854c73033556ddaa8
Signed-off-by: Michael Liao <michael.liao@intel.com>
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-03-23 20:04:04 +08:00
Jack Ren
34e89c232d bionic: fix atfork hanlder_mutex deadlock
After applying the kernel_id fix, the system refused to boot up and we
got following crash log:
I/DEBUG   (  113): pid: 618, tid: 618  >>> org.simalliance.openmobileapi.service:remote <<<
I/DEBUG   (  113): signal 16 (SIGSTKFLT), code -6 (?), fault addr --------
I/DEBUG   (  113):  eax fffffe00  ebx b77de994  ecx 00000080  edx 00724002
I/DEBUG   (  113):  esi 00000000  edi 00004000
I/DEBUG   (  113):  xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000 xss 0000007b
I/DEBUG   (  113):  eip b7761351  ebp bfdf3de8  esp bfdf3dc4  flags 00000202
I/DEBUG   (  113):     #00  eip: 00015351  /system/lib/libc.so
I/DEBUG   (  113):     #01  eip: 0000d13c  /system/lib/libc.so (pthread_mutex_lock)
I/DEBUG   (  113):     #02  eip: 00077b48  /system/lib/libc.so (__bionic_atfork_run_prepare)
I/DEBUG   (  113):     #03  eip: 00052cdb  /system/lib/libc.so (fork)
I/DEBUG   (  113):     #04  eip: 0009ae91  /system/lib/libdvm.so (_Z18dvmOptimizeDexFileillPKcjjb)
I/DEBUG   (  113):     #05  eip: 000819d6  /system/lib/libdvm.so (_Z14dvmJarFileOpenPKcS0_PP7JarFileb)
I/DEBUG   (  113):     #06  eip: 000b175e  /system/lib/libdvm.so (_ZL40Dalvik_dalvik_system_DexFile_openDexFilePKjP6JValue)
I/DEBUG   (  113):     #07  eip: 0011fb94  /system/lib/libdvm.so

Root cause:
The atfork uses the mutex handler_mutex to protect the atfork_head. The
parent will call __bionic_atfork_run_prepare() to lock the handler_mutex,
and need both the parent and child to unlock their own copy of handler_mutex
after fork. At that time, the owner of hanlder_mutex is set as the parent.
If we apply the kernel_id fix, then the child's kernel_id will be set as
child's tid.
The handler_mutex is a recursive lock, and pthread_mutex_unlock(&hander_mutex)
will fail because the mutex owner is the parent, while the current tid
(__get_thread()->kernel_id) is child, not matched with the mutex owner.
At that time, the handler_mutex is left in lock state.If the child wants to
fork other process after than, then it will try to lock handler_mutex, and
then be deadlocked.

Fix:
Since the child has its own copy of vm space from the the parent, the
child space's handler_mutex should be reset to the initialized state.

Change-Id: I3907dd9a153418fb78862f2aa6d0302c375d9e27
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-03-17 17:08:54 +08:00
Elliott Hughes
2f460fbee9 am 73b5cad9: Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()"
* commit '73b5cad989da317cc8089b57ee25f502b1cac71f':
  bionic: Fix wrong kernel_id in pthread descriptor after fork()
2012-03-12 17:06:09 -07:00
Elliott Hughes
73b5cad989 Merge "bionic: Fix wrong kernel_id in pthread descriptor after fork()" 2012-03-12 10:32:02 -07:00
Jack Ren
d8bc6e7119 bionic: Fix wrong kernel_id in pthread descriptor after fork()
After forking, the kernel_id field in the phtread_internal_t returned by pthread_self()
is incorrect --- it's the tid from the parent, not the new tid of the
child.

The root cause is that: currently the kernel_id is set by
_init_thread(), which is called in 2 cases:
(1) called by __libc_init_common(). That happens when the execv( ) is
called after fork( ). But when the zygote tries to fork the android
application, the child application doesn't call execv( ), instread, it
tries to call the Java main method directly.
(2) called by pthread_create(). That happens when a new thread is
created.

For the lead thread which is the thread created by fork(), it should
call execv() but it doesn't, as described in (1) above. So its kernel_id
will inherit the parent's kernel_id.

Fixed it in this patch.

Change-Id: I63513e82af40ec5fe51fbb69456b1843e4bc0fc7
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-03-12 23:14:56 +08:00
Elliott Hughes
70d1d45f0e am a58c88c2: Merge "Upgrade to tzdata2012b."
* commit 'a58c88c235bfeeb17ac495991e66f7b906935852':
  Upgrade to tzdata2012b.
2012-03-02 11:07:03 -08:00
Elliott Hughes
a480cf930f resolved conflicts for merge of cfe535ef to stage-aosp-master
Change-Id: I21a1dd41503518e75892180c14f1ce79102772ad
2012-03-02 10:11:18 -08:00
Elliott Hughes
a58c88c235 Merge "Upgrade to tzdata2012b." 2012-03-02 00:09:04 -08:00
Elliott Hughes
dd8e4045e7 Upgrade to tzdata2012b.
Summer time in Cuba has been delayed 3 weeks (now starts April 1 rather
than March 11). Since March 11 (the old start date, as listed in 2012a)
is just a little over a week away, this change is urgent.

Change-Id: Iadf4dc30072bdac0bcd0ad4b9e076a9ca071efbe
2012-03-01 23:34:11 -08:00
Elliott Hughes
cfe535ef9f Merge "Upgrade to tzdata2011a." 2012-03-01 23:32:15 -08:00
Elliott Hughes
69ea1c03e0 Upgrade to tzdata2011a.
From the notes:

       Chile 2011/2012 and 2012/2013 summer time date adjustments.
       Falkland Islands onto permanent summer time (we're assuming for the
               foreseeable future, though 2012 is all we're fairly certain of.)
       Armenia has abolished Summer Time.
       Tokelau jumped the International Date Line back last December
               (just the same as their near neighbour, Samoa).
       America/Creston is a new zone for a small area of British Columbia
       There will be a leapsecod 2012-06-30 23:59:60 UTC.

Change-Id: I1d66edf8d33fd1dbcf21178def91844025fd9047
2012-03-01 09:38:31 -08:00
Jean-Baptiste Queru
018c27eda8 am 25f2d1f0: Merge "update stddef.h"
* commit '25f2d1f0c3c7802af0d4d1e2bbd3bf95a7e0970b':
  update stddef.h
2012-02-29 19:08:50 -08:00
Jean-Baptiste Queru
51d22d7ea9 am afab5a70: Merge "Eliminate duplicate constants"
* commit 'afab5a703d30df613848cb30ab3ecceafd76102b':
  Eliminate duplicate constants
2012-02-29 19:08:49 -08:00
Jean-Baptiste Queru
25f2d1f0c3 Merge "update stddef.h" 2012-02-29 18:59:16 -08:00
Jean-Baptiste Queru
afab5a703d Merge "Eliminate duplicate constants" 2012-02-29 18:58:53 -08:00
Nick Kralevich
53d161a2bc update stddef.h
Pull in an updated version of stddef.h from the linux kernel.
Pulled from upstream kernel at 891003abb0db6bfffd61b76ad0ed39bb7c3db8e1

This file was generated using the following command:

cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/stddef.h

Change-Id: I6c29f3fa100c5368da41d0f0da39bc50fa668e9d
2012-02-29 18:43:55 -08:00
Nick Kralevich
9921947e6f Eliminate duplicate constants
include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3
2012-02-29 18:43:51 -08:00
Jean-Baptiste Queru
7c38f53d19 am 7f28e0b4: Merge "Clean up the remnants of SuperH support"
* commit '7f28e0b4501de7c4f8f627fd3e4be323d737ae82':
  Clean up the remnants of SuperH support
2012-02-29 15:38:55 -08:00
Jean-Baptiste Queru
7f28e0b450 Merge "Clean up the remnants of SuperH support" 2012-02-29 14:39:42 -08:00
Jean-Baptiste Queru
17edd38f03 am 9c9b0fc7: Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue"
* commit '9c9b0fc7e1dff39baa8cdf2536be9776aa4af766':
  libm: cherry-pick one patch from freebsd to fix logb() denormals issue
2012-02-28 13:28:30 -08:00
Jean-Baptiste Queru
9c9b0fc7e1 Merge "libm: cherry-pick one patch from freebsd to fix logb() denormals issue" 2012-02-28 09:44:41 -08:00
Jack Ren
1fa7b45df8 libm: cherry-pick one patch from freebsd to fix logb() denormals issue
from http://svnweb.freebsd.org/base?view=revision&revision=176101
"
Oops, fix the fix in rev.1.10.  logb() and logbf() were broken on
 denormals, and logb() remained broken after 1.10 because the fix for
 logbf() was incompletely translated.

Convert to __FBSDID().
"

Change-Id: I54f33648db7c421b06eee1ea8e63c57a179fae0d
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-02-28 12:28:05 +08:00
Jean-Baptiste Queru
a71aefc66f am d041bf20: Merge "bionic/x86: fix one potential deadlock in __set_tls()"
* commit 'd041bf2095f5f133c87f7ba632a8dfb39537a437':
  bionic/x86: fix one potential deadlock in __set_tls()
2012-02-23 12:29:10 -08:00
Jean-Baptiste Queru
d041bf2095 Merge "bionic/x86: fix one potential deadlock in __set_tls()" 2012-02-23 08:43:30 -08:00
Jin Wei
c5393b23f6 bionic/x86: fix one potential deadlock in __set_tls()
Fix bug:
Currently the mutex lock _tls_desc_lock is not released
when __set_thread_area() fails. That will leads to the deadlock
when __set_tls( ) is called later on.

Change-Id: Iea3267cb0659971cba7766cbc3346f6924274f86
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-02-23 17:37:58 +08:00
Jean-Baptiste Queru
62daffe147 am f9c5afb1: Merge "Redesign dlopen() locks to be recursive per thread."
* commit 'f9c5afb1f9d8e615ab98774a10bbf117962db66d':
  Redesign dlopen() locks to be recursive per thread.
2012-02-22 09:54:52 -08:00
Jean-Baptiste Queru
f9c5afb1f9 Merge "Redesign dlopen() locks to be recursive per thread." 2012-02-22 09:30:53 -08:00
Pavel Chupin
e19d702b8e Redesign dlopen() locks to be recursive per thread.
That is to fix the bug:
dlxxx functions can't be called recursively.
For example, if we use dlopen() to use open one library whose constructor
also calls dlopen() in order to open another library, then the thread is
dead-blocked.

By changing the dl_lock from a non-recursive lock to a recursive lock, we can
prevent the thread from dead-blocked by recursive dlxxx calls in the same
thread context.

Change-Id: I1018b41c82f4641cc009c0a2eda31f5a47a534f9
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-02-21 14:57:26 -08:00
Jean-Baptiste Queru
cfff36df2b am a60ff6c5: Merge "libc: Define new symbol visibility macros"
* commit 'a60ff6c5b2ca76181b387d8c10aee22a2cbcf840':
  libc: Define new symbol visibility macros
2012-02-13 14:25:53 -08:00
Jean-Baptiste Queru
a60ff6c5b2 Merge "libc: Define new symbol visibility macros" 2012-02-13 14:23:13 -08:00
Raghu Gandham
b69060f1ae Clean up the remnants of SuperH support 2012-02-09 15:58:46 -08:00
David 'Digit' Turner
68fc85ffc0 am 177a7706: linker: fix x86 build
* commit '177a77067b6d3326dbcf88fd93d0664e48e27f9f':
  linker: fix x86 build
2012-02-01 11:18:06 -08:00
David 'Digit' Turner
177a77067b linker: fix x86 build
Change-Id: I47d76a0f50515013c37ccef89accba03cc69529d
2012-02-01 10:47:04 -08:00
Jean-Baptiste Queru
c4cb87f367 Merge 5b892aa7
Change-Id: Ic82bc2866bdb0c93822c94281301fa127fd4bb0c
2012-02-01 07:12:13 -08:00
David 'Digit' Turner
5fbf2e0992 libc: Define new symbol visibility macros
This patch defines a few new macros that can be used to control the
visibility of symbols exported by the C library:

- ENTRY_PRIVATE() can be used in assembly sources to indicate
  that an assembler function should have "hidden" visibility, i.e.
  will never be exported by the C library's shared library.

  This is the equivalent of using __LIBC_HIDDEN__ for a C function,
  but ENTRY_PRIVATE() works like ENTRY(), and must be used with
  END() to tag the end of the function.

- __LIBC_ABI_PUBLIC__ can be used to tag a C functions as being
  part of the C library's public ABI. This is important for a
  few functions that must be exposed by the NDK to maintain
  binary compatibility.

  Once a symbol has been tagged with this macro, it shall
  *never* be removed from the library, even if it becomes
  directly unused due to implementation changes
  (e.g. __is_threaded).

- __LIBC_ABI_PRIVATE__ can be used for C functions that should
  always be exported by the C library because they are used by
  other libraries in the platform, but should not be exposed
  by the NDK. It is possible to remove such symbols from the
  implementation if all callers are also modified.

+ Add missing END() assembly macro for x86

Change-Id: Ia96236ea0dbec41d57bea634b39d246b30e5e234
2012-01-31 22:19:09 +01:00
Jean-Baptiste Queru
5b892aa7e5 Merge "remove obsolete SuperH support" 2012-01-31 12:44:01 -08:00
David 'Digit' Turner
70b1668a76 remove obsolete SuperH support
We don't have a toolchain anymore, we don't have working original
kernel headers, and nobody is maintaining this so there is really
no point in keeping this here. Details of the patch:

- removed code paths from Android.mk files related to the SuperH
  architecture ("sh")

- removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh

- simplified libc/SYSCALLS.TXT

- simplified the scripts in libc/tools/ and libc/kernel/tools

Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560

Signed-off-by: David 'Digit' Turner <digit@android.com>
2012-01-31 20:28:23 +01:00
Jean-Baptiste Queru
cc12c74f7f am e8004445: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"
* commit 'e80044455961005ac95e405c8d553f2418d8e50c':
  Make sure __u64 is defined even for strict ansi or -std=c99
2012-01-27 07:41:43 -08:00
Jean-Baptiste Queru
e800444559 Merge "Make sure __u64 is defined even for strict ansi or -std=c99" 2012-01-27 07:31:10 -08:00
Martin Storsjo
738b175a93 Make sure __u64 is defined even for strict ansi or -std=c99
The x86 asm headers define __u64 regardless of __STRICT_ANSI__.
The linux/videodev2.h header requires __u64 to be defined, thus
this fixes compiling with -std=c99 when including the
linux/videodev2.h header.

In glibc, the asm/types.h header defines __u64 regardless of
__STRICT_ANSI__.

This is the change for the generated arch-arm/asm/types.h
header, as produced by the update_all.py script (without all
the other unrelated changes that the script produces).

FWIW, the same issue also is present in
arch-sh/asm/types.h, but there are no source headers for
arch-sh in external/kernel-headers (and regenerating the
headers simply removes that file).

Change-Id: If05fcc9ed6ff5943602be121c7be140116e361fe
2012-01-25 23:41:19 +02:00
Jean-Baptiste Queru
482d59a42f am e22dfc46: Merge "execvp: bcopy() is deprecated. Use memcpy() instead"
* commit 'e22dfc46b763e9b0c6300b7068609d2db60a9b2c':
  execvp: bcopy() is deprecated. Use memcpy() instead
2012-01-24 15:07:56 -08:00
Jean-Baptiste Queru
e22dfc46b7 Merge "execvp: bcopy() is deprecated. Use memcpy() instead" 2012-01-24 14:26:36 -08:00
Jean-Baptiste Queru
c83c1da548 am cee8425f: Merge "Move variable declaration on its own line"
* commit 'cee8425f22cfe268614c7bb47b2f5874ac6a0e4b':
  Move variable declaration on its own line
2012-01-20 11:54:49 -08:00
Jean-Baptiste Queru
5b44655f22 am 7e6a5773: Merge "Use the AT_SECURE auxv flag to determine whether to enable secure mode."
* commit '7e6a5773133e4b65d678535418b1f5d594859da2':
  Use the AT_SECURE auxv flag to determine whether to enable secure mode.
2012-01-20 11:54:48 -08:00
Jean-Baptiste Queru
2f80f07d81 am 23f56bbb: Merge "Add extended attribute (xattr) system call wrappers to bionic."
* commit '23f56bbb6ae053996dd821f29379aea0c7166055':
  Add extended attribute (xattr) system call wrappers to bionic.
2012-01-20 11:54:47 -08:00
Jean-Baptiste Queru
cee8425f22 Merge "Move variable declaration on its own line" 2012-01-20 11:07:41 -08:00
Stephen Smalley
bb44055d0a Move variable declaration on its own line
Change-Id: Ied54ffabccdc867ea4e124a0f0324a217270d6e7
2012-01-20 10:59:15 -08:00
Jean-Baptiste Queru
7e6a577313 Merge "Use the AT_SECURE auxv flag to determine whether to enable secure mode." 2012-01-20 10:43:19 -08:00
Stephen Smalley
861b42a2d8 Use the AT_SECURE auxv flag to determine whether to enable secure mode.
The Linux kernel provides an AT_SECURE auxv flag to inform userspace
whether or not a security transition has occurred.  This is more reliable
than directly checking the uid/gid against the euid/egid, because it covers
not only setuid/setgid but also file capabilities, SELinux, and AppArmor
security transitions.  It is also a more efficient test since it does
not require any additional system calls.

Change-Id: I9752a4f6da452273258d2876d13b05e402fb0409
2012-01-20 13:35:57 -05:00
Jean-Baptiste Queru
23f56bbb6a Merge "Add extended attribute (xattr) system call wrappers to bionic." 2012-01-20 10:29:22 -08:00
The Android Open Source Project
8eb948d8c8 Reconcile with ics-mr1-release
Change-Id: Iece5fc7cf15320addfda3f143235664e2ef3083d
2012-01-19 13:06:24 -08:00
The Android Automerger
3d11bf0f3f merge in ics-mr1-release history after reset to ics-mr1 2012-01-18 21:16:26 -08:00
Elliott Hughes
dac52ff9f5 am e8e1efea: Update to tzdata2011n.
* commit 'e8e1efeafb8754ea8358e78cfe3d0f7ad4e809b2':
  Update to tzdata2011n.
2012-01-18 16:34:01 -08:00
Stephen Smalley
5eb686d105 Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in
order to get and set file security contexts.  In particular, libselinux
requires these calls.

Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
2012-01-18 08:02:23 -05:00
Jean-Baptiste Queru
b00d7a331c am eae1f1fb: Merge "res_send: Avoid spurious close()s and (rare) failure"
* commit 'eae1f1fba33cb105302227b044a14e5abcbe55e7':
  res_send: Avoid spurious close()s and (rare) failure
2012-01-17 18:16:10 -08:00
Elliott Hughes
e8e1efeafb Update to tzdata2011n.
There are three changes of note - most urgently, Cuba (America/Havana)
has extended summer time by two weeks, now to end on Nov 13, rather than
the (already past) Oct 30.   Second, the Pridnestrovian Moldavian Republic
(Europe/Tiraspol) decided not to split from the rest of Moldova after
all, and consequently that zone has been removed (again) and reinstated
in the "backward" file as a link to Europe/Chisinau.   And third, the
end date for Fiji's summer time this summer was moved forward from the
earlier planned Feb 26, to Jan 22.

Apart from that, Moldova (MD) returns to a single entry in zone.tab
(and the incorrect syntax that was in the 2011m version of that file
is so fixed - it would have been fixed in a different way had this
change not happened - that's the "missing" sccs version id).

Bug: 5863692

Change-Id: I78e29c682c623b1dec0b0ea2cb6545713ae9eed0
2012-01-17 17:47:59 -08:00
Jean-Baptiste Queru
eae1f1fba3 Merge "res_send: Avoid spurious close()s and (rare) failure" 2012-01-17 15:26:18 -08:00
Nick Kralevich
06f51ba1af am f44de270: add personality() system call.
* commit 'f44de270bba32c9b1b5eff8a34be07b10ddff238':
  add personality() system call.
2012-01-17 11:45:25 -08:00
Jim Huang
87043f9c89 res_send: Avoid spurious close()s and (rare) failure
When looping over the current list of sockets we are connected to,
use getpeername() not getsockname() to find out who the remote
end is.  This change avoids spurious close() and (rare) failure.

Origin: ISC bug #18625 and fixed in libbind 6.0

Change-Id: I5e85f9ff4b98c237978e4bf4bd85ba0a90d768e6
2012-01-14 11:30:00 +08:00
Jim Huang
28a7c35fea execvp: bcopy() is deprecated. Use memcpy() instead
The function bcopy() is marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008. memcpy (POSIX.1-2001) is its recommended replacement.

Change-Id: I2cc0cc4673d1368255afd11132ddbfd3f87b530b
2012-01-14 11:22:36 +08:00
The Android Automerger
43828aa3a7 merge in ics-mr1-release history after reset to ics-mr1 2012-01-13 16:16:49 -08:00
Nick Kralevich
f44de270bb add personality() system call.
Change-Id: Ie899def8ea1d705930ed83adae1343c1353e7c57
2012-01-13 15:50:40 -08:00
Robert Greenwalt
82c4be54da am ecd0e95a: Adding a timeout to tcp dns lookup connects.
* commit 'ecd0e95a0276c1ba72c7331f5e4617815f015f22':
  Adding a timeout to tcp dns lookup connects.
2012-01-12 15:03:52 -08:00
Robert Greenwalt
ecd0e95a02 Adding a timeout to tcp dns lookup connects.
TCP isn't supported on some dns servers, which makes the old code
hang forever.

NOT adding a stopship to remove debugging stuff - it was too painful
(14s timeout on failed tcp dns lookups) so we decided not to bother people.

bug:5766949
Change-Id: I381c20c3e11b8e994438d4f7c58ef643cd36554e
2012-01-12 14:26:41 -08:00
Bruce Beare
e30e909363 sreadahead: adding readahead system call into bionic libc
Add bionic libc to support readahead system call.
This is needed to enable sreadahead to work.

Change-Id: I3856e1a3833db82e6cf42fd34af7631bd40cc723
Author: Winson Yung <winson.w.yung@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-01-03 15:18:04 -08:00
Bruce Beare
a37f372973 readdir: fix interface to kernel getdents64 function
Issue:
  The kernel will pad the entry->d_reclen in a getdents64 call to a
  long-word boundary.  For very long records, this could exceed the
  size of a struct dirent. The mismatch in the size was causing error
  paranoid checking code in bionic to fail... thus causing an early
  "end" when reading the dirent structures from the kernel buffer.

Test:
 ls
 mkdir abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstu
 ls

Change-Id: I75d1f8e45e1655fdd7bac4a08a481d086f28073a
Author: Bruce Beare <bruce.j.beare@intel.com>
2011-12-19 09:38:48 -08:00
The Android Open Source Project
c2d5944e19 Reconcile with ics-mr1-release
Change-Id: I62bace5c4272d043a51d3f0f698556716838aa51
2011-12-13 19:10:03 -08:00
The Android Automerger
caf08f71b8 merge in ics-mr1-release history after reset to ics-mr1 2011-12-13 17:35:59 -08:00
Erik Gilling
8d28b043e9 am 94963af2: update video/dsscomp.h
* commit '94963af28e445384e19775a838a29e6a71708179':
  update video/dsscomp.h
2011-12-13 16:02:50 -08:00
Erik Gilling
94963af28e update video/dsscomp.h
Change-Id: I9da47f7fb7f34f9c4baa860bb767cb8fd4f8020c
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-13 14:48:51 -08:00
Bruce Beare
f3087c6e86 am af96d4da: x86: libc may use the gcc flags from TARGET_linux-x86.mk
* commit 'af96d4dadc3f3d8466dbbeaf3a816e6871715fbc':
  x86: libc may use the gcc flags from TARGET_linux-x86.mk
2011-12-09 16:19:30 -08:00
Bruce Beare
af96d4dadc x86: libc may use the gcc flags from TARGET_linux-x86.mk
Change-Id: Iaf4d864d4b6fe388bd3c2d7c4d7d6e42aebb0d35
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-09 13:54:20 -08:00
Bruce Beare
68ec71ebd6 am 7d03c9cb: pathconf: dead loop in bionic function __2_symlinks
* commit '7d03c9cbcedb1dc7e3a8210ac0001120558ec6df':
  pathconf: dead loop in bionic function __2_symlinks
2011-12-09 10:19:37 -08:00
The Android Open Source Project
c14ea96f2f Reconcile with ics-mr1-release
Change-Id: I0a43c4d104894fdde4eff9970bc78ed0aeb88ec2
2011-12-09 07:10:40 -08:00
The Android Automerger
132b3adfcc merge in ics-mr1-release history after reset to ics-mr1 2011-12-08 17:34:07 -08:00
Erik Gilling
ffe65783b4 am bba5c314: update video/dsscomp.h
* commit 'bba5c314b2420483e2c0e3e441bf54bda6935bc1':
  update video/dsscomp.h
2011-12-08 14:57:00 -08:00
Erik Gilling
bba5c314b2 update video/dsscomp.h
Change-Id: Ic5f1c01add1f2adb5a09d05c94129f3dc9cc3f1f
Signed-off-by: Erik Gilling <konkers@android.com>
2011-12-08 14:42:04 -08:00
The Android Open Source Project
c448c082cf Reconcile with ics-mr1-release
Change-Id: Icc9d31cb9a4f379354808a4c7e913685dfa22e80
2011-12-08 10:17:32 -08:00
Bruce Beare
7d03c9cbce pathconf: dead loop in bionic function __2_symlinks
Fix dead loops in file ./bionic/libc/unistd/pathconf.c

Change-Id: I7a1e6bcd9879c96bacfd376b88a1f899793295c8
Author: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-07 09:47:20 -08:00
Rabin Vincent
a73de44b7c am 177ba8cb: Prevent deadlock when using fork
* commit '177ba8cb42ed6d232e7c8bcad5e6ee21fc51a0e8':
  Prevent deadlock when using fork
2011-12-06 13:59:56 -08:00
Rabin Vincent
177ba8cb42 Prevent deadlock when using fork
When forking of a new process in bionic, it is critical that it
does not allocate any memory according to the comment in
java_lang_ProcessManager.c:
"Note: We cannot malloc() or free() after this point!
A no-longer-running thread may be holding on to the heap lock, and
an attempt to malloc() or free() would result in deadlock."
However, as fork is using standard lib calls when tracing it a bit,
they might allocate memory, and thus causing the deadlock.
This is a rewrite so that the function cpuacct_add, that fork calls,
will use system calls instead of standard lib calls.

Signed-off-by: christian bejram <christian.bejram@stericsson.com>

Change-Id: Iff22ea6b424ce9f9bf0ac8e9c76593f689e0cc86
2011-12-06 08:39:18 -08:00
Bruce Beare
35765066b9 am e4a21c89: signal: Align the sigset_t size passed to from user space to kernel.
* commit 'e4a21c89a8b24b32f7a2637b45522dfa59f2aaa4':
  signal: Align the sigset_t size passed to from user space to kernel.
2011-12-05 22:12:08 -08:00
Bruce Beare
cb835cd77c am cb1df916: string: Fix wrong comparison semantics
* commit 'cb1df9161666db2a312814752de67fc623149a9b':
  string: Fix wrong comparison semantics
2011-12-05 22:12:07 -08:00
Bruce Beare
e4a21c89a8 signal: Align the sigset_t size passed to from user space to kernel.
Pass kernel space sigset_t size to __rt_sigprocmask to workaround
the miss-match of NSIG/sigset_t definition between kernel and bionic.

Note: Patch originally from Google...
Change-Id: I4840fdc56d0b90d7ce2334250f04a84caffcba2a
Signed-off-by: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:33 -08:00
Bruce Beare
cb1df91616 string: Fix wrong comparison semantics
Chars are signed for x86 -- correct the comparison semantics.

Change-Id: I2049e98eb063c0b4e83ea973d3fcae49c6817dde
Author: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-12-05 18:37:10 -08:00
Bruce Beare
75039bafde am 89d3fdca: MALLOC_DEBUG: enable the option libc.debug.malloc = 10
* commit '89d3fdcae26980bf81a4622c3c83e48ead4c1c3a':
  MALLOC_DEBUG: enable the option libc.debug.malloc = 10
2011-12-05 17:01:13 -08:00
Bruce Beare
89d3fdcae2 MALLOC_DEBUG: enable the option libc.debug.malloc = 10
Fix the compile warning to let the libc.debug.malloc=10 works well
Due to unsuitable value comparison, which cause compiler optimize the
code of comparing two digits.

Change-Id: I0bedd596c9ca2ba308fb008da20ecb328d8548f5
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Author: liu chuansheng <chuansheng.liu@intel.com>
2011-12-05 14:58:55 -08:00
Jack Ren
0c3d21e63c am e480fc83: bionic: fix pthread_{create, exit}/signal race condition
* commit 'e480fc83b2887388d469eb3bf58c86c610f5b082':
  bionic: fix pthread_{create, exit}/signal race condition
2011-11-29 22:42:32 -08:00
Jack Ren
621df52644 am 31e72bc3: bionic: fix __get_tls( ) crash issue
* commit '31e72bc3289acdd85b0b745fbf64c5949ca33432':
  bionic: fix __get_tls( ) crash issue
2011-11-29 22:42:31 -08:00
Zhenghua Wang
1ad08626a1 am 897815a1: bionic: add machine type check
* commit '897815a1feff230be3ea42655a77dcbb9a8dcca9':
  bionic: add machine type check
2011-11-29 22:42:30 -08:00
Jack Ren
e480fc83b2 bionic: fix pthread_{create, exit}/signal race condition
(1) in pthread_create:
    If the one signal is received before esp is subtracted by 16 and
    __thread_entry( ) is called, the stack will be cleared by kernel
    when it tries to contruct the signal stack frame. That will cause
    that __thread_entry will get a wrong tls pointer from the stack
    which leads to the segment fault when trying to access tls content.

(2) in pthread_exit
    After pthread_exit called system call unmap(), its stack will be
    freed.  If one signal is received at that time, there is no stack
    available for it.

Fixed by subtracting the child's esp by 16 before the clone system
call and by blocking signal handling before pthread_exit is started.

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:51 -08:00
Jack Ren
31e72bc328 bionic: fix __get_tls( ) crash issue
When running the stress test of pthread create/destroy, a crash may
oocur in __get_tls(). That is caused by the race condition with __set_tls( ):

Author: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:09:15 -08:00
Zhenghua Wang
897815a1fe bionic: add machine type check
android linker doesn't check machine type, it may load some
libraries which it doesn't support sometimes.

Author: Zhenghua Wang <zhenghua.wang@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-11-29 17:01:08 -08:00
The Android Automerger
a89c28b091 merge in ics-mr1-release history after reset to ics-mr1 2011-11-16 06:45:21 -08:00
Eino-Ville Talvala
0d9f87a3b7 Add auto-exposure/auto-white balance lock support to soc2030 image
sensor.

Bug: 4980604
Change-Id: I1be07a23573b70eeddd9ecb2370605713aea3d03
2011-10-31 11:42:18 -07:00
The Android Automerger
d717f5170f merge in ics-release history after reset to master 2011-10-13 06:59:20 -07:00
Jesse Wilson
b0641d4a44 Merge "Use ENTRY and EXIT macros for strcmp, memcpy, atexit." 2011-10-12 07:51:53 -07:00
The Android Automerger
df331f5f9b merge in ics-release history after reset to master 2011-10-11 05:32:11 -07:00
Evgeniy Stepanov
487b613e57 Use ENTRY and EXIT macros for strcmp, memcpy, atexit.
Without this change strcmp size is zero (not set), and it gets
ignored by Valgrind. Changes to memcpy and atexit don't affect the
generated binary in any way.

Change-Id: I05818cb5951f75901dc8c0eef02807a2e83a9231
2011-10-11 12:12:05 +04:00
The Android Automerger
bf8f6bb820 merge in ics-release history after reset to master 2011-09-30 06:44:15 -07:00
The Android Automerger
cd17f88010 merge in ics-release history after reset to master 2011-09-28 17:56:54 -07:00
The Android Automerger
c902908999 merge in ics-release history after reset to master 2011-09-27 06:59:11 -07:00
The Android Automerger
0c7245213d merge in ics-release history after reset to master 2011-09-25 06:59:15 -07:00
The Android Automerger
d98f3e9f71 merge in ics-release history after reset to master 2011-09-18 06:59:17 -07:00
The Android Automerger
6e47ab1345 merge in ics-release history after reset to master 2011-09-15 06:33:15 -07:00
The Android Automerger
ae25dc08c1 merge in ics-release history after reset to master 2011-09-13 06:33:13 -07:00
Erik Gilling
6ce10804d5 update kernel video/dsscomp.h
Change-Id: Ifc4f96e3a9c3435c0b0ee80ac9da295b4e9463a1
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-07 17:49:09 -07:00
The Android Automerger
81a6894b0a merge in ics-release history after reset to master 2011-09-05 06:33:11 -07:00
The Android Automerger
94387eae69 merge in ics-release history after reset to master 2011-08-31 06:33:08 -07:00
The Android Automerger
918ad3ecfd merge in ics-release history after reset to master 2011-08-30 13:42:36 -07:00
The Android Automerger
fd3fc8bd27 merge in ics-release history after reset to master 2011-08-30 12:45:01 -07:00
Anders Fredlund
dd16182b4b Remove expired dns cache entries before removing oldest
A suggestion how to make a smarter delete function when the cache
is full. First look through the entire cache and remove all entries
which have expired. If none use the old solution and just remove
the last entry in the MRU list.

Change-Id: I5f997ab35290a55dc6e1ddf37d725759edf83d36
2011-05-20 08:12:37 +02:00
801 changed files with 27690 additions and 18272 deletions

View File

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

View File

@@ -346,6 +346,7 @@ libc_common_src_files += \
arch-arm/bionic/__get_sp.S \
arch-arm/bionic/_exit_with_stack_teardown.S \
arch-arm/bionic/_setjmp.S \
arch-arm/bionic/abort_arm.S \
arch-arm/bionic/atomics_arm.S \
arch-arm/bionic/clone.S \
arch-arm/bionic/eabi.c \
@@ -427,61 +428,25 @@ libc_arch_static_src_files := \
libc_arch_dynamic_src_files :=
else # !x86
ifeq ($(TARGET_ARCH),sh)
libc_common_src_files += \
arch-sh/bionic/__get_pc.S \
arch-sh/bionic/__get_sp.S \
arch-sh/bionic/_exit_with_stack_teardown.S \
arch-sh/bionic/_setjmp.S \
arch-sh/bionic/atomics_sh.c \
arch-sh/bionic/atomic_cmpxchg.S \
arch-sh/bionic/clone.S \
arch-sh/bionic/pipe.S \
arch-sh/bionic/memcpy.S \
arch-sh/bionic/memset.S \
arch-sh/bionic/bzero.S \
arch-sh/bionic/setjmp.S \
arch-sh/bionic/sigsetjmp.S \
arch-sh/bionic/syscall.S \
arch-sh/bionic/memmove.S \
arch-sh/bionic/__set_tls.c \
arch-sh/bionic/__get_tls.c \
arch-sh/bionic/ffs.S \
string/bcopy.c \
string/strcmp.c \
string/strncmp.c \
string/memcmp.c \
string/strlen.c \
string/strcpy.c \
bionic/pthread-atfork.c \
bionic/pthread-rwlocks.c \
bionic/pthread-timers.c \
bionic/ptrace.c \
unistd/socketcalls.c
libc_static_common_src_files += \
bionic/pthread.c \
endif # sh
endif # !x86
endif # !arm
# Define some common cflags
# ========================================================
libc_common_cflags := \
-DWITH_ERRLIST \
-DANDROID_CHANGES \
-DUSE_LOCKS \
-DREALLOC_ZERO_BYTES_FREES \
-D_LIBC=1 \
-DSOFTFLOAT \
-DFLOATING_POINT \
-DINET6 \
-I$(LOCAL_PATH)/private \
-DUSE_DL_PREFIX \
-DPOSIX_MISTAKE \
-DLOG_ON_HEAP_ERROR \
-DWITH_ERRLIST \
-DANDROID_CHANGES \
-DUSE_LOCKS \
-DREALLOC_ZERO_BYTES_FREES \
-D_LIBC=1 \
-DSOFTFLOAT \
-DFLOATING_POINT \
-DINET6 \
-I$(LOCAL_PATH)/private \
-DUSE_DL_PREFIX \
-DPOSIX_MISTAKE \
-DLOG_ON_HEAP_ERROR \
-std=gnu99
# these macro definitions are required to implement the
# 'timezone' and 'daylight' global variables, as well as
@@ -495,6 +460,13 @@ ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
libc_common_cflags += -DDEBUG
endif
# To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in
# the appropriate BoardConfig.mk file.
#
ifneq ($(BOARD_MALLOC_ALIGNMENT),)
libc_common_cflags += -DMALLOC_ALIGNMENT=$(BOARD_MALLOC_ALIGNMENT)
endif
ifeq ($(TARGET_ARCH),arm)
libc_common_cflags += -fstrict-aliasing
libc_crt_target_cflags := -mthumb-interwork
@@ -508,13 +480,18 @@ ifeq ($(TARGET_ARCH),arm)
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
libc_common_cflags += -DHAVE_ARM_TLS_REGISTER
endif
#
# Define HAVE_32_BYTE_CACHE_LINES to indicate to C
# library it should use to 32-byte version of memcpy, and not
# the 64-byte version.
#
ifeq ($(ARCH_ARM_HAVE_32_BYTE_CACHE_LINES),true)
libc_common_cflags += -DHAVE_32_BYTE_CACHE_LINE
endif
else # !arm
ifeq ($(TARGET_ARCH),x86)
libc_crt_target_cflags := -m32
# Enable recent IA friendly memory routines (such as for Atom)
# These will not work on the earlier x86 machines
libc_common_cflags += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2
libc_crt_target_cflags :=
# TARGET_GLOBAL_CFLAGS from build/core/combo/TARGET_linux-x86.mk sets all required flags.
endif # x86
endif # !arm

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 The Android Open Source Project
* Copyright (C) 2012 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,13 +25,18 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <pthread.h>
#include <machine/asm.h>
/*
* Simply set tls address into GBR.
* Coding the abort function in assembly so that registers are guaranteed to
* be preserved properly regardless of GCC's assumption on the "noreturn"
* attribute. When the registers are not properly preserved we won't be able
* to unwind the stack all the way to the bottom to fully reveal the call
* sequence when the crash happens.
*/
int __set_tls(void *ptr)
{
asm volatile("ldc %0, gbr" : /* no output */ : "r" (ptr));
return 0;
}
ENTRY(abort)
.save {r3, r14}
stmfd sp!, {r3, r14}
blx PIC_SYM(_C_LABEL(__libc_android_abort), PLT)
END(abort)

View File

@@ -37,16 +37,10 @@
.eabi_attribute 26, 2
.eabi_attribute 30, 4
.eabi_attribute 18, 4
.code 16
.section .text.atexit,"ax",%progbits
.align 2
.global atexit
.hidden atexit
.code 16
.thumb_func
.type atexit, %function
atexit:
.fnstart
ENTRY(atexit)
.LFB0:
.save {r4, lr}
push {r4, lr}
@@ -64,6 +58,5 @@ atexit:
.L3:
.word __dso_handle-(.LPIC0+4)
.LFE0:
.fnend
.size atexit, .-atexit
END(atexit)
#endif

View File

@@ -43,21 +43,17 @@
# - address of an "onexit" function, not used on any
# platform supported by Bionic
#
# - address of the "main" function of the program. We
# can't hard-code it in the adr pseudo instruction
# so we use a tiny trampoline that will get relocated
# by the dynamic linker before this code runs
# - address of the "main" function of the program.
#
# - address of the constructor list
#
_start:
mov r0, sp
mov r1, #0
adr r2, 0f
adr r3, 1f
b __libc_init
0: b main
ldr r2, =main
adr r3, 1f
ldr r4, =__libc_init
bx r4
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__

View File

@@ -43,21 +43,17 @@
# - address of an "onexit" function, not used on any
# platform supported by Bionic
#
# - address of the "main" function of the program. We
# can't hard-code it in the adr pseudo instruction
# so we use a tiny trampoline that will get relocated
# by the dynamic linker before this code runs
# - address of the "main" function of the program.
#
# - address of the constructor list
#
_start:
mov r0, sp
mov r1, #0
adr r2, 0f
adr r3, 1f
b __libc_init
0: b main
ldr r2, =main
adr r3, 1f
ldr r4, =__libc_init
bx r4
1: .long __PREINIT_ARRAY__
.long __INIT_ARRAY__

View File

@@ -34,28 +34,28 @@
.text
.fpu neon
.global memcpy
.type memcpy, %function
.align 4
#ifdef HAVE_32_BYTE_CACHE_LINE
/* a prefetch distance of 2 cache-lines */
#define CACHE_LINE_SIZE 32
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*2)
#else
/* a prefetch distance of 4 cache-lines works best experimentally */
#define CACHE_LINE_SIZE 64
#define PREFETCH_DISTANCE (CACHE_LINE_SIZE*4)
#endif
memcpy:
.fnstart
ENTRY(memcpy)
.save {r0, lr}
stmfd sp!, {r0, lr}
/* start preloading as early as possible */
pld [r1, #(CACHE_LINE_SIZE*0)]
stmfd sp!, {r0, lr}
pld [r1, #(CACHE_LINE_SIZE*1)]
/* do we have at least 16-bytes to copy (needed for alignment below) */
cmp r2, #16
blo 5f
/* align destination to half cache-line for the write-buffer */
/* align destination to cache-line for the write-buffer */
rsb r3, r0, #0
ands r3, r3, #0xF
beq 0f
@@ -84,6 +84,26 @@ memcpy:
pld [r1, #(CACHE_LINE_SIZE*0)]
pld [r1, #(CACHE_LINE_SIZE*1)]
#ifdef HAVE_32_BYTE_CACHE_LINE
/* make sure we have at least 32 bytes to copy */
subs r2, r2, #32
blo 4f
/* preload all the cache lines we need.
* NOTE: the number of pld below depends on PREFETCH_DISTANCE,
* ideally would would increase the distance in the main loop to
* avoid the goofy code below. In practice this doesn't seem to make
* a big difference.
*/
pld [r1, #(PREFETCH_DISTANCE)]
1: /* The main loop copies 32 bytes at a time */
vld1.8 {d0 - d3}, [r1]!
pld [r1, #(PREFETCH_DISTANCE)]
subs r2, r2, #32
vst1.8 {d0 - d3}, [r0, :128]!
bhs 1b
#else
/* make sure we have at least 64 bytes to copy */
subs r2, r2, #64
blo 2f
@@ -117,7 +137,7 @@ memcpy:
subs r2, r2, #32
vst1.8 {d0 - d3}, [r0, :128]!
bhs 3b
#endif
4: /* less than 32 left */
add r2, r2, #32
tst r2, #0x10

View File

@@ -28,13 +28,10 @@
*/
#include <machine/cpu-features.h>
#include <machine/asm.h>
.text
.global strcmp
.type strcmp, %function
.align 4
#ifdef __ARMEB__
#define SHFT2LSB lsl
#define SHFT2LSBEQ lsleq
@@ -54,8 +51,7 @@
#define magic1(REG) REG
#define magic2(REG) REG, lsl #7
strcmp:
.fnstart
ENTRY(strcmp)
PLD(r0, #0)
PLD(r1, #0)
eor r2, r0, r1
@@ -136,7 +132,6 @@ strcmp:
#endif
ldr r4, [sp], #4
bx lr
.fnend
.Lstrcmp_unaligned:
wp1 .req r0
@@ -319,3 +314,4 @@ strcmp:
ldr r4, [sp], #4
ldr r5, [sp], #4
bx lr
END(strcmp)

View File

@@ -97,6 +97,12 @@
#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
#if defined(__ELF__) && defined(PIC)

View File

@@ -14,6 +14,7 @@ syscall_src += arch-arm/syscalls/getegid.S
syscall_src += arch-arm/syscalls/getresuid.S
syscall_src += arch-arm/syscalls/getresgid.S
syscall_src += arch-arm/syscalls/gettid.S
syscall_src += arch-arm/syscalls/readahead.S
syscall_src += arch-arm/syscalls/getgroups.S
syscall_src += arch-arm/syscalls/getpgid.S
syscall_src += arch-arm/syscalls/getppid.S
@@ -84,6 +85,10 @@ syscall_src += arch-arm/syscalls/mkdirat.S
syscall_src += arch-arm/syscalls/fchownat.S
syscall_src += arch-arm/syscalls/fchmodat.S
syscall_src += arch-arm/syscalls/renameat.S
syscall_src += arch-arm/syscalls/fsetxattr.S
syscall_src += arch-arm/syscalls/fgetxattr.S
syscall_src += arch-arm/syscalls/flistxattr.S
syscall_src += arch-arm/syscalls/fremovexattr.S
syscall_src += arch-arm/syscalls/link.S
syscall_src += arch-arm/syscalls/unlink.S
syscall_src += arch-arm/syscalls/unlinkat.S
@@ -106,6 +111,14 @@ syscall_src += arch-arm/syscalls/access.S
syscall_src += arch-arm/syscalls/symlink.S
syscall_src += arch-arm/syscalls/fchdir.S
syscall_src += arch-arm/syscalls/truncate.S
syscall_src += arch-arm/syscalls/setxattr.S
syscall_src += arch-arm/syscalls/lsetxattr.S
syscall_src += arch-arm/syscalls/getxattr.S
syscall_src += arch-arm/syscalls/lgetxattr.S
syscall_src += arch-arm/syscalls/listxattr.S
syscall_src += arch-arm/syscalls/llistxattr.S
syscall_src += arch-arm/syscalls/removexattr.S
syscall_src += arch-arm/syscalls/lremovexattr.S
syscall_src += arch-arm/syscalls/__statfs64.S
syscall_src += arch-arm/syscalls/pause.S
syscall_src += arch-arm/syscalls/gettimeofday.S
@@ -169,6 +182,7 @@ syscall_src += arch-arm/syscalls/init_module.S
syscall_src += arch-arm/syscalls/delete_module.S
syscall_src += arch-arm/syscalls/klogctl.S
syscall_src += arch-arm/syscalls/sysinfo.S
syscall_src += arch-arm/syscalls/personality.S
syscall_src += arch-arm/syscalls/futex.S
syscall_src += arch-arm/syscalls/epoll_create.S
syscall_src += arch-arm/syscalls/epoll_ctl.S

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

198
libc/arch-mips/syscalls.mk Normal file
View File

@@ -0,0 +1,198 @@
# auto-generated by gensyscalls.py, do not touch
syscall_src :=
syscall_src += arch-mips/syscalls/_exit.S
syscall_src += arch-mips/syscalls/_exit_thread.S
syscall_src += arch-mips/syscalls/__fork.S
syscall_src += arch-mips/syscalls/_waitpid.S
syscall_src += arch-mips/syscalls/__waitid.S
syscall_src += arch-mips/syscalls/__sys_clone.S
syscall_src += arch-mips/syscalls/execve.S
syscall_src += arch-mips/syscalls/__setuid.S
syscall_src += arch-mips/syscalls/getuid.S
syscall_src += arch-mips/syscalls/getgid.S
syscall_src += arch-mips/syscalls/geteuid.S
syscall_src += arch-mips/syscalls/getegid.S
syscall_src += arch-mips/syscalls/getresuid.S
syscall_src += arch-mips/syscalls/getresgid.S
syscall_src += arch-mips/syscalls/gettid.S
syscall_src += arch-mips/syscalls/readahead.S
syscall_src += arch-mips/syscalls/getgroups.S
syscall_src += arch-mips/syscalls/getpgid.S
syscall_src += arch-mips/syscalls/getppid.S
syscall_src += arch-mips/syscalls/setsid.S
syscall_src += arch-mips/syscalls/setgid.S
syscall_src += arch-mips/syscalls/__setreuid.S
syscall_src += arch-mips/syscalls/__setresuid.S
syscall_src += arch-mips/syscalls/setresgid.S
syscall_src += arch-mips/syscalls/__brk.S
syscall_src += arch-mips/syscalls/kill.S
syscall_src += arch-mips/syscalls/tkill.S
syscall_src += arch-mips/syscalls/__ptrace.S
syscall_src += arch-mips/syscalls/__set_thread_area.S
syscall_src += arch-mips/syscalls/__getpriority.S
syscall_src += arch-mips/syscalls/setpriority.S
syscall_src += arch-mips/syscalls/setrlimit.S
syscall_src += arch-mips/syscalls/getrlimit.S
syscall_src += arch-mips/syscalls/getrusage.S
syscall_src += arch-mips/syscalls/setgroups.S
syscall_src += arch-mips/syscalls/setpgid.S
syscall_src += arch-mips/syscalls/setregid.S
syscall_src += arch-mips/syscalls/chroot.S
syscall_src += arch-mips/syscalls/prctl.S
syscall_src += arch-mips/syscalls/capget.S
syscall_src += arch-mips/syscalls/capset.S
syscall_src += arch-mips/syscalls/sigaltstack.S
syscall_src += arch-mips/syscalls/acct.S
syscall_src += arch-mips/syscalls/read.S
syscall_src += arch-mips/syscalls/write.S
syscall_src += arch-mips/syscalls/pread64.S
syscall_src += arch-mips/syscalls/pwrite64.S
syscall_src += arch-mips/syscalls/__open.S
syscall_src += arch-mips/syscalls/__openat.S
syscall_src += arch-mips/syscalls/close.S
syscall_src += arch-mips/syscalls/lseek.S
syscall_src += arch-mips/syscalls/__llseek.S
syscall_src += arch-mips/syscalls/getpid.S
syscall_src += arch-mips/syscalls/__mmap2.S
syscall_src += arch-mips/syscalls/munmap.S
syscall_src += arch-mips/syscalls/mremap.S
syscall_src += arch-mips/syscalls/msync.S
syscall_src += arch-mips/syscalls/mprotect.S
syscall_src += arch-mips/syscalls/madvise.S
syscall_src += arch-mips/syscalls/mlock.S
syscall_src += arch-mips/syscalls/munlock.S
syscall_src += arch-mips/syscalls/mincore.S
syscall_src += arch-mips/syscalls/__ioctl.S
syscall_src += arch-mips/syscalls/readv.S
syscall_src += arch-mips/syscalls/writev.S
syscall_src += arch-mips/syscalls/__fcntl.S
syscall_src += arch-mips/syscalls/flock.S
syscall_src += arch-mips/syscalls/fchmod.S
syscall_src += arch-mips/syscalls/dup.S
syscall_src += arch-mips/syscalls/pipe2.S
syscall_src += arch-mips/syscalls/dup2.S
syscall_src += arch-mips/syscalls/select.S
syscall_src += arch-mips/syscalls/ftruncate.S
syscall_src += arch-mips/syscalls/ftruncate64.S
syscall_src += arch-mips/syscalls/getdents.S
syscall_src += arch-mips/syscalls/fsync.S
syscall_src += arch-mips/syscalls/fdatasync.S
syscall_src += arch-mips/syscalls/fchown.S
syscall_src += arch-mips/syscalls/sync.S
syscall_src += arch-mips/syscalls/__fcntl64.S
syscall_src += arch-mips/syscalls/__fstatfs64.S
syscall_src += arch-mips/syscalls/sendfile.S
syscall_src += arch-mips/syscalls/fstatat.S
syscall_src += arch-mips/syscalls/mkdirat.S
syscall_src += arch-mips/syscalls/fchownat.S
syscall_src += arch-mips/syscalls/fchmodat.S
syscall_src += arch-mips/syscalls/renameat.S
syscall_src += arch-mips/syscalls/fsetxattr.S
syscall_src += arch-mips/syscalls/fgetxattr.S
syscall_src += arch-mips/syscalls/flistxattr.S
syscall_src += arch-mips/syscalls/fremovexattr.S
syscall_src += arch-mips/syscalls/link.S
syscall_src += arch-mips/syscalls/unlink.S
syscall_src += arch-mips/syscalls/unlinkat.S
syscall_src += arch-mips/syscalls/chdir.S
syscall_src += arch-mips/syscalls/mknod.S
syscall_src += arch-mips/syscalls/chmod.S
syscall_src += arch-mips/syscalls/chown.S
syscall_src += arch-mips/syscalls/lchown.S
syscall_src += arch-mips/syscalls/mount.S
syscall_src += arch-mips/syscalls/umount2.S
syscall_src += arch-mips/syscalls/fstat.S
syscall_src += arch-mips/syscalls/stat.S
syscall_src += arch-mips/syscalls/lstat.S
syscall_src += arch-mips/syscalls/mkdir.S
syscall_src += arch-mips/syscalls/readlink.S
syscall_src += arch-mips/syscalls/rmdir.S
syscall_src += arch-mips/syscalls/rename.S
syscall_src += arch-mips/syscalls/__getcwd.S
syscall_src += arch-mips/syscalls/access.S
syscall_src += arch-mips/syscalls/symlink.S
syscall_src += arch-mips/syscalls/fchdir.S
syscall_src += arch-mips/syscalls/truncate.S
syscall_src += arch-mips/syscalls/setxattr.S
syscall_src += arch-mips/syscalls/lsetxattr.S
syscall_src += arch-mips/syscalls/getxattr.S
syscall_src += arch-mips/syscalls/lgetxattr.S
syscall_src += arch-mips/syscalls/listxattr.S
syscall_src += arch-mips/syscalls/llistxattr.S
syscall_src += arch-mips/syscalls/removexattr.S
syscall_src += arch-mips/syscalls/lremovexattr.S
syscall_src += arch-mips/syscalls/__statfs64.S
syscall_src += arch-mips/syscalls/pause.S
syscall_src += arch-mips/syscalls/gettimeofday.S
syscall_src += arch-mips/syscalls/settimeofday.S
syscall_src += arch-mips/syscalls/times.S
syscall_src += arch-mips/syscalls/nanosleep.S
syscall_src += arch-mips/syscalls/clock_gettime.S
syscall_src += arch-mips/syscalls/clock_settime.S
syscall_src += arch-mips/syscalls/clock_getres.S
syscall_src += arch-mips/syscalls/clock_nanosleep.S
syscall_src += arch-mips/syscalls/getitimer.S
syscall_src += arch-mips/syscalls/setitimer.S
syscall_src += arch-mips/syscalls/__timer_create.S
syscall_src += arch-mips/syscalls/__timer_settime.S
syscall_src += arch-mips/syscalls/__timer_gettime.S
syscall_src += arch-mips/syscalls/__timer_getoverrun.S
syscall_src += arch-mips/syscalls/__timer_delete.S
syscall_src += arch-mips/syscalls/utimes.S
syscall_src += arch-mips/syscalls/utimensat.S
syscall_src += arch-mips/syscalls/sigaction.S
syscall_src += arch-mips/syscalls/sigprocmask.S
syscall_src += arch-mips/syscalls/__sigsuspend.S
syscall_src += arch-mips/syscalls/__rt_sigaction.S
syscall_src += arch-mips/syscalls/__rt_sigprocmask.S
syscall_src += arch-mips/syscalls/__rt_sigtimedwait.S
syscall_src += arch-mips/syscalls/sigpending.S
syscall_src += arch-mips/syscalls/socket.S
syscall_src += arch-mips/syscalls/socketpair.S
syscall_src += arch-mips/syscalls/bind.S
syscall_src += arch-mips/syscalls/connect.S
syscall_src += arch-mips/syscalls/listen.S
syscall_src += arch-mips/syscalls/accept.S
syscall_src += arch-mips/syscalls/getsockname.S
syscall_src += arch-mips/syscalls/getpeername.S
syscall_src += arch-mips/syscalls/sendto.S
syscall_src += arch-mips/syscalls/recvfrom.S
syscall_src += arch-mips/syscalls/shutdown.S
syscall_src += arch-mips/syscalls/setsockopt.S
syscall_src += arch-mips/syscalls/getsockopt.S
syscall_src += arch-mips/syscalls/sendmsg.S
syscall_src += arch-mips/syscalls/recvmsg.S
syscall_src += arch-mips/syscalls/sched_setscheduler.S
syscall_src += arch-mips/syscalls/sched_getscheduler.S
syscall_src += arch-mips/syscalls/sched_yield.S
syscall_src += arch-mips/syscalls/sched_setparam.S
syscall_src += arch-mips/syscalls/sched_getparam.S
syscall_src += arch-mips/syscalls/sched_get_priority_max.S
syscall_src += arch-mips/syscalls/sched_get_priority_min.S
syscall_src += arch-mips/syscalls/sched_rr_get_interval.S
syscall_src += arch-mips/syscalls/sched_setaffinity.S
syscall_src += arch-mips/syscalls/__sched_getaffinity.S
syscall_src += arch-mips/syscalls/__getcpu.S
syscall_src += arch-mips/syscalls/ioprio_set.S
syscall_src += arch-mips/syscalls/ioprio_get.S
syscall_src += arch-mips/syscalls/uname.S
syscall_src += arch-mips/syscalls/__wait4.S
syscall_src += arch-mips/syscalls/umask.S
syscall_src += arch-mips/syscalls/__reboot.S
syscall_src += arch-mips/syscalls/__syslog.S
syscall_src += arch-mips/syscalls/init_module.S
syscall_src += arch-mips/syscalls/delete_module.S
syscall_src += arch-mips/syscalls/klogctl.S
syscall_src += arch-mips/syscalls/sysinfo.S
syscall_src += arch-mips/syscalls/personality.S
syscall_src += arch-mips/syscalls/futex.S
syscall_src += arch-mips/syscalls/epoll_create.S
syscall_src += arch-mips/syscalls/epoll_ctl.S
syscall_src += arch-mips/syscalls/epoll_wait.S
syscall_src += arch-mips/syscalls/inotify_init.S
syscall_src += arch-mips/syscalls/inotify_add_watch.S
syscall_src += arch-mips/syscalls/inotify_rm_watch.S
syscall_src += arch-mips/syscalls/poll.S
syscall_src += arch-mips/syscalls/eventfd.S
syscall_src += arch-mips/syscalls/_flush_cache.S
syscall_src += arch-mips/syscalls/syscall.S

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __brk
.align 4
.ent __brk
__brk:
.set noreorder
.cpload $t9
li $v0, __NR_brk
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __brk

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __fcntl
.align 4
.ent __fcntl
__fcntl:
.set noreorder
.cpload $t9
li $v0, __NR_fcntl
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __fcntl

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __fcntl64
.align 4
.ent __fcntl64
__fcntl64:
.set noreorder
.cpload $t9
li $v0, __NR_fcntl64
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __fcntl64

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __fork
.align 4
.ent __fork
__fork:
.set noreorder
.cpload $t9
li $v0, __NR_fork
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __fork

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __fstatfs64
.align 4
.ent __fstatfs64
__fstatfs64:
.set noreorder
.cpload $t9
li $v0, __NR_fstatfs64
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __fstatfs64

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __getcpu
.align 4
.ent __getcpu
__getcpu:
.set noreorder
.cpload $t9
li $v0, __NR_getcpu
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __getcpu

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __getcwd
.align 4
.ent __getcwd
__getcwd:
.set noreorder
.cpload $t9
li $v0, __NR_getcwd
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __getcwd

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __getpriority
.align 4
.ent __getpriority
__getpriority:
.set noreorder
.cpload $t9
li $v0, __NR_getpriority
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __getpriority

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __ioctl
.align 4
.ent __ioctl
__ioctl:
.set noreorder
.cpload $t9
li $v0, __NR_ioctl
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __ioctl

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __llseek
.align 4
.ent __llseek
__llseek:
.set noreorder
.cpload $t9
li $v0, __NR__llseek
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __llseek

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __mmap2
.align 4
.ent __mmap2
__mmap2:
.set noreorder
.cpload $t9
li $v0, __NR_mmap2
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __mmap2

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __open
.align 4
.ent __open
__open:
.set noreorder
.cpload $t9
li $v0, __NR_open
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __open

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __openat
.align 4
.ent __openat
__openat:
.set noreorder
.cpload $t9
li $v0, __NR_openat
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __openat

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __ptrace
.align 4
.ent __ptrace
__ptrace:
.set noreorder
.cpload $t9
li $v0, __NR_ptrace
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __ptrace

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __reboot
.align 4
.ent __reboot
__reboot:
.set noreorder
.cpload $t9
li $v0, __NR_reboot
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __reboot

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __rt_sigaction
.align 4
.ent __rt_sigaction
__rt_sigaction:
.set noreorder
.cpload $t9
li $v0, __NR_rt_sigaction
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __rt_sigaction

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __rt_sigprocmask
.align 4
.ent __rt_sigprocmask
__rt_sigprocmask:
.set noreorder
.cpload $t9
li $v0, __NR_rt_sigprocmask
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __rt_sigprocmask

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __rt_sigtimedwait
.align 4
.ent __rt_sigtimedwait
__rt_sigtimedwait:
.set noreorder
.cpload $t9
li $v0, __NR_rt_sigtimedwait
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __rt_sigtimedwait

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __sched_getaffinity
.align 4
.ent __sched_getaffinity
__sched_getaffinity:
.set noreorder
.cpload $t9
li $v0, __NR_sched_getaffinity
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __sched_getaffinity

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __set_thread_area
.align 4
.ent __set_thread_area
__set_thread_area:
.set noreorder
.cpload $t9
li $v0, __NR_set_thread_area
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __set_thread_area

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __setresuid
.align 4
.ent __setresuid
__setresuid:
.set noreorder
.cpload $t9
li $v0, __NR_setresuid
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __setresuid

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __setreuid
.align 4
.ent __setreuid
__setreuid:
.set noreorder
.cpload $t9
li $v0, __NR_setreuid
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __setreuid

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __setuid
.align 4
.ent __setuid
__setuid:
.set noreorder
.cpload $t9
li $v0, __NR_setuid
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __setuid

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __sigsuspend
.align 4
.ent __sigsuspend
__sigsuspend:
.set noreorder
.cpload $t9
li $v0, __NR_sigsuspend
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __sigsuspend

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __statfs64
.align 4
.ent __statfs64
__statfs64:
.set noreorder
.cpload $t9
li $v0, __NR_statfs64
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __statfs64

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __sys_clone
.align 4
.ent __sys_clone
__sys_clone:
.set noreorder
.cpload $t9
li $v0, __NR_clone
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __sys_clone

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __syslog
.align 4
.ent __syslog
__syslog:
.set noreorder
.cpload $t9
li $v0, __NR_syslog
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __syslog

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __timer_create
.align 4
.ent __timer_create
__timer_create:
.set noreorder
.cpload $t9
li $v0, __NR_timer_create
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __timer_create

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __timer_delete
.align 4
.ent __timer_delete
__timer_delete:
.set noreorder
.cpload $t9
li $v0, __NR_timer_delete
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __timer_delete

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __timer_getoverrun
.align 4
.ent __timer_getoverrun
__timer_getoverrun:
.set noreorder
.cpload $t9
li $v0, __NR_timer_getoverrun
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __timer_getoverrun

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __timer_gettime
.align 4
.ent __timer_gettime
__timer_gettime:
.set noreorder
.cpload $t9
li $v0, __NR_timer_gettime
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __timer_gettime

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __timer_settime
.align 4
.ent __timer_settime
__timer_settime:
.set noreorder
.cpload $t9
li $v0, __NR_timer_settime
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __timer_settime

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __wait4
.align 4
.ent __wait4
__wait4:
.set noreorder
.cpload $t9
li $v0, __NR_wait4
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __wait4

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl __waitid
.align 4
.ent __waitid
__waitid:
.set noreorder
.cpload $t9
li $v0, __NR_waitid
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end __waitid

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl _exit
.align 4
.ent _exit
_exit:
.set noreorder
.cpload $t9
li $v0, __NR_exit_group
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end _exit

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl _exit_thread
.align 4
.ent _exit_thread
_exit_thread:
.set noreorder
.cpload $t9
li $v0, __NR_exit
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end _exit_thread

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl _flush_cache
.align 4
.ent _flush_cache
_flush_cache:
.set noreorder
.cpload $t9
li $v0, __NR_cacheflush
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end _flush_cache

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl _waitpid
.align 4
.ent _waitpid
_waitpid:
.set noreorder
.cpload $t9
li $v0, __NR_waitpid
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end _waitpid

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl accept
.align 4
.ent accept
accept:
.set noreorder
.cpload $t9
li $v0, __NR_accept
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end accept

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl access
.align 4
.ent access
access:
.set noreorder
.cpload $t9
li $v0, __NR_access
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end access

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl acct
.align 4
.ent acct
acct:
.set noreorder
.cpload $t9
li $v0, __NR_acct
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end acct

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl bind
.align 4
.ent bind
bind:
.set noreorder
.cpload $t9
li $v0, __NR_bind
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end bind

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl capget
.align 4
.ent capget
capget:
.set noreorder
.cpload $t9
li $v0, __NR_capget
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end capget

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl capset
.align 4
.ent capset
capset:
.set noreorder
.cpload $t9
li $v0, __NR_capset
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end capset

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl chdir
.align 4
.ent chdir
chdir:
.set noreorder
.cpload $t9
li $v0, __NR_chdir
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end chdir

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl chmod
.align 4
.ent chmod
chmod:
.set noreorder
.cpload $t9
li $v0, __NR_chmod
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end chmod

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl chown
.align 4
.ent chown
chown:
.set noreorder
.cpload $t9
li $v0, __NR_chown
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end chown

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl chroot
.align 4
.ent chroot
chroot:
.set noreorder
.cpload $t9
li $v0, __NR_chroot
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end chroot

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl clock_getres
.align 4
.ent clock_getres
clock_getres:
.set noreorder
.cpload $t9
li $v0, __NR_clock_getres
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end clock_getres

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl clock_gettime
.align 4
.ent clock_gettime
clock_gettime:
.set noreorder
.cpload $t9
li $v0, __NR_clock_gettime
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end clock_gettime

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl clock_nanosleep
.align 4
.ent clock_nanosleep
clock_nanosleep:
.set noreorder
.cpload $t9
li $v0, __NR_clock_nanosleep
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end clock_nanosleep

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl clock_settime
.align 4
.ent clock_settime
clock_settime:
.set noreorder
.cpload $t9
li $v0, __NR_clock_settime
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end clock_settime

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl close
.align 4
.ent close
close:
.set noreorder
.cpload $t9
li $v0, __NR_close
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end close

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl connect
.align 4
.ent connect
connect:
.set noreorder
.cpload $t9
li $v0, __NR_connect
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end connect

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl delete_module
.align 4
.ent delete_module
delete_module:
.set noreorder
.cpload $t9
li $v0, __NR_delete_module
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end delete_module

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl dup
.align 4
.ent dup
dup:
.set noreorder
.cpload $t9
li $v0, __NR_dup
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end dup

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl dup2
.align 4
.ent dup2
dup2:
.set noreorder
.cpload $t9
li $v0, __NR_dup2
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end dup2

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl epoll_create
.align 4
.ent epoll_create
epoll_create:
.set noreorder
.cpload $t9
li $v0, __NR_epoll_create
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end epoll_create

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl epoll_ctl
.align 4
.ent epoll_ctl
epoll_ctl:
.set noreorder
.cpload $t9
li $v0, __NR_epoll_ctl
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end epoll_ctl

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl epoll_wait
.align 4
.ent epoll_wait
epoll_wait:
.set noreorder
.cpload $t9
li $v0, __NR_epoll_wait
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end epoll_wait

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl eventfd
.align 4
.ent eventfd
eventfd:
.set noreorder
.cpload $t9
li $v0, __NR_eventfd2
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end eventfd

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl execve
.align 4
.ent execve
execve:
.set noreorder
.cpload $t9
li $v0, __NR_execve
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end execve

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fchdir
.align 4
.ent fchdir
fchdir:
.set noreorder
.cpload $t9
li $v0, __NR_fchdir
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fchdir

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fchmod
.align 4
.ent fchmod
fchmod:
.set noreorder
.cpload $t9
li $v0, __NR_fchmod
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fchmod

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fchmodat
.align 4
.ent fchmodat
fchmodat:
.set noreorder
.cpload $t9
li $v0, __NR_fchmodat
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fchmodat

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fchown
.align 4
.ent fchown
fchown:
.set noreorder
.cpload $t9
li $v0, __NR_fchown
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fchown

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fchownat
.align 4
.ent fchownat
fchownat:
.set noreorder
.cpload $t9
li $v0, __NR_fchownat
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fchownat

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fdatasync
.align 4
.ent fdatasync
fdatasync:
.set noreorder
.cpload $t9
li $v0, __NR_fdatasync
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fdatasync

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fgetxattr
.align 4
.ent fgetxattr
fgetxattr:
.set noreorder
.cpload $t9
li $v0, __NR_fgetxattr
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fgetxattr

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl flistxattr
.align 4
.ent flistxattr
flistxattr:
.set noreorder
.cpload $t9
li $v0, __NR_flistxattr
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end flistxattr

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl flock
.align 4
.ent flock
flock:
.set noreorder
.cpload $t9
li $v0, __NR_flock
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end flock

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fremovexattr
.align 4
.ent fremovexattr
fremovexattr:
.set noreorder
.cpload $t9
li $v0, __NR_fremovexattr
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fremovexattr

View File

@@ -0,0 +1,22 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.globl fsetxattr
.align 4
.ent fsetxattr
fsetxattr:
.set noreorder
.cpload $t9
li $v0, __NR_fsetxattr
syscall
bnez $a3, 1f
move $a0, $v0
j $ra
nop
1:
la $t9,__set_errno
j $t9
nop
.set reorder
.end fsetxattr

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