Commit graph

6643 commits

Author SHA1 Message Date
Dan Willemsen
e4f486ca25 Fix Soong mips builds
Change-Id: I6ae8208e077d831969b08e7abd232deaa20ceca1
2016-01-13 23:22:22 -08:00
Dan Willemsen
4031cbe9c2 Fix Soong x86 builds
Change-Id: Ida3f3584f832d61caf7200557ea57be799eaf38e
2016-01-13 13:37:01 -08:00
Dimitry Ivanov
126d5ab779 Merge "Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"" 2016-01-13 20:35:25 +00:00
Dimitry Ivanov
e1078a939a Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"
This reverts commit ff14fb5a1f.

Bug: http://b/26497521
Change-Id: Id7131b37a31e936db0e72ef9969e1f13d2dd578f
2016-01-13 20:32:12 +00:00
Colin Cross
2487f3e15f Merge "Rearrange build files to support USE_SOONG=true" 2016-01-13 20:32:09 +00:00
Dan Willemsen
5d10e69bea Merge "Fix Soong x86 atom builds" 2016-01-13 20:32:07 +00:00
Colin Cross
c292f57ec7 Merge "Update Android.bp for changes to Android.mk" 2016-01-13 20:31:39 +00:00
Dan Willemsen
701b54533b Fix Soong x86 atom builds
Change-Id: Ie92e605c499f128335a8da7cfefa7e6ae367a223
2016-01-12 19:45:57 -08:00
Elliott Hughes
9361ad3f80 Fix <sys/sysmacros.h>.
1. The definitions were wrong.
2. The definitions were inline functions.
3. The definitions were polluting the namespace even for code that doesn't
   want BSD cruft.

Note that everybody will still get these by default, because you still get
all the BSD stuff by default.

Bug: http://b/12706131
Change-Id: I062ecd09feef7a6e8ba1922d465b96a9c4bf4f4e
2016-01-12 14:43:27 -08:00
Colin Cross
c23aeb8414 Rearrange build files to support USE_SOONG=true
Building with USE_SOONG=true will build with an Android.bp file if it is
present in the directory, otherwise an Android.mk file.  Only a few of
the bionic directories compile with soong, so include all of them from
the top level Android.mk file and remove the top level Android.bp file.
Individual subdirectories with Android.bp files will use soong with
USE_SOONG=true.

Change-Id: Idf8d7977ea4668fa646be25b543bf9d3773de615
2016-01-12 13:42:21 -08:00
Chih-hung Hsieh
2c7d1e67e0 Merge "Explicit binary op order for both gcc and clang/llvm." 2016-01-12 19:41:46 +00:00
Chih-Hung Hsieh
592c7b4cd7 Explicit binary op order for both gcc and clang/llvm.
* gcc assembler parses (1 << n - 1) as ((1 << n) - 1)
* llvm assembler parses (1 << n - 1) as (1 << (n - 1))

BUG: 26289334
Change-Id: Iaaa3d07f59c0f87cb1b80b9a1c4e765b66846791
2016-01-12 09:48:09 -08:00
Colin Cross
a3f9fca568 Update Android.bp for changes to Android.mk
Change-Id: Ie01e326e2776c699237b156155610d08801c0cd4
2016-01-11 15:34:24 -08:00
Yi Kong
fdb2963e0a Handle AF_PACKET in getifaddr(3).
Also fix a bug where we were mutating the address/broadcast address
of an existing entry rather than the new entry, and use 'const' to
ensure we don't make that mistake again.

Change-Id: I31c127a5d21879b52c85cd0f7ed2e66554a21e39
2016-01-08 19:18:44 -08:00
Elliott Hughes
195b85a80f Merge "Defend against -fstack-protector in libc startup." 2016-01-08 18:54:01 +00:00
Dimitry Ivanov
6d142bcf34 Move __aeabi* symbols to LIBC_N version
We had these symbols incorrectly versioned as LIBC_PRIVATE
in M release. This change moves __aeabi* symbols from LIBC
to LIBC_N and adds __gnu_Unwind_Find_exidx to the list

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I0b353012adeacb00ae29ea10c63b9d1cf1cadbe7
2016-01-08 10:13:16 -08:00
Elliott Hughes
42d949ff9d Defend against -fstack-protector in libc startup.
Exactly which functions get a stack protector is up to the compiler, so
let's separate the code that sets up the environment stack protection
requires and explicitly build it with -fno-stack-protector.

Bug: http://b/26276517
Change-Id: I8719e23ead1f1e81715c32c1335da868f68369b5
2016-01-06 20:06:08 -08:00
Josh Gao
63a42070fc Kill BOARD_MALLOC_ALIGNMENT.
Bug: http://b/26403338
Change-Id: Iba4006277fdb7c7ca60542c517634ae86c847b4f
2016-01-06 14:30:26 -08:00
Josh Gao
e1f8c66d0b Merge "Replace MALLOC_IMPL with MALLOC_SVELTE." 2016-01-06 20:08:13 +00:00
Elliott Hughes
32388ba4dc Merge "Temporary hack to avoid stack protector crashes." 2016-01-06 19:52:43 +00:00
Tom Cherry
9353089262 Merge "Revert "system_properties.cpp: special case ro.* properties"" 2016-01-06 19:16:31 +00:00
Tom Cherry
e97ce31fe7 Revert "system_properties.cpp: special case ro.* properties"
This reverts commit c5fd81ab25.

Bug: 26416032

Change-Id: Id2d6761fdf55efa28c0b08b597daaa5cd381d758
2016-01-06 19:13:54 +00:00
Elliott Hughes
2489161ce5 Temporary hack to avoid stack protector crashes.
It'll take me a while to refactor things cleanly, but if we just want
something that boots for testing...

Bug: http://b/26276517
Change-Id: I24729d3dc546e36e0eff383f0d1d05c3aa1f2e0b
2016-01-06 11:12:06 -08:00
Elliott Hughes
1464f6d8d9 Merge "Remove mktime_tz." 2016-01-06 19:02:19 +00:00
Dimitry Ivanov
bc02fb964a Temporary move __udivdi3 back to LIBC for x86
Bug: http://b/26289334
Bug: http://b/26413821
Change-Id: Ifb0eb6f16aca54cb4a9184a6394992ee57dd3408
2016-01-06 18:36:40 +00:00
Elliott Hughes
76dfa6e351 Remove mktime_tz.
Bug: http://b/15765976
Change-Id: Ifc8cd19ae621e611d66173ae927ef9a0445965c1
2016-01-06 09:15:02 -08:00
Dimitry Ivanov
6f72fdede8 Fix gcc+arm builds
gcc requires unique names of symbols for .symver

Bug: http://b/26391427
Change-Id: I6392e34a45a37245fd4e53fb54243be73f443313
2016-01-05 20:41:06 -08:00
Dimitry Ivanov
52fd4ca0a0 Merge "Deprecate bzero" 2016-01-06 02:33:41 +00:00
Dimitry Ivanov
609156e266 Merge "Export public __aeabi* symbols as LIBC_PRIVATE" 2016-01-06 02:19:27 +00:00
Dimitry Ivanov
d90d067312 Export public __aeabi* symbols as LIBC_PRIVATE
But keep LIBC as default version for them

Bug: http://b/26391427
Bug: http://b/26410625
Change-Id: I819e354bbba482d1f983d9be15c23fcce10e5dd9
2016-01-05 18:18:33 -08:00
Elliott Hughes
031dfe198b Merge "Fix a broken link in a comment." 2016-01-06 01:27:09 +00:00
Elliott Hughes
7d27b68ef4 Merge "Tidy up KernelArgumentBlock::getauxval." 2016-01-06 01:24:37 +00:00
Dimitry Ivanov
6134ed8b8f Deprecate bzero
bzero is hashdefined to memset in strings.h and it
was removed from POSIX 2008.

Bug: http://b/26407170
Change-Id: Ia6d54f0e314dc7f5f3fbad0e9b00344f49f77d43
2016-01-05 17:06:45 -08:00
Elliott Hughes
40c2bf6cf6 Fix a broken link in a comment.
Bug: https://code.google.com/p/android/issues/detail?id=197784
Change-Id: I2f9e5bc2dd2b8a6992c7c55bc856e4a323c7c8a8
2016-01-05 16:33:33 -08:00
Nick Kralevich
c5fd81ab25 system_properties.cpp: special case ro.* properties
Currently, reads of ro.* properties are treated differently than
writes of ro.* properties. When writing an ro.* property, we ignore
the "ro." portion of the property, and base the security decision
on the label of the remaining portion.

See e7a9e52740/init/property_service.cpp
line 120-126

For example, for writing, the label associated with
"ro.build.fingerprint" comes from the /property_contexts file
entry:

  # ro.build.fingerprint is either set in /system/build.prop, or is
  # set at runtime by system_server.
  build.fingerprint       u:object_r:fingerprint_prop:s0

However, we fail to follow this same special case when sorting
properties into files. Instead, ro.build.fingerprint is assigned
u:object_r:default_prop:s0 instead of u:object_r:fingerprint_prop:s0

Ignore the "ro." portion when sorting properties into files.
This will make reads and writes of properties use the same label.

Bug: 21852512
Change-Id: Ie88ffc6b78b31fc8ddf370ae27c218546fb25a83
2016-01-05 16:30:17 -08:00
Elliott Hughes
63fbb233cb Tidy up KernelArgumentBlock::getauxval.
Correct the comment, and remove the unused functionality. getauxval(3) does
now set errno to let you know it failed to find anything, but since none of
this function's callers care anyway it seems safer to leave errno untouched
until we actually have a demonstrated need for it.

Bug: https://code.google.com/p/android/issues/detail?id=198111
Change-Id: I232a42dc5a02c8faab94c7d69bef610408276c23
2016-01-05 16:29:33 -08:00
Dan Willemsen
507d6f2a51 Merge "libc: Update Android.bp with recent changes" 2016-01-05 23:14:43 +00:00
Dan Willemsen
9b59acc9c7 libc: Update Android.bp with recent changes
Change-Id: I54047df9db95169452bbac6d52c75161d2f3bb64
2016-01-05 14:32:54 -08:00
Dimitry Ivanov
bb5730ecdb Move __aeabi_ which are not in libgcc.a to LIBC
The following arm symbols should be exported by libc.so:
    __aeabi_atexit; # arm
    __aeabi_memclr; # arm
    __aeabi_memclr4; # arm
    __aeabi_memclr8; # arm
    __aeabi_memcpy; # arm
    __aeabi_memcpy4; # arm
    __aeabi_memcpy8; # arm
    __aeabi_memmove; # arm
    __aeabi_memmove4; # arm
    __aeabi_memmove8; # arm
    __aeabi_memset; # arm
    __aeabi_memset4; # arm
    __aeabi_memset8; # arm

Bug: https://github.com/android-ndk/ndk/issues/1
Change-Id: I542d1ad023b8aece5dc05a28a9ca549cb51455b4
2016-01-05 13:59:20 -08:00
Josh Gao
09f4651c0e Replace MALLOC_IMPL with MALLOC_SVELTE.
Bug: http://b/26390299
Change-Id: I665f64bff4d598607e1eb7c4078819fe1d400feb
2016-01-05 11:45:45 -08:00
Dimitry Ivanov
0ef1d121b5 Temporary apply LIBC version to __pthread_gettid
This is workaround for http://b/26391427

Bug: http://b/26391427
Change-Id: Ibf5c611cf4c04dfa595644225e6d9503089a18da
2016-01-05 00:19:13 -08:00
Dimitry Ivanov
c8bb96a163 Revert "Temporary apply LIBC version to __pthread_gettid"
This reverts commit eb90e91cb5.

Change-Id: I63450087b6d3c23218b77d5eee37965f254a82d6
2016-01-05 08:03:56 +00:00
Dimitry Ivanov
eb90e91cb5 Temporary apply LIBC version to __pthread_gettid
This is workaround for http://b/26391427

Bug: http://b/26391427
Change-Id: I4ccc56e8b1bd2597f267df9706a33bb635abcfcb
2016-01-04 22:36:18 -08:00
Dimitry Ivanov
04673ee997 Merge changes I4fc241e6,Idca71396
* changes:
  Move __system_property* to LIBC_PRIVATE for lp64 libc
  Move ndk-cruft symbols to LIBC_PRIVATE
2016-01-04 22:52:21 +00:00
Dimitry Ivanov
ff14fb5a1f Move __system_property* to LIBC_PRIVATE for lp64 libc
Bug: http://b/26367254
Change-Id: I4fc241e69444a4b5641dfdf09576fe3ce5c1169e
2016-01-04 14:39:42 -08:00
Dimitry Ivanov
eac1d371f6 Move ndk-cruft symbols to LIBC_PRIVATE
Bug: http://b/26385283
Change-Id: Idca71396f9de4141eefc4e1851ba92ebff1ac792
2016-01-04 13:48:47 -08:00
Elliott Hughes
9cddb482b4 Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
This reverts commit 76814a8250.

This differs from the original in fixing the GCC -Werror build:

  bionic/libc/bionic/ifaddrs.cpp: In function 'void __handle_netlink_response(ifaddrs**, nlmsghdr*)':
  bionic/libc/bionic/ifaddrs.cpp:113:62: error: use of old-style cast [-Werror=old-style-cast]
       ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));

This appears to be a GCC bug; the GCC command-line correctly uses -isystem,
and manually adding #pragma GCC system_header doesn't help. So just turn the
warning off for GCC for now. We won't need to worry about building with GCC
soon anyway.

Bug: http://b/26238832
Change-Id: I01615bd335edf11baf487b1c83a9157cd780f4a1
2016-01-04 13:00:39 -08:00
Dimitry Ivanov
788a2bc756 Make some of unwanted symbols LIBC_PRIVATE
Bug: http://b/26274444
Change-Id: Ic66f6519a974b72779071235c1d0dd36655fd1b9
2015-12-21 23:26:53 -08:00
Dimitry Ivanov
5ce79b0af3 Make symbols exported via libgcc.a LIBC_PRIVATE
Bug: http://b/26298172
Change-Id: Ic16acea56624680d48c0b190fbe5a6142a3fca2b
2015-12-21 22:54:35 -08:00
Dimitry Ivanov
7331fe18d7 linker: implement shared namespaces
Shared namespaces clone the list of loaded native
libraries from the caller namespace. This allows
classloaders for bundled apps to share already loaded
libraries with default namespace.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I8949d45937fdb38e1f586ff0679003adac0d9dad
(cherry picked from commit e78deef364)
2015-12-19 23:38:27 -08:00