Commit Graph

7834 Commits

Author SHA1 Message Date
David 'Digit' Turner
d5b3513cca am b56b5659: Fix the C library runtime initialization order.
Merge commit 'b56b5659b3996e98c2060f168d1cff1474e77d2a'

* commit 'b56b5659b3996e98c2060f168d1cff1474e77d2a':
  Fix the C library runtime initialization order.
2009-07-20 00:13:21 -07:00
David 'Digit' Turner
d63185fd88 am ef0bd185: Pass the elfdata pointer in a slot of the temporary TLS area.
Merge commit 'ef0bd1857041ffde069cf52138aaf22c1af7130e'

* commit 'ef0bd1857041ffde069cf52138aaf22c1af7130e':
  Pass the elfdata pointer in a slot of the temporary TLS area.
2009-07-20 00:12:01 -07:00
David 'Digit' Turner
b56b5659b3 Fix the C library runtime initialization order.
This allows libc.so to run the C runtime initializer as soon as the
dynamic linker loads the shared library, i.e. before any other initializers
(e.g. static C++ constructors in other shared libraries the executable depends
on).

This also removes the bug where the initializers from the executable itself
were run twice: once by the dynamic linker, and another time by __libc_init
as defined by libc_init_dynamic.c
2009-07-18 01:11:10 +02:00
Android (Google) Code Review
a22c04502a Merge change 7652
* changes:
  Updating v4l2 headers from kernel
2009-07-17 15:34:38 -07:00
David 'Digit' Turner
ef0bd18570 Pass the elfdata pointer in a slot of the temporary TLS area.
This is needed to properly initialize the C runtime when libc.so
is loaded by the dynamic linker.

Move the temporary TLS setup before the first system call, just
in case something really horrible happens, we won't crash when
trying to write an error code in 'errno'

Remove the broken TLS_SLOT_THREAD_ID setup. First, this slot
should normally receive the address of a pthread_internal_t,
not a kernel thread identifier. Second, it is never used by
the linker anyway.

Also remove an obsolete comment.
2009-07-17 17:55:01 +02:00
Rebecca Schultz Zavin
09131482e7 Updating v4l2 headers from kernel
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-07-16 18:33:52 -07:00
Android (Google) Code Review
08a85b69b4 Merge change 7610
* changes:
  linux: add headers for lis331dlh and sfh7743 sensor drivers.
2009-07-16 16:20:28 -07:00
Dmitry Shmidt
4553a785e2 Add linux/ethtool.h header file
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2009-07-16 16:03:29 -07:00
Mike Lockwood
bf8947da81 linux: add headers for lis331dlh and sfh7743 sensor drivers.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-16 18:53:41 -04:00
Mathias Agopian
b7681167cb allow pthread_mutexattr_setpshared to accept SHARED mutexes, since our current impl actually uses shared mutexes 2009-07-13 22:00:33 -07:00
Mathias Agopian
a2f5e21244 added pthread_cond_timedwait_relative_np() 2009-07-13 18:37:40 -07:00
David 'Digit' Turner
733f7deeb7 am 34806558: Add new C++ headers <cerrno> and <cfloat>
Merge commit '348065586a2e6154d6cff36afa6e00af6bbc5918'

* commit '348065586a2e6154d6cff36afa6e00af6bbc5918':
  Add new C++ headers <cerrno> and <cfloat>
2009-07-12 21:56:33 -07:00
David 'Digit' Turner
348065586a Add new C++ headers <cerrno> and <cfloat>
Also add std::malloc/realloc/calloc/free to <cstdlib>
Rename <cwchar_is_not_supported> to <cwchar>
2009-07-10 18:40:55 +02:00
David 'Digit' Turner
fc8b178759 am db4616b2: Add <linux/uinput.h> to C library kernel headers
Merge commit 'db4616b2d3234a1916cafb48e65c50cf302afcde'

* commit 'db4616b2d3234a1916cafb48e65c50cf302afcde':
  Add <linux/uinput.h> to C library kernel headers
2009-07-09 16:11:43 -07:00
David 'Digit' Turner
db4616b2d3 Add <linux/uinput.h> to C library kernel headers 2009-07-10 00:59:56 +02:00
David 'Digit' Turner
267e23ae99 am c4eee376: Prevent a crash in the memory leak checker (which happened in chk_free())
Merge commit 'c4eee3765bf9dd81ff055e70ff7daa83a3926d2a'

* commit 'c4eee3765bf9dd81ff055e70ff7daa83a3926d2a':
  Prevent a crash in the memory leak checker (which happened in chk_free())
2009-07-09 15:51:54 -07:00
David 'Digit' Turner
c4eee3765b Prevent a crash in the memory leak checker (which happened in chk_free())
Simplify the code a little, removing un-necessary mutex locks/unlocks.
Provide slightly better diagnostic message in case of corruption.
Use snprintf/strlcat instead of sprintf/strcat
2009-07-10 00:32:08 +02:00
Iliyan Malchev
4a1fe7167b bionic: add cleaned-up proximity-sensor header
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-07-08 20:33:12 -07:00
Shin-ichiro KAWASAKI
37429fff41 modified kernel headers re-generate tools to support SuperH architecture 2009-07-01 15:41:52 +09:00
Tony Sim
336efb5267 added syscalls for SuperH which automatically generate by gensyscalls.py 2009-07-01 15:35:27 +09:00
Android (Google) Code Review
838ac974f4 am 6ee8f1b0: Merge change 2990 into donut
Merge commit '6ee8f1b0444c0db94931d2cd64427ded8fba38b0'

* commit '6ee8f1b0444c0db94931d2cd64427ded8fba38b0':
  Add LD_LIBRARY_PATH support to bionic's linker
2009-06-25 15:17:28 -07:00
Android (Google) Code Review
6ee8f1b044 Merge change 2990 into donut
* changes:
  Add LD_LIBRARY_PATH support to bionic's linker
2009-06-25 15:15:14 -07:00
Android (Google) Code Review
bf013b1951 am 380f2498: Merge change 5184 into donut
Merge commit '380f24983e8e33d0b189dda198ec64c1766a359d'

* commit '380f24983e8e33d0b189dda198ec64c1766a359d':
  update clean msm_camera.h
2009-06-24 15:45:01 -07:00
Android (Google) Code Review
380f24983e Merge change 5184 into donut
* changes:
  update clean msm_camera.h
2009-06-24 12:45:35 -07:00
Iliyan Malchev
0711600b05 update clean msm_camera.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-06-23 20:08:10 -07:00
Iliyan Malchev
3772217641 delete akm8973.h from original headers
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-06-23 13:52:08 -07:00
Iliyan Malchev
5c3b16c576 add header for akm8973
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-06-22 15:07:34 -07:00
David 'Digit' Turner
fc90c51f72 am 09baf4e8: Add Glibc-compatible macro aliases for the nanosecond time accessors in stat structure
Merge commit '09baf4e881c78e67c7849aa81432ceb34e72e913'

* commit '09baf4e881c78e67c7849aa81432ceb34e72e913':
  Add Glibc-compatible macro aliases for the nanosecond time accessors in stat structure
2009-06-22 09:56:46 -07:00
Android (Google) Code Review
25e3c33488 Merge change 4509
* changes:
  Removed non-standard declaration in cstring.
2009-06-22 09:25:27 -07:00
David 'Digit' Turner
09baf4e881 Add Glibc-compatible macro aliases for the nanosecond time accessors in stat structure 2009-06-22 12:16:06 +02:00
Android (Google) Code Review
4b91ef8348 Merge change 4025
* changes:
  Make IPv6 definitions comply with RFC 3493:  - Add some definitions to netinet/in6.h  - Include netinet/in6.h from netinet/in.h
2009-06-17 15:36:55 -07:00
Nicolas Catania
ec6c274da2 Removed non-standard declaration in cstring.
Aligned the list of the function declared in std:: to
match gcc.
In the first cut, too many functions were included.
The test under system/extras/tests/bionic/libstdc++ already
has the correct (shorter) list.
2009-06-17 14:54:02 -07:00
Lorenzo Colitti
c52c174e41 Make IPv6 definitions comply with RFC 3493:
- Add some definitions to netinet/in6.h
 - Include netinet/in6.h from netinet/in.h
2009-06-16 18:55:37 -07:00
David 'Digit' Turner
5b67764a5a am 9cfccefa: Update cleaned-up kernel headers
Merge commit '9cfccefa055554c7e951741c01373a52a82d3fd6'

* commit '9cfccefa055554c7e951741c01373a52a82d3fd6':
  Update cleaned-up kernel headers
2009-06-16 08:37:54 -07:00
David 'Digit' Turner
9cfccefa05 Update cleaned-up kernel headers 2009-06-16 15:56:06 +02:00
David Bartley
bc3a5c26f1 Add LD_LIBRARY_PATH support to bionic's linker 2009-06-15 21:36:03 -07:00
David 'Digit' Turner
2f4ce43033 am 3ddc15e1: Add new clean header for PPP on PPTP (VPN)
Merge commit '3ddc15e10a6f5690e53e729c0da2c42f0eb944d1'

* commit '3ddc15e10a6f5690e53e729c0da2c42f0eb944d1':
  Add new clean header for PPP on PPTP (VPN)
2009-06-14 20:49:29 -07:00
David 'Digit' Turner
3ddc15e10a Add new clean header for PPP on PPTP (VPN) 2009-06-12 14:21:49 +02:00
Iliyan Malchev
040ae31701 am bf8709f5: bionic: update msm_camera.h header
Merge commit 'bf8709f54b1eabbd4e9bb81e91b9385a9863f505'

* commit 'bf8709f54b1eabbd4e9bb81e91b9385a9863f505':
  bionic: update msm_camera.h header
2009-06-04 22:43:23 -07:00
Iliyan Malchev
bf8709f54b bionic: update msm_camera.h header
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-06-04 11:55:53 -07:00
David 'Digit' Turner
f24799580f am 3a654b1e: Revert "Fix the C library initialization to avoid calling static C++ constructors twice."
Merge commit '3a654b1e04d4275ae315cfe1b196998acf10052c'

* commit '3a654b1e04d4275ae315cfe1b196998acf10052c':
  Revert "Fix the C library initialization to avoid calling static C++ constructors twice."
2009-06-03 13:00:20 -07:00
David 'Digit' Turner
3a654b1e04 Revert "Fix the C library initialization to avoid calling static C++ constructors twice."
This reverts commit 03eabfe65e.
2009-06-03 19:32:37 +02:00
David 'Digit' Turner
1b02faeea6 am 03eabfe6: Fix the C library initialization to avoid calling static C++ constructors twice.
Merge commit '03eabfe65e1e2c36f4d26c78a730fa19a3bdada3'

* commit '03eabfe65e1e2c36f4d26c78a730fa19a3bdada3':
  Fix the C library initialization to avoid calling static C++ constructors twice.
2009-06-03 05:44:25 -07:00
Barry Hayes
f30dae9cf4 Add mspace_merge_objects 2009-06-02 14:48:59 -07:00
David 'Digit' Turner
03eabfe65e Fix the C library initialization to avoid calling static C++ constructors twice.
The problem was due to the fact that, in the case of dynamic executables,
the dynamic linker calls the DT_PREINIT_ARRAY, DT_INIT and DT_INIT_ARRAY
constructors when loading shared libraries and dynamic executables,
*before* calling the executable's entry point (i.e. arch-$ARCH/bionic/crtbegin_dynamic.c)
which in turns call __libc_init() in libc.so, as defined by bionic/libc_init_dynamic.c

The latter did call these constructors array again, mistakenly.

The patch also updates the documentation of many related functions.

Also adds a new section to linker/README.TXT explaining restrictions on
C library usage.

The patch has been tested on a Dream for stability issues with
proprietary blobs:

- H264 decoding works
- Camera + Video recording works
- GPS works
- Sensors work

The tests in system/extra/tests/bionic/libc/common/test_static_cpp_mutex.cpp has been
run and shows the static C++ constructor being called only once.
2009-06-02 23:27:44 +02:00
Dima Zavin
654476654e am 0353195f: linker: Give more context for failures during library dependency resolution.
Merge commit '0353195f344666256dba474a15c9ba22cf0cccc9'

* commit '0353195f344666256dba474a15c9ba22cf0cccc9':
  linker: Give more context for failures during library dependency resolution.
2009-06-01 13:02:20 -07:00
Dima Zavin
0353195f34 linker: Give more context for failures during library dependency resolution.
Signed-off-by: Dima Zavin <dima@android.com>
2009-06-01 12:55:48 -07:00
Dima Zavin
563b15dbfe am 2e85579c: linker: Make the errors reported by dlopen/dlsym be more useful.
Merge commit '2e85579c34047c305caf15fb0ebe02bf3d001d0e'

* commit '2e85579c34047c305caf15fb0ebe02bf3d001d0e':
  linker: Make the errors reported by dlopen/dlsym be more useful.
2009-05-28 12:38:04 -07:00
Dima Zavin
e76de9a8ca am 49e55332: libc: Add an intermediate version of the static libc without malloc
Merge commit '49e55332784b82f7112ee7c1ea3c176c9dc32d7a'

* commit '49e55332784b82f7112ee7c1ea3c176c9dc32d7a':
  libc: Add an intermediate version of the static libc without malloc
2009-05-28 12:38:02 -07:00
Dima Zavin
b489245af2 am ca122b0e: libc: Cleanup the libc makefile.
Merge commit 'ca122b0e34df0e8c485be0d3ab1b80f728b76276'

* commit 'ca122b0e34df0e8c485be0d3ab1b80f728b76276':
  libc: Cleanup the libc makefile.
2009-05-28 12:38:00 -07:00