Commit graph

189 commits

Author SHA1 Message Date
Elliott Hughes
21788265da Remove a duplicate declaration, improve check-symbols-glibc.py.
Change-Id: I97a98dfc8acaa93172386b4475487a05a35a9337
2016-05-06 14:43:50 -07:00
Elliott Hughes
8aabbd7f63 Move glibc-syscalls.h into bits/.
Bug: http://b/28519060
Change-Id: I0de1ba16b16eb7b780de89954d3fa45cca2f5295
2016-05-02 12:47:58 -07:00
Christopher Ferris
f5a9123d9f Add unwind information for r7 in arm syscalls.
It turns out that clang can emit code where the sp is saved in the r7
register on arm. Unfortunately, a lot of our syscalls overwrite that
value while the syscall is executing, so unwinding through that syscall
fails.

Update the syscall generation code to add unwinding information for
these uses.

Bug: 28411713
(cherry picked from commit 6e45d37dec)

Change-Id: Ib775effc44c4113735fe9032b0602b9d63e3e390
2016-04-27 20:34:47 -07:00
Elliott Hughes
187d37d35a Teach our script to ignore more dead POSIX stuff.
Change-Id: Ic29451b7110ac35291125d427e1ae6fd334bdbd5
2016-04-06 13:29:22 -07:00
Mingwei Shi
be91052932 libc: implement kernel vdso syscalls for i386
This patch uses __kernel_vsyscall instead of "int 0x80"
as the syscall entry point. AT_SYSINFO points to
an adapter to mask the arch specific difference and gives a
performance boost on i386 architecture.

Change-ID: Ib340c604d02c6c25714a95793737e3cfdc3fc5d7
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
2016-03-25 14:10:05 -07:00
Greg Hackmann
e5c872ffb7 genversion-scripts: fix script name in autogenerated comment
Change-Id: I2a304818cfc54d08a08d2e621e4cf74e7ce465dd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-03-23 16:25:42 -07:00
Dimitry Ivanov
19acb698e8 [MIPS] Add __popcountsi2 to libgcc_compat.c
Also removed outdated genlibgcc_compat.py script
and references to it.

Bug: http://b/27340856
Change-Id: I7eef362364078867c60a27e72abba515f08b6651
2016-02-25 14:28:45 -08:00
Elliott Hughes
f226ee59e0 Add fopen64/freopen64/tmpfile64 aliases.
Our fopen/freopen/tmpfile are already always O_LARGEFILE, but let's add
the aliases for _LARGEFILE_SOURCE compatibility.

Bug: http://b/24807045
Change-Id: I5d99b3ef3c9f27ce70f13313f6a92e96c7f21f80
2016-02-03 11:24:28 -08:00
Elliott Hughes
d07c4434f1 Add more fortify symbols to the expected differences from glibc.
Change-Id: I6266b2e6cbea3c014b4ea30a7100186965e40cf1
2016-01-15 19:54:31 -08:00
Dimitry Ivanov
585e959849 Generate libc version-script for brillo
Brillo doesn't use the ndk cruft, so we need
separate set of version scripts. Added new "nobrillo"
tag to mark such symbols in *.map.txt files.

Bug: http://b/26164862
Change-Id: Iaee1b7119f75b68c2971679fc32817e6df29fd94
2015-12-14 14:23:06 -08:00
Dmitriy Ivanov
bc75047a1b Generate libdl.so per-architecture version script
Bug: http://b/24767418
Change-Id: I3d5775ba44d4c8e7fc5f2fbebae10e022100f1e2
2015-10-30 17:43:27 -07:00
Dmitriy Ivanov
284b468524 Generate per-architecture version scripts.
Bug: http://b/24767418
Change-Id: I23e49d8d30c0def3215ffbd99d09f207d9483624
2015-10-28 16:40:53 -07:00
Neil Fuller
ac77536b79 Move tzdata scripts from bionic to external/icu
The scripts affect files in external/icu, bionic
and the generated files affect libcore. The files must
be updated together so there is no "obvious" home.

OEM developers seem to want to update ICU
themselves and have been asking how. Moving the
scripts to external/icu and splitting the ICU generation
code into a sub-script they can run makes some sense.

Bug: 23419215
Change-Id: Ia26fa526fd2b560a79f36d327a10e262a85db752
2015-08-24 18:25:05 +01:00
Dmitriy Ivanov
6cda074289 Strip version info when extracting symbols
Bug: http://b/20139821
Change-Id: I1c1ed1b97a75936407e996698b98b94a7175ac30
2015-06-04 17:56:02 +00:00
Elliott Hughes
ec738d9494 Fix various bugs in the check-symbols script.
It had bitrotted away during the last release cycle.

Change-Id: I20f0a3b409af4530b81f26299bef9de01530c9fd
2015-05-11 12:10:40 -07:00
Neil Fuller
4d3abcb033 Update update-tzdata.py tool to generate ICU4J data jars
The ICU4J changes are not necessary for use on Android (since
we use the ICU4C .dat file), but updating them ensures that
the .jars in sync with everything else and the jars are currently
required for host tests.

Change-Id: Ie56b31af87e8fbd27a6489af8287e4b6a7be6b8f
2015-04-09 09:38:31 +00:00
Christopher Ferris
fa5faa0ce6 Make gensyscalls.py use the ALIAS_SYMBOL macro.
Change-Id: Ib94c0abb6fc85126ecc5ed3f1962b2b8b90b9952
2015-03-24 21:08:26 -07:00
Fredrik Roubert
bdd8452472 Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data.
This is now necessary to build .dat files that are useable for ICU4J as
well, and will need to be used for any future updates of the .dat file:

https://android.googlesource.com/platform/external/icu/+/6b52738

Change-Id: Ifa3a7469a66ab932db20876697e45814f0c5ddc3
2015-02-04 17:17:34 +01:00
Nick Kralevich
00490ae3f3 Ensure raw fchmod/fchmodat syscalls are hidden.
In https://android-review.googlesource.com/#/c/127908/5/libc/SYSCALLS.TXT@116
Elliott said:

  for LP64 these will be hidden. for LP32 we were cowards and left
  them all public for compatibility (though i don't think we ever
  dremeled to see whether it was needed). we don't have an easy
  way to recognize additions, though, so we can't prevent adding
  new turds.

Add a mechanism to prevent the adding of new turds, and use that
mechanism on the fchmod/fchmodat system calls.

Bug: 19233951
Change-Id: I98f98345970b631a379f348df57858f9fc3d57c0
2015-02-03 12:10:30 -08:00
Neil Fuller
0662c3e5b3 Fixes to the update-tzdata.py tool
We build one too many times. Creating a missing directory
is sufficient.

The tz2icu needs some files in the CWD. Added symlinks.

Bug: 19230091
Change-Id: I58f9817af68b229f48139e56503f50a2b6dbb4fe
2015-02-02 17:42:41 +00:00
Dan Albert
9c3fd59b00 Add a basic NDK compatibility library.
We know we can safely statically link `libm`, since it doesn't have
any dependencies on the OS or the layout of a data type that has
changed between releases (like `pthread_t`).

We can safely statically link `libc_syscalls` because the user can
check for and handle `ENOSYS`.

Update `ndk_missing_symbols.py` to account for symbols that are in the
compatibility library.

Improve `symbols.py` to be able to pull symbols from a static library.

Change-Id: Ifb0ede1e8b4a8f0f33865d9fed72fb8b4d443fbc
2015-01-21 18:12:15 -08:00
Dan Albert
169eb66451 Add ndk_missing_symbols.py.
ndk_missing_symbols.py pulls libc.so and libm.so off a running device
or emulator and shows the list of symbols that are in the current
bionic that aren't available on the target.

Change-Id: Ia92c315a6a0ce2e5c33db0b62c8fab41c08a4c31
2015-01-21 17:09:50 -08:00
Elliott Hughes
6b2b5856d9 Update bionic NOTICE files.
Change-Id: Ic280872ef3137febd9d4a87d5c7662e264692071
2014-12-18 16:27:30 -08:00
Elliott Hughes
0393221f47 Make the missing symbols script more useful.
If something's in POSIX, we don't need to show it in the glibc list.

If something's not implemented by glibc, we don't need to show it in the
POSIX list (because it's probably either a macro or obsolete).

Change-Id: Ied0f8d97d3fffb280c22e9cdf6782430d776c02f
2014-12-04 11:24:48 -08:00
Elliott Hughes
2c2463bd30 Fix tzdata update tools for 'backzone'.
To maintain the status quo, we need to pull in backzone file. This file
can't be built on its own, so the easiest fix is to give zic(1) all the
files at once.

We also now have a situation where we have links to links, so we need to
dereference them until we find actual data.

Bug: 18330681
Change-Id: I03f4aa8e6e23802dc35cbff2f74f325eb17d7b2b
2014-11-11 16:30:18 -08:00
Elliott Hughes
6370aedd0e Add support for listing missing POSIX 2013 symbols.
Change-Id: Ic51787890f837f74a22ca63d64a5710474d00cbc
2014-11-05 16:54:53 -08:00
Christopher Ferris
6869d26ad9 Force export symbols on all x86 variants in libc.
For silvermont, the __popcountsi2 symbol does not get exported by libc.
But for atom, this symbol is exported. Since we already exported this symbol
for previous releases, it's better to just follow through and force
the export, but only for 32 bit. x86 64 bit will not export this symbol.

Bug: 17681440

(cherry picked from commit d11eac3455)

Change-Id: I93704c721d98d569922f606f214069bda24872ba
2014-10-06 16:41:46 -07:00
Elliott Hughes
f8896c6c93 Fix update-tzdata.py to rebuild icu4c .dat file.
Bug: 17731498
Change-Id: I4c810507c0ca9883dde1bece14530db80485b8f6
2014-09-30 17:30:01 -07:00
Elliott Hughes
5681fe8eae Remove an unused file.
Also remove a reference to it and two other files that have already
been removed in a script --- these files were problematic because they
weren't UTF-8.

Change-Id: Ibf597bac1903c34d8d0fe0a09615c42f24d4f23d
2014-09-13 09:24:28 -07:00
Elliott Hughes
011e111d29 Ensure __set_errno is still visible on LP32.
The use of the .hidden directive to avoid going via the PLT for
__set_errno had the side-effect of actually making __set_errno
hidden (which is odd because assembler directives don't usually
affect symbols defined in a different file --- you can't even
create a weak reference to a symbol that's defined in a different
file).

This change switches the system call stubs over to a new always-hidden
__set_errno_internal and has a visible __set_errno on LP32 just for
binary compatibility with old NDK apps.

(cherry-pick of 7efad83d430f4d824f2aaa75edea5106f6ff8aae.)

Bug: 17423135
Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
2014-09-08 16:46:50 -07:00
Dan Albert
2320b02c7d __gnu_basename(3) is accounted for.
Change-Id: I3836b14a797c4a8d121c6d29d95791ac768257da
2014-08-21 11:36:07 -07:00
Elliott Hughes
dc1fb7000a Clean up some of our python scripts.
Change-Id: Ifa75345db43434298cfb6113fbe2f7a33b88c79d
2014-08-20 11:16:11 -07:00
Dan Albert
fd5ee9aebc Hide C++ stuff in libc. Put it back in libstdc++.
Bug: 17062445
Change-Id: I027b186719654c2865b08c3fa83f90fa00c1e838
2014-08-18 12:01:01 -07:00
Dan Albert
76212eeb53 Add more functionality to glibc symbol checker.
Also scan NDK's unwanted symbols list (to show the things that we're
exporting but the NDK isn't. Symbols hidden in the NDK will be marked
with a *.

Add a -u (--unwanted) flag to disable the first two printed groups
(all symbols in bionic, all symbols in glibc). This is helpful when
wanting to grep in the list of unwanted symbols.

Finally, update the list of known differences between us and glibc.

Change-Id: I6fdb4126823098430454763c391bd8cd369a75bb
2014-08-14 14:02:34 -07:00
Dan Albert
bc9f9f25bf Make __set_errno hidden in asm.
This fixes the build after the -Bsymbolic change.

Bug: 16853291
Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2
2014-08-08 15:35:47 -07:00
Dan Albert
3726f9c38b Revert "Fix incorrect relocations for x86."
Bug: 16853291
This reverts commit 512bc52326.
2014-08-08 22:26:47 +00:00
Christopher Ferris
92f0c91b82 Merge "Create a distinct temp directory for each run." 2014-08-07 15:46:11 +00:00
Christopher Ferris
01bd32e0e4 Create a distinct temp directory for each run.
Modify make__NR_name so that only __ARM_NR_ is exempted from the
__NR_ being prepended. This avoids a case where using a name starting
with __ but is not a valid syscall name in SYSCALLS.TXT does not generate
code that will compile but references the function itself and causes
link errors.

Fix all of the directory references from dir_part1 + dir_part2 to
use os.path.join() instead.

Change-Id: Ib9527eba6f25f26a30c5cb0ad431f3f88a7683cf
2014-08-07 19:33:22 -07:00
Dan Albert
512bc52326 Fix incorrect relocations for x86.
These calls were not going through the PLT like they should have been.

Bug: 16853291
Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
2014-08-07 16:21:47 -07:00
Elliott Hughes
13bab43337 Fix the tzdata update tools.
The recent libcore ZoneInfo changes mean that we can no longer
compile libcore's ZoneInfo against the RI. Luckily, the field in
our data file that we needed ZoneInfo for isn't actually used.
This change removes our dependence on libcore.

I've left the field in to avoid a file format change. We can remove
the field if/when we next have a real need to bump the file format.

(cherry-pick of 90cb5ffb85a9bc2e725824b3ca8db932d02c45db.)

Bug: 16168653
Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7
2014-08-06 17:31:48 -07:00
Elliott Hughes
5d2f86f363 Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
Change-Id: I99f9d2e0a28342663cec6aed483e1a23c12e5e87
2014-07-23 11:10:48 -07:00
Elliott Hughes
3758a244cf Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
Change-Id: Id6fcb74292e661504d0758bfce24abdc18cb8d32
2014-07-22 21:29:00 -07:00
Elliott Hughes
30ab939496 update-tzdata.py needs to know where to find icu.
Change-Id: If5561b92c233276fb072da62be21f23df4781c41
2014-07-09 15:42:59 -07:00
Elliott Hughes
e8e453439f Bring our "libresolv" stuff in line with glibc.
Despite the name, most of resolv_private.h is actually in glibc; it's just
that there it's tucked away in libresolv whereas we have it in libc.

Change-Id: Ibcf6603f1141ffd2661cee0bffa83052d4f9e549
2014-06-13 11:50:07 -07:00
Serban Constantinescu
602b4e482c AArch64: Remove Frame Record from ARM64 syscalls
This patch removes the frame record created on svc calls.

Change-Id: I67cf926ba59540e824fb9749d30538e332df7c1e
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-06-09 11:36:37 -07:00
Elliott Hughes
f6b1d439cc Add a few more C11 functions to the whitelist.
Change-Id: Ie2e767910d7cc8a78c05e29960cf4ab52a59fe9d
2014-06-06 15:20:50 -07:00
Elliott Hughes
15a0456d0b Remove unnecessary instructions from x86/x86_64 syscalls.
__set_errno returns -1 exactly so that callers don't need to bother.
The other architectures were already taking advantage of this, but
no one had ever fixed x86 and x86_64.

Change-Id: Ie131494be664f6c4a1bbf8c61bbbed58eac56122
2014-06-05 17:24:30 -07:00
Christopher Ferris
15b91e92a0 Fix x86 cfi directives for syscalls.
The syscall generation always used 4 bytes for each push cfi directive.
However, the first push should always use an offset of 8 bytes, each
subsequent push after that is only 4 bytes though.

Change-Id: Ibaabd107f399ef67010b9a08213783957c2f74a9
2014-05-29 19:04:36 -07:00
Elliott Hughes
45bf4c315d Add some more BSD symbols to the list.
Bug: 11156955
Change-Id: I07489ec63536121dbfc372170ef5cf60a5c58948
2014-05-22 18:53:21 -07:00
Christopher Ferris
df22a121b2 Add cfi directives for arm64 assembler.
Fix syscall generator to add cfi directives and add the directives
for all arm64 assembler.

Bug: 15138290
Change-Id: I7f0e4a16c141ac624e5276917a3a1ed45778e057
2014-05-21 17:46:52 -07:00
Neil Fuller
768051405e Merge "Treat zero or >1 dat files as an error" 2014-05-21 16:18:59 +00:00
Neil Fuller
43f3715953 Treat zero or >1 dat files as an error
Based on feedback from
I7efbd6f453fe2b3e71f564121ff0f64a74289d86

Change-Id: Ie131ab8475083350dc183d9f6d5ea7a0b0617c5b
2014-05-21 17:18:17 +01:00
Elliott Hughes
29f2906bda Merge "Add a few more symbols to check-symbols-glibc." 2014-05-21 15:23:35 +00:00
Neil Fuller
2278488546 Merge "Change update-tzdata.py to update ICU data as well" 2014-05-21 08:11:40 +00:00
Elliott Hughes
b497c43336 Add a few more symbols to check-symbols-glibc.
Bug: 11156955
Change-Id: Iee0bae6f9742eca188abc7a337371c50888a0ad6
2014-05-20 20:58:23 -07:00
Neil Fuller
246c688020 Change update-tzdata.py to update ICU data as well
The update-tzdata.py tool now uses downloaded Olson data
to update ICU (*new*) at the same time as it updates Bionic
data.

Change-Id: I7efbd6f453fe2b3e71f564121ff0f64a74289d86
2014-05-20 11:48:43 +01:00
Elliott Hughes
5a93e88c7f Add a script for finding symbols in bionic that aren't in glibc.
Bug: 11156955
Change-Id: I9772f054f6a92b842531df084dee0ea9c28806be
2014-05-19 18:01:07 -07:00
Elliott Hughes
bfa582d032 Update the NOTICE files and improve the script slightly.
Change-Id: Ia131634cd97ca9523e1b63dce41f66247cbaa311
2014-05-05 16:23:15 -07:00
Dmitriy Ivanov
6a45fe9872 Fix for libgcc compat generation script.
Taking into account possibility that external symbol
  could have been an OBJECT instead of function.

  b/14090368

Change-Id: Iac173d2dd1309ed53024306578137c26b1dbbf15
2014-04-18 17:34:20 -07:00
Elliott Hughes
22a0d6fcdc Bring the generate-NOTICE script up to date.
Change-Id: I63981a2f3cb0a4d7ee7e1a2b4ce00f77898ac25b
2014-03-06 15:10:22 -08:00
Dmitriy Ivanov
54d49ac75b Merge "Added script generating additions to libgcc_compat.c from linker errors" 2014-02-20 19:40:08 +00:00
Dmitriy Ivanov
adab51aefd Added script generating additions to libgcc_compat.c from linker errors
bug: 12234455
Change-Id: Icac35237f06e75745da5a91d9c4c941d7df4f84d
2014-02-20 11:34:08 -08:00
Elliott Hughes
d465eb4e76 Remove the useless _C_LABEL from generated system calls.
Change-Id: Id1d2fd39972652831ea825f6f9cf940b08f42b5c
2014-02-19 18:59:19 -08:00
Elliott Hughes
9abbbdc534 Make mips/mips64 syscall stubs more like the other architectures.
Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
2014-02-19 14:54:31 -08:00
Elliott Hughes
eae27dc55a Make mips generated assembler more like the mips64 stuff.
I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.

Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
2014-02-19 12:20:00 -08:00
Elliott Hughes
986f906710 Fix build by avoiding the _C_LABEL macro.
Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
2014-02-18 16:42:36 -08:00
Elliott Hughes
db1ea34748 Implement some of the missing LFS64 support.
This gives us:

* <dirent.h>
  struct dirent64
  readdir64, readdir64_r, alphasort64, scandir64

* <fcntl.h>
  creat64, openat64, open64.

* <sys/stat.h>
  struct stat64
  fstat64, fstatat64, lstat64, stat64.

* <sys/statvfs.h>
  struct statvfs64
  statvfs64, fstatvfs64.

* <sys/vfs.h>
  struct statfs64
  statfs64, fstatfs64.

This also removes some of the incorrect #define hacks we've had in the
past (for stat64, for example, which we promised to clean up way back
in bug 8472078).

Bug: 11865851
Bug: 8472078
Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
2014-02-18 15:39:24 -08:00
Elliott Hughes
b3a23bd017 Build syscall stubs in their own library.
This lets us lose the auto-generated makefiles.

Change-Id: I2de0c71b3b9c08f9cce8f4ff7fd7254dda008c86
2014-02-11 13:52:02 -08:00
Chris Dearman
5043212b76 [MIPS64] Add syscall related files
Change-Id: I2f5d05df0e767538a6fe467ca0a2386325f8b71f
Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
Signed-off-by: Duane Sand <duane.sand@imgtec.com>
2014-02-06 15:39:38 -08:00
Colin Cross
d1973ca513 bionic: rename aarch64 target to arm64
Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
2014-01-23 18:35:39 -08:00
Christopher Ferris
e4bc756121 Add cfi directives to x86 syscalls.
Modify the syscalls script to generate the cfi directives for x86
syscalls.

Update the x86 syscalls.

Change-Id: Ia1993dc714a7e79f917087fff8200e9a02c52603
2014-01-06 16:39:10 -08:00
Elliott Hughes
887e1140fe Clean up <sched.h>.
This patch switches to using the uapi constants. It also adds the missing
setns system call, fixes sched_getcpu's error behavior, and fixes the
gensyscalls script now ARM is uapi-only too.

Change-Id: I8e16b1693d6d32cd9b8499e46b5d8b0a50bc4f1d
2014-01-02 12:05:50 -08:00
Christopher Ferris
ed45970ac5 Add cfi directives to all arm assembly.
Since the ENTRY/END macros now have .cfi_startproc/.cfi_endproc, most of the
custom arm assembly has no unwind information. Adding the proper cfi directives
for these and removing the arm directives.

Update the gensyscalls.py script to add these cfi directives for the generated
assembly. Also fix the references to non-uapi headers to the proper uapi
header.

In addition, remove the kill.S, tkill.S, tgkill.S for arm since they are not
needed at all. The unwinder (libunwind) is able to properly unwind using the
normal abort.

After this change, I can unwind through the system calls again.

Bug: 11559337
Bug: 11825869
Bug: 11321283

Change-Id: I18b48089ef2d000a67913ce6febc6544bbe934a3
2013-12-02 19:13:12 -08:00
Elliott Hughes
ed74484dcb Stop using the non-uapi <linux/err.h> header file.
We only need it for MAX_ERRNO, and it's time we had somewhere to put
the little assembler utility macros we've been putting off writing.

Change-Id: I9354d2e0dc47c689296a34b5b229fc9ba75f1a83
2013-11-07 10:31:05 -08:00
Serban Constantinescu
feaa89a1bc AArch64: Add support for AArch64 to the syscall interface
This patch adds support for AArch64 to the syscall interface. The kernel
implementation exports a set of canonical syscalls, therefore some of
the userspace exported syscalls are implemented as stubs based on the
canonical set.

Change-Id: Ia965d71e97769b8be9d7655193fc40303964c4df
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2013-10-28 16:16:34 -07:00
Elliott Hughes
6b53c2349a Fix the exit syscall stub's name.
I've left the exit_group syscall as _exit because otherwise we'd have to
convince the compiler that our _exit (which just calls __exit_group) is
actually "noreturn", and it seems like that would be less clean than just
cutting out the middleman.

We'll just have to trust ourselves not to add anything to SYSCALLS.TXT
that ought to be private but that only has a single leading underscore.
Hopefully we can manage that.

Change-Id: Iac47faea9f516186e1774381846c54cafabc4354
2013-10-24 22:41:50 -07:00
Elliott Hughes
fff6e272e9 Use hidden visibility for generated stubs whose names begin with underscores.
Change-Id: Idb39fd04b7a14114801624e744e76e0e7913d951
2013-10-24 17:03:20 -07:00
Elliott Hughes
103ccde8fe Sort the syscalls.mk files, give all generated files the same header.
No non-comment changes to the .S files.

Change-Id: Iafcfd004c3ea92b64268f80ab16df615b97cefac
2013-10-16 14:27:59 -07:00
Elliott Hughes
c9da332cce Remove support for the useless 'custom' option in SYSCALLS.TXT.
This cruft dates from a time when bionic would only output syscall
contants for the syscalls mentioned in SYSCALLS.TXT. I fixed that
a long time ago, but never followed through with the removal of what
was then confusingly called "stub" and was recently renamed "custom".

Change-Id: I8f3872a200b2dc8325e357cc5ee505ea4212ef95
2013-10-15 18:18:58 -07:00
Elliott Hughes
0437f3ff29 Refactor the syscall generation script.
Primarily so that the new x86_64 alias functionality is now available for
all architectures.

Change-Id: I9fde59093a1d08de98923f121a6e3d05ec5801d2
2013-10-07 23:53:13 -07:00
H.J. Lu
6fe4e87954 Add an optional alias list to SYSCALLS.TXT
This patch adds an optional alias list to SYSCALLS.TXT.  It is used to
create aliases for a syscall.  For x86-64, lseek64 is an alias for lseek.

Change-Id: Icb11fd2bb461ea4f5f0a26bfc585471d7d7cc468
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-07 21:37:12 +04:00
Pavel Chupin
f12a18b850 x86_64: Add x86_64 syscalls and tune gen scripts for x86_64
* Tune syscall stubs generator for 4th target: x86_64
* Update SYSCALLS.TXT with x86_64 syscalls:
 - Most of the x86 syscalls are equally supported
 - *32 syscalls are not supported on 64-bit
 - *64 syscalls are replaced accordingly without 64 suffix
 - Some syscalls are not supported, replaced with x86_64 analog

Syscalls are regenerated as separate patch for review convenience.

Change-Id: I4ea2e0f13759b0aa61f05208ca68da8d6bc7c048
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-01 13:27:07 -07:00
Elliott Hughes
d612165c67 Make it easier to add syscalls for another architecture.
Much of the per-architecture duplication can be removed, so let's do so
before we add the 64-bit architectures.

Change-Id: Ieb796503c8e5353ea38c3bab768bb9a690c9a767
2013-09-26 08:57:17 -07:00
Elliott Hughes
5e52279256 Simplify the SYSCALLS.TXT format.
This will make addition of new architectures less unpleasant.

Change-Id: I77c866a63b686e8e70709d08fcf52e8a2d37310a
2013-09-24 00:35:31 -07:00
Elliott Hughes
18bc975bfe Slight script cleanup; make gensyscalls work from any directory.
Also remove a ton of dead code.

Change-Id: I1315623695a004f643b155f121cbafe24b715b8a
2013-06-17 10:39:33 -07:00
Elliott Hughes
85aeb49144 Don't avoid IPv6 when looking for new tzdata.
Our internal IPv6 FTP networking problems have been fixed.

Change-Id: I9949a13fa20a3b0f3845e565e1461320078d3f14
2013-04-24 10:50:45 -07:00
Elliott Hughes
21da42ea91 Disable IPv6 when looking for tzdata updates.
My problems connecting to ftp.iana.org are only via IPv6.

Change-Id: I42e4bae7981ec4b64822f745a7a15544d77ef22d
2013-04-22 13:44:50 -07:00
Elliott Hughes
676e66db25 Add signature checking to HTTP tzdata updates.
Change-Id: Idcfd217eb215d6a170e6884be8d8ad28cd4fe70d
2013-04-22 11:41:57 -07:00
Elliott Hughes
f8dff7d449 Rename the tzdata update tool, and add HTTP support.
The FTP server is currently unavailable, but the HTTP server is working
fine.

Change-Id: If7f2f396e89aca022a60af531f3604523b7bf95c
2013-04-22 11:11:43 -07:00
Elliott Hughes
a51916b58b Fix the SYSCALLS.TXT documentation and remove a dead script.
We use the system call constants from the kernel header files now,
so there's no need to check that they've been correctly transcribed
into SYSCALLS.TXT.

This is a work in progress. I've added TODOs to SYSCALLS.TXT explaining
what's left to do.

Change-Id: I3b86acfe7f84b4da1c802ee5a4ef13a2e83e7939
2013-04-03 10:08:09 -07:00
Elliott Hughes
e6ddfc55c8 Remove some dead script code and fix a script comment.
Change-Id: I91ca466d1b6f8a39da50ce61acebc268d0daab3a
2013-03-25 14:09:52 -07:00
Elliott Hughes
1b91c6c11f Stop generating <sys/linux-syscalls.h>.
The <asm/unistd.h> files contain the canonical data, and
<sys/glibc-syscalls.h> contain new glibc-compatible names,
and if you #include the standard <sys/syscall.h> you get
both sets of names.

Change-Id: I9919c080931c0ba1660f5e37c6a6265ea716d603
2013-03-22 18:56:24 -07:00
Elliott Hughes
cda62094ef Use the correct names for the __ARM_NR_* syscalls.
This lets us move all the ARM syscall stubs over to the kernel <asm/unistd.h>.
Our generated <sys/linux-syscalls.h> is now unused, but I'll remove that in a
later change.

Change-Id: Ie5ff2cc4abce1938576af7cbaef615a79c7f310d
2013-03-22 13:53:43 -07:00
Elliott Hughes
5c2772f59d The SYS_ constants should cover all __NR_ values.
<sys/linux-syscalls.h> only contains constants for the syscalls
we're generating stubs for. We want all the syscalls available
on the architecture in question.

Keep using <sys/linux-syscalls.h> on ARM for now because the
__NR_ARM_set_tls and __NR_ARM_cacheflush values aren't in <asm/unistd.h>.

Change-Id: I66683950d87d9b18d6107d0acc0ed238a4496f44
2013-03-21 22:26:20 -07:00
Elliott Hughes
9724ce3a09 Don't #define SYS_ constants unless they make sense for the current architecture.
Fixes the MIPS and x86 builds. strace tests whether syscalls
are supported using #ifdef of the appropriate SYS_ constant.

Change-Id: I90be118dc42abfdaf5b0f9b1e676e8601f55106e
2013-03-21 19:44:36 -07:00
Elliott Hughes
8ecf225827 Provide glibc-compatible SYS_* aliases for the __NR_* constants.
This helps us remove another external/strace bionic hack.

Change-Id: I3e82c0d2fd27e479be98f096e05b666fd16f8eb3
2013-03-21 18:06:55 -07:00
Elliott Hughes
af7f2f2fcf Fix a bug in ZoneCompactor that meant the zonetab offset was wrong.
Bug: 8391426
Change-Id: Ia4a8889b5a613aa96bb3fb5d89a921c913ff7626
2013-03-14 17:10:24 -07:00
Elliott Hughes
9aceab5015 Use the kernel's MAX_ERRNO in the syscall stubs.
Bug: http://code.google.com/p/android/issues/detail?id=53104
Change-Id: Iaabf7025b153e96dc5eca231a33a32d4cb7d8116
2013-03-12 17:43:58 -07:00
Elliott Hughes
cd6780b167 Remove dead code from gensyscalls.py.
Change-Id: I0df69f8fd990f829ccbfcd5123c17b523d5a4d45
2013-02-07 14:07:00 -08:00
Elliott Hughes
7582a9c119 Switch x86 syscall stubs over to the ENTER/END style of the ARM stubs.
Also update the x86 asm.h to support this; we need it for libm assembler
anyway.

Also clean up the _FBSDID hack in <sys/cdefs.h>.

Change-Id: Iababd977b8110ec022bf7c93f4d62ece47630e7c
2013-02-06 17:08:15 -08:00