Commit Graph

3331 Commits

Author SHA1 Message Date
Elliott Hughes
f510fc789a am b46530bd: Merge "Start cleaning up libm."
* commit 'b46530bd3e5984047bd780f5d3a6a5ebabd9f02d':
  Start cleaning up libm.
2012-10-31 13:51:50 -07:00
Elliott Hughes
b46530bd3e Merge "Start cleaning up libm." 2012-10-31 13:43:41 -07:00
Elliott Hughes
0f7809d5c3 Start cleaning up libm.
We have two copies of fenv.h for every architecture, one of which
isn't used. We also have unused makefiles and files for architectures
we don't support.

This patch removes all the obviously useless files.

Bug: http://code.google.com/p/android/issues/detail?id=38196
Change-Id: I1919b6621ba513aa24aa947a34815bc51191487c
2012-10-31 13:32:34 -07:00
The Android Open Source Project
089111a80a Reconcile with jb-mr1-release - do not merge
Change-Id: Ice07f7813d823b0419153d5ac321ad784a690af4
2012-10-31 09:15:16 -07:00
The Android Automerger
f29c214d6a merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-30 20:11:57 -07:00
Elliott Hughes
3cd7a1653a am 084be591: Merge "linker: handle R_ARM_COPY relocations in a proper way"
* commit '084be591923d3d509cea0a0f4b11b073e362d730':
  linker: handle R_ARM_COPY relocations in a proper way
2012-10-30 17:18:04 -07:00
Elliott Hughes
084be59192 Merge "linker: handle R_ARM_COPY relocations in a proper way" 2012-10-30 17:10:30 -07:00
Ard Biesheuvel
5ae44f302b linker: handle R_ARM_COPY relocations in a proper way
If an executable contain copy relocations, other references
to the symbol it points to should be preempted and made to
point to the copy instead.

Also, the linker should make sure the target area has
sufficient space to contain the copy. It also checks
whether the library that supplies the symbol is built
with -Bsymbolic, and errors out if this is the case.

Change-Id: If135c83590092741cfd8f82f54816f363a4a4a3b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
2012-10-30 17:09:21 -07:00
Elliott Hughes
914112ea21 am 155e8d1d: Merge "More dynamic linker cleanup."
* commit '155e8d1df5b8fdfeabda3e7b61d95beb5b8d1467':
  More dynamic linker cleanup.
2012-10-30 16:56:29 -07:00
Elliott Hughes
155e8d1df5 Merge "More dynamic linker cleanup." 2012-10-30 16:41:01 -07:00
Elliott Hughes
18a206c81d More dynamic linker cleanup.
I still want to break linker_format out into its own library so we can reuse
it for malloc debugging and so forth. (There are many similar pieces of code
in bionic, but the linker's one seems to be the most complete/functional.)

Change-Id: If3721853d28937c8e821ca1d23cf200e228a409a
2012-10-30 16:35:38 -07:00
Elliott Hughes
b0ac82e9ba Merge commit 'bd8ee3d3' into mm 2012-10-30 15:20:13 -07:00
Elliott Hughes
bd8ee3d35e am a811d7a8: Upgrade to tzdata2012h.
* commit 'a811d7a8e638ca49aee704c613cb9f1e03c3698d':
  Upgrade to tzdata2012h.
2012-10-30 14:30:12 -07:00
Elliott Hughes
4569ab9773 am 06b59610: Merge "Fix bug in pthread_join, pthread_exit, pthread_detach"
* commit '06b596104a9ed3ac089abd00186a5698d7e8544f':
  Fix bug in pthread_join, pthread_exit, pthread_detach
2012-10-30 13:04:23 -07:00
Elliott Hughes
06b596104a Merge "Fix bug in pthread_join, pthread_exit, pthread_detach" 2012-10-30 12:57:58 -07:00
Elliott Hughes
743a273e40 am 1f21ece4: Merge "Clean up the <libgen.h> implementation a little, bring in tests."
* commit '1f21ece48a87abbbdd9fb939b79a1dd81fb867eb':
  Clean up the <libgen.h> implementation a little, bring in tests.
2012-10-29 17:15:12 -07:00
Elliott Hughes
5f787190a9 am 4d36b0bd: Merge "Fix the pthread_join on self error case."
* commit '4d36b0bd38559ae0376b61a0ac2f5fa8329ec56d':
  Fix the pthread_join on self error case.
2012-10-29 17:15:09 -07:00
Elliott Hughes
0b8fa1d456 am 9297af94: Merge "Fix a potential NULL pointer dereference in _init_thread()."
* commit '9297af943887d9d6974aaec8c45a4e7d93422965':
  Fix a potential NULL pointer dereference in _init_thread().
2012-10-29 17:15:03 -07:00
Elliott Hughes
40e467ec66 am 33c4a3ad: Merge "libc: Fix alphasort() signature (and implementation)."
* commit '33c4a3adde3cf1753af0661f48ce86358e105277':
  libc: Fix alphasort() signature (and implementation).
2012-10-29 17:15:02 -07:00
Elliott Hughes
8576560979 am 8f9a1eb1: Merge "Upgrade to tzdata2012h."
* commit '8f9a1eb108f22fc2ce7283ef184d909ec0ca1152':
  Upgrade to tzdata2012h.
2012-10-29 17:15:01 -07:00
Elliott Hughes
a67cedb52c am 9e783963: Merge "Clean up the implementation of the <dirent.h> functions."
* commit '9e783963d58acf48e06902236ea64c7f5b337a0f':
  Clean up the implementation of the <dirent.h> functions.
2012-10-29 17:14:59 -07:00
Elliott Hughes
1f21ece48a Merge "Clean up the <libgen.h> implementation a little, bring in tests." 2012-10-29 15:03:36 -07:00
Elliott Hughes
58b575485c Clean up the <libgen.h> implementation a little, bring in tests.
Most of these tests were in system/extras, but I've added more to cover other
cases explicitly mentioned by POSIX.

Change-Id: I5e8d77e4179028d77306935cceadbb505515dcde
2012-10-29 14:27:10 -07:00
Sergey Melnikov
10ce96944e Fix bug in pthread_join, pthread_exit, pthread_detach
pthread_no_op_detach_after_join test from bionic-unit-tests hangs
on x86 emulator. There is a race in the pthread_join, pthread_exit,
pthread_detach functions:
- pthread_join waits for the non-detached thread
- pthread_detach sets the detached flag on that thread
- the thread executes pthread_exit which just kills the now-detached
thread, without sending the join notification.

This patch improves the test so it fails on ARM too, and modifies
pthread_detach to behave more like glibc, not setting the detach state if
called on a thread that's already being joined (but not returning an error).

Change-Id: I87dc688221ce979ef5178753dd63d01ac0b108e6
Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com>
2012-10-29 11:31:26 -07:00
Elliott Hughes
4d36b0bd38 Merge "Fix the pthread_join on self error case." 2012-10-29 10:30:16 -07:00
Elliott Hughes
14f19592ae Fix the pthread_join on self error case.
We should return EDEADLK, not deadlock the calling thread.

Change-Id: I1243483f709c11b2a60e41142725c54c7dbfcbc9
2012-10-29 10:19:44 -07:00
Elliott Hughes
9297af9438 Merge "Fix a potential NULL pointer dereference in _init_thread()." 2012-10-29 08:26:01 -07:00
Xi Wang
ae8eb74675 Fix a potential NULL pointer dereference in _init_thread().
The first NULL pointer check against `attr' suggests that `attr' can
be NULL.  Then later `attr' is directly dereferenced, suggesting the
opposite.

    if (attr == NULL) {
        ...
    } else {
        ...
    }
    ...
    if (attr->stack_base == ...) { ... }

The public API pthread_create(3) allows NULL, and interprets it as "default".
Our implementation actually swaps in a pointer to the global default
pthread_attr_t, so we don't need any NULL checks in _init_thread. (The other
internal caller passes its own pthread_attr_t.)

Change-Id: I0a4e79b83f5989249556a07eed1f2887e96c915e
Signed-off-by: Xi Wang <xi.wang@gmail.com>
2012-10-29 08:22:13 -07:00
Elliott Hughes
33c4a3adde Merge "libc: Fix alphasort() signature (and implementation)." 2012-10-29 07:45:13 -07:00
David 'Digit' Turner
c30396f5f2 libc: Fix alphasort() signature (and implementation).
The declaration for alphasort() in <dirent.h> used the deprecated:

  int alphasort(const void*, const void*);

while both Posix and GLibc use instead:

  int alphasort(const struct dirent** a, const struct dirent** b);

See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/alphasort.html

This patch does the following:

- Update the declaration to match Posix/GLibc
- Get rid of the upstream BSD code which isn't compatible with the new
  signature.
- Implement a new trivial alphasort() with the right signature, and
  ensure that it uses strcoll() instead of strcmp().
- Remove Bionic-specific #ifdef .. #else .. #endif block in
  dirent_test.cpp which uses alphasort().

Even through strcoll() currently uses strcmp(), this does the right
thing in the case where we decide to update strcoll() to properly
implement locale-specific ordered comparison.

Change-Id: I4fd45604d8a940aaf2eb0ecd7d73e2f11c9bca96
2012-10-29 07:44:27 -07:00
Elliott Hughes
8f9a1eb108 Merge "Upgrade to tzdata2012h." 2012-10-29 07:29:13 -07:00
Elliott Hughes
f93fc10fc4 Upgrade to tzdata2012h.
The 2012h release reflects the following changes recently circulated
on the tz mailing list:

[Brazil]  Bahia no longer has DST.  (Thanks to Kelley Cook.)

[Brazil]  Tocantins has DST.  (Thanks to Rodrigo Severo.)

[Israel]  Israel has new DST rules next year.  (Thanks to Ephraim Silverberg.)

[Jordan]  Jordan stays on DST this winter.  (Thanks to Steffen Thorsen.)

Bug: 7429010
Change-Id: I0ec5fb72343e42f3f79490dfdea5f7f1946ae76f
2012-10-28 11:34:35 -07:00
Elliott Hughes
a811d7a8e6 Upgrade to tzdata2012h.
The 2012h release reflects the following changes recently circulated
on the tz mailing list:

[Brazil]  Bahia no longer has DST.  (Thanks to Kelley Cook.)

[Brazil]  Tocantins has DST.  (Thanks to Rodrigo Severo.)

[Israel]  Israel has new DST rules next year.  (Thanks to Ephraim Silverberg.)

[Jordan]  Jordan stays on DST this winter.  (Thanks to Steffen Thorsen.)

Bug: 7429010
Change-Id: I82f19ce49f944f928b6dd8dc5a893786266e5cb9
2012-10-28 11:33:56 -07:00
Elliott Hughes
9e783963d5 Merge "Clean up the implementation of the <dirent.h> functions." 2012-10-26 16:42:48 -07:00
Elliott Hughes
063cfb2084 Clean up the implementation of the <dirent.h> functions.
Change-Id: I3c647cc9588525afc41fee90ee468d58cd13503a
2012-10-26 16:42:06 -07:00
Elliott Hughes
8cacc639b6 am 7193731a: Merge "Workaround g++ 4.7 compfail"
* commit '7193731ae6b8083bc7a5e5e468fb98b1dbcf3f3d':
  Workaround g++ 4.7 compfail
2012-10-25 15:20:29 -07:00
Elliott Hughes
85819efe8f am f2b3ac95: Merge "Fix recovery: don\'t assert if there\'s no tzdata."
* commit 'f2b3ac9502e08ef53d4eedd7e93ea9a00d185055':
  Fix recovery: don't assert if there's no tzdata.
2012-10-25 15:09:29 -07:00
Elliott Hughes
7193731ae6 Merge "Workaround g++ 4.7 compfail" 2012-10-25 15:00:45 -07:00
Elliott Hughes
f2b3ac9502 Merge "Fix recovery: don't assert if there's no tzdata." 2012-10-25 14:56:53 -07:00
Elliott Hughes
49271d89da Fix recovery: don't assert if there's no tzdata.
Change-Id: I4d808b57c63ec1ccc024da7fd6a65691e0d455c5
2012-10-25 14:56:08 -07:00
Elliott Hughes
df7f24f310 am 7b68e3f7: Merge "Per-thread -fstack-protector guards for x86."
* commit '7b68e3f799d87e84c56687033326924fd8fec84c':
  Per-thread -fstack-protector guards for x86.
2012-10-25 12:22:34 -07:00
Elliott Hughes
7b68e3f799 Merge "Per-thread -fstack-protector guards for x86." 2012-10-25 12:08:50 -07:00
Elliott Hughes
ad88a08631 Per-thread -fstack-protector guards for x86.
Based on a pair of patches from Intel:

  https://android-review.googlesource.com/#/c/43909/
  https://android-review.googlesource.com/#/c/44903/

For x86, this patch supports _both_ the global that ARM/MIPS use
and the per-thread TLS entry (%gs:20) that GCC uses by default. This
lets us support binaries built with any x86 toolchain (right now,
the NDK is emitting x86 code that uses the global).

I've also extended the original tests to cover ARM/MIPS too, and
be a little more thorough for x86.

Change-Id: I02f279a80c6b626aecad449771dec91df235ad01
2012-10-25 12:04:03 -07:00
Pavel Chupin
20aa6c0f4c Workaround g++ 4.7 compfail
error: C99 designator 'name' outside aggregate initializer

G++ 4.7+ can't handle some of C99 designated initializers.
Most likely it's just not implemented yet. Other possible workarounds is
to compile this as C not C++ or define name as char* instead of char[SIZE].

Appeared after this change https://android-review.googlesource.com/#/c/44470

Change-Id: Ib28157848ce759b8bb5dbb2ac0d9a768fa4e5107
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-10-25 17:58:45 +04:00
Elliott Hughes
60c7ac2622 am d0f2b7e7: Merge "More upstream NetBSD upgrades."
* commit 'd0f2b7e7e65f19f978c59abcbb522c08e76b1508':
  More upstream NetBSD upgrades.
2012-10-23 17:15:07 -07:00
Elliott Hughes
d0f2b7e7e6 Merge "More upstream NetBSD upgrades." 2012-10-23 16:55:19 -07:00
Elliott Hughes
ab44f52202 More upstream NetBSD upgrades.
Change-Id: Idb781d37de3b05585271d7d258ecffd5ba87d0b8
2012-10-23 16:05:09 -07:00
Elliott Hughes
45f075556b am e3dbe1e3: Merge "Upgrade more functions to the current upstream NetBSD copy."
* commit 'e3dbe1e3820d6ab0370566055e9cdc593c5cce48':
  Upgrade more functions to the current upstream NetBSD copy.
2012-10-23 13:55:59 -07:00
Elliott Hughes
e3dbe1e382 Merge "Upgrade more functions to the current upstream NetBSD copy." 2012-10-23 13:45:37 -07:00
Elliott Hughes
e8bcca3a2c Upgrade more functions to the current upstream NetBSD copy.
Change-Id: Ie0b3f8b3fccef28609eb210434413ebd51d6ef45
2012-10-23 12:29:53 -07:00