Commit Graph

7667 Commits

Author SHA1 Message Date
Elliott Hughes
5aa48ee3ce am d812b219: Merge "Remove unused #defines from "arith.h"."
* commit 'd812b2196a90ea0880c9e6f2eac0386c2917918d':
  Remove unused #defines from "arith.h".
2014-04-21 18:26:09 +00:00
Elliott Hughes
d812b2196a Merge "Remove unused #defines from "arith.h"." 2014-04-21 18:17:45 +00:00
Elliott Hughes
d3679c815e clang is >= 3.4 now; remove a hack.
Change-Id: I8d976ee0fd88eca9779c87b5d7e27f46b4b1b489
2014-04-21 10:15:14 -07:00
Elliott Hughes
2e003f4324 Remove unused #defines from "arith.h".
These were defined in upstream's per-arch files, so I carried them across,
but they aren't actually used anywhere.

Change-Id: Ica9796201dcd2caa5c34070c0dd226fc2050ba47
2014-04-21 09:59:00 -07:00
Elliott Hughes
a3d82df005 am 8abf44c4: Merge "Make libc signal handler output more like debuggerd."
* commit '8abf44c415bb3b02b6a3198196c92266442a0c32':
  Make libc signal handler output more like debuggerd.
2014-04-21 13:41:35 +00:00
Dmitriy Ivanov
0baa0f74d1 am 6d09ec3c: Merge "Fix for libgcc compat generation script."
* commit '6d09ec3c2fc7bdb18eeb1706ef7c7f52db6095cc':
  Fix for libgcc compat generation script.
2014-04-21 13:41:32 +00:00
Elliott Hughes
8abf44c415 Merge "Make libc signal handler output more like debuggerd." 2014-04-19 02:02:05 +00:00
Dmitriy Ivanov
6d09ec3c2f Merge "Fix for libgcc compat generation script." 2014-04-19 01:12:58 +00:00
Elliott Hughes
17e6a98b48 Make libc signal handler output more like debuggerd.
This has been annoying me for a while, because it's often quite misleading.

Today, for example, I saw:

  Fatal signal 13 (SIGPIPE) at 0x6573 (code=0), thread 25971 (top)

where the apparent address is actually the pid of the signal source (in this
case the kernel on behalf of the thread itself).

This patch isn't as fancy as strace, but it at least means we never say
anything misleading. We could decode the si_code field like strace and
debuggerd, but I'm reluctant to do that without some way to share the code
between at least bionic and debuggerd.

Examples after:

  Fatal signal 13 (SIGPIPE), code 0 in tid 9157 (top)
  Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 9142 (crasher64)
  Fatal signal 6 (SIGABRT), code -6 in tid 9132 (crasher64)

(Note that the code still shows as 0 for SIGPIPE in the signal handler itself
but as -6 (SI_TKILL) in debuggerd; this is actually correct --- debuggerd is
showing the re-raised signal sent at the end of the signal handler that
initially showed the correct code 0.)

Change-Id: I71cad4ab61f422a4f6687a60ac770371790278e0
2014-04-18 17:54:51 -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
57a61f859d am a9585aed: Merge "Temporarily disable text relocation warnings for x86 libraries"
* commit 'a9585aedbc89242b1fe8c2f9eec1212d9b206e88':
  Temporarily disable text relocation warnings for x86 libraries
2014-04-18 23:10:06 +00:00
Elliott Hughes
a9585aedbc Merge "Temporarily disable text relocation warnings for x86 libraries" 2014-04-18 23:02:27 +00:00
Du Chenyang
865119efd4 Temporarily disable text relocation warnings for x86 libraries
Too many such warnings will cause CTS failed. This issue still exists
in some x86 version libraries: libdvm.so/libart.so.

$scanelf -qT out/target/product/generic_x86/system/lib/libdvm.so
  libdvm.so: (memory/data?) [0x2BAC7] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
  libdvm.so: (memory/data?) [0x2BB98] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
  libdvm.so: (memory/data?) [0x2EB28] in (optimized out: previous dvmAsmInstructionStartCode) [0x2B2F8]
  libdvm.so: (memory/data?) [0x2EF87] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
  libdvm.so: (memory/data?) [0x2EFAF] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
  libdvm.so: (memory/data?) [0x2EFD7] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
  libdvm.so: (memory/data?) [0x2EFFF] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]
  libdvm.so: (memory/data?) [0x2F027] in (optimized out: previous dvmAsmInstructionEndCode) [0x2EF63]

Bug: https://code.google.com/p/android/issues/detail?id=68431
Change-Id: I11ecac282f1163e49a82156fce2a76cc2d619960
2014-04-18 16:00:55 -07:00
Elliott Hughes
ccad97362a am 9b22c21c: Merge "Make uselocale(3) claim its pthread key in an ELF constructor."
* commit '9b22c21ceec0a65875081525218315d08bbd36b5':
  Make uselocale(3) claim its pthread key in an ELF constructor.
2014-04-18 22:32:33 +00:00
Elliott Hughes
9b22c21cee Merge "Make uselocale(3) claim its pthread key in an ELF constructor." 2014-04-18 22:27:20 +00:00
Elliott Hughes
45d15f7dbe am 1acd9716: Merge "Switch to upstream OpenBSD fread/fvwrite."
* commit '1acd9716c252f487ec596e42594c0082245b6e34':
  Switch to upstream OpenBSD fread/fvwrite.
2014-04-18 22:19:40 +00:00
Elliott Hughes
1acd9716c2 Merge "Switch to upstream OpenBSD fread/fvwrite." 2014-04-18 22:15:02 +00:00
Dan Albert
302f8a92e4 am fe0c6ae5: Merge "Brings LC_* defs into line with POSIX"
* commit 'fe0c6ae5618af11e53ee5a41a5bf91353cd2a1ff':
  Brings LC_* defs into line with POSIX
2014-04-18 21:56:01 +00:00
Elliott Hughes
30659d4ff0 am cd79c8b1: Merge "Fix a wchar.wcstombs_wcrtombs test failure."
* commit 'cd79c8b1584237313ca6d14fbb0fb57be52a5394':
  Fix a wchar.wcstombs_wcrtombs test failure.
2014-04-18 21:52:35 +00:00
Dan Albert
fe0c6ae561 Merge "Brings LC_* defs into line with POSIX" 2014-04-18 21:49:24 +00:00
Dan Albert
db68e56997 Brings LC_* defs into line with POSIX
POSIX requires that LC_* constants be defined as macros, and libc++ is testing
for this. Source: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html

Change-Id: Id0653e54d74f12179ef88cadf7b5d6ba1bae3cdb
2014-04-18 21:48:57 +00:00
Elliott Hughes
cd79c8b158 Merge "Fix a wchar.wcstombs_wcrtombs test failure." 2014-04-18 21:44:26 +00:00
Elliott Hughes
06b5431eaa am b88da065: Merge "Upgrade to current vfprintf."
* commit 'b88da06580a22d9a1ee5a1c573c49e89207bc71b':
  Upgrade to current vfprintf.
2014-04-18 21:15:28 +00:00
Elliott Hughes
2f68866f37 Make uselocale(3) claim its pthread key in an ELF constructor.
pthread_once is nice for decoupling, but it makes resource availability less
predictable, which is a bad thing.

This fixes a test failure if uselocale(3) is called before
pthread.pthread_key_create_lots runs.

Change-Id: Ie2634f986a50e7965582d4bd6e5aaf48cf0d55c8
2014-04-18 13:34:26 -07:00
Elliott Hughes
1b836ee6f8 Fix a wchar.wcstombs_wcrtombs test failure.
Looks like I screwed up a last-minute refactor and didn't re-run the tests.

Change-Id: I90a710ae66a313a9812859650aa0b4e8c6bc57f9
2014-04-18 13:32:33 -07:00
Elliott Hughes
9d3c2dd11f Switch to upstream OpenBSD fread/fvwrite.
Change-Id: I3dc11083693bc8d99edc0cbcc6f70dc9e5dc6565
2014-04-18 13:13:04 -07:00
Elliott Hughes
a984c3ad3b am 9e94ea5c: Merge "Upgrade our <ctype.h> implementation to OpenBSD head."
* commit '9e94ea5c112a26af5cfc778983e4d5ca692947c0':
  Upgrade our <ctype.h> implementation to OpenBSD head.
2014-04-18 19:02:52 +00:00
Elliott Hughes
b88da06580 Merge "Upgrade to current vfprintf." 2014-04-18 18:19:23 +00:00
Elliott Hughes
9e94ea5c11 Merge "Upgrade our <ctype.h> implementation to OpenBSD head." 2014-04-18 17:56:38 +00:00
Elliott Hughes
f3c73901cb Upgrade our <ctype.h> implementation to OpenBSD head.
Adding the perfunctory <ctype.h> tests showed that we'd accidentally
dropped several symbols. This puts everything back in its proper place
and switches us to upstream head at the same time.

Change-Id: Ib527ad280c9baded81e667fa598698526d93e66f
2014-04-18 10:29:16 -07:00
Dan Albert
6c84b9d651 am 0e351e40: Merge "Changes our ctype identifiers to match the BSDs"
* commit '0e351e4011bc98cacc3e37292bfb0e86c3a3bb5b':
  Changes our ctype identifiers to match the BSDs
2014-04-18 16:01:54 +00:00
Dan Albert
0e351e4011 Merge "Changes our ctype identifiers to match the BSDs" 2014-04-18 15:52:59 +00:00
Dan Albert
779585fb26 Changes our ctype identifiers to match the BSDs
This is to make it possible to adopt the BSDs' implementations for a few locale
APIs in libc++ rather than writing our own, nearly identical, code.

Change-Id: I482acd4ece83aa4ec9eb0c7acf48f3686794bcc3
2014-04-18 08:48:34 -07:00
Elliott Hughes
0549371bd7 Upgrade to current vfprintf.
This gets us various bug fixes and missing C99 functionality.

Bug: https://code.google.com/p/android/issues/detail?id=64886
Change-Id: Ie9f8ac569e9b5eec1e4a1faacfe2c21662eaf895
2014-04-17 17:30:03 -07:00
Elliott Hughes
48db303771 am 857b1796: Merge "Regenerate the NOTICE files."
* commit '857b1796738460f5f3cf16bb3c1e156e88171143':
  Regenerate the NOTICE files.
2014-04-17 23:21:58 +00:00
Elliott Hughes
c54c2a84cc am 8da69a25: Merge "Switch fpclassify over to ieee_ext."
* commit '8da69a25b7840db23846d4bb303ef84a1775c1e1':
  Switch fpclassify over to ieee_ext.
2014-04-17 23:21:58 +00:00
Elliott Hughes
7fb450b8a4 am c480f57d: Merge "Clean up <machine/ieee.h>."
* commit 'c480f57dd3b70c1e8aea013bc540b3a8e1cc40f6':
  Clean up <machine/ieee.h>.
2014-04-17 23:21:57 +00:00
Elliott Hughes
31028f852d am 9ceae0c9: Merge "Use FLT_ROUNDS in LP64 strtold."
* commit '9ceae0c9a62c8ffce1e3d9d79f494e692951cbc5':
  Use FLT_ROUNDS in LP64 strtold.
2014-04-17 23:21:57 +00:00
Elliott Hughes
bfd8927447 am 4abaa576: Merge "Switch to gdtoa."
* commit '4abaa576e86e4ceaa9a18271f306787294a1cdfc':
  Switch to gdtoa.
2014-04-17 23:21:56 +00:00
Torne (Richard Coles)
183ad9df53 Allow sharing the RELRO section via a file.
Add flags and a file descriptor to android_dlopen_ext() to allow writing
the RELRO section of the loaded library to a file after relocation
processing, and to allow mapping identical pages from the file over the
top of relocated memory in another process. Explicitly comparing the
pages is required in case a page contains a reference to a symbol
defined in another library loaded at a random base address.

Bug: 13005501
Change-Id: Ibb5b2d384edfaa5acf3e97a5f8b6115c10497a1e
2014-04-17 14:30:46 +01:00
Torne (Richard Coles)
12bbb91645 Support loading libraries to a reserved address.
Add flags and parameters to android_dlopen_ext() to allow loading a
library at an already-reserved fixed address. If the library to be
loaded will not fit within the space reserved, then the linker will
either fail, or allocate its own address space as usual, according to
which flag has been specified. This behaviour only applies to the
specific library requested; any other libraries loaded as dependencies
will be loaded in the normal fashion.

There is a new gtest included to cover the functionality added.

Bug: 13005501
Change-Id: I5d1810375b20fc51ba6a9b3191a25f9792c687f1
2014-04-17 14:22:17 +01:00
Torne (Richard Coles)
012cb4583a Add android_dlopen_ext() interface to linker.
Add a function "android_dlopen_ext()", defined in <android/dlext.h>.
This is an extended version of dlopen() which takes a struct for passing
additional parameters for Android-specific functionality. This will be
used to support RELRO section sharing between separate processes.

Bug: 13005501
Change-Id: I9c99b2f2a02ee329dedaeba09ef3a1113b17b2d6
2014-04-17 13:50:55 +01:00
Elliott Hughes
857b179673 Merge "Regenerate the NOTICE files." 2014-04-17 00:16:51 +00:00
Elliott Hughes
acbe322e82 Regenerate the NOTICE files.
Change-Id: Iac666f69b930e31bbeac3438812d544c6af55b0f
2014-04-16 17:01:12 -07:00
Elliott Hughes
8da69a25b7 Merge "Switch fpclassify over to ieee_ext." 2014-04-16 23:57:06 +00:00
Elliott Hughes
c480f57dd3 Merge "Clean up <machine/ieee.h>." 2014-04-16 23:56:40 +00:00
Elliott Hughes
f081e139fe Switch fpclassify over to ieee_ext.
Change-Id: I441bb7f715da24e1c04b0386ad9dcde0ea8c797c
2014-04-16 16:45:59 -07:00
Elliott Hughes
cb65cc3fb4 Clean up <machine/ieee.h>.
The upstream intention was for this to be architecture-dependent, but it's a
lot clearer if we just have one copy.

Change-Id: I4e8310496145f9f411cd2e847c8cd023b1d758e9
2014-04-16 16:31:17 -07:00
Elliott Hughes
9ceae0c9a6 Merge "Use FLT_ROUNDS in LP64 strtold." 2014-04-16 23:26:31 +00:00
Elliott Hughes
20828db758 Use FLT_ROUNDS in LP64 strtold.
Change-Id: I75323be6e1cadb00770fcdd08422836b03737416
2014-04-16 16:09:41 -07:00