Commit Graph

5852 Commits

Author SHA1 Message Date
Nick Kralevich
c147478cb7 Merge "FORTIFY_SOURCE: fortify read()" 2013-10-09 23:23:27 +00:00
Elliott Hughes
eb847bc866 Fix x86_64 build, clean up intermediate libraries.
The x86_64 build was failing because clone.S had a call to __thread_entry which
was being added to a different intermediate .a on the way to making libc.so,
and the linker couldn't guarantee statically that such a relocation would be
possible.

  ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC

This patch addresses that by ensuring that the caller and callee end up in the
same intermediate .a. While I'm here, I've tried to clean up some of the mess
that led to this situation too. In particular, this removes libc/private/ from
the default include path (except for the DNS code), and splits out the DNS
code into its own library (since it's a weird special case of upstream NetBSD
code that's diverged so heavily it's unlikely ever to get back in sync).

There's more cleanup of the DNS situation possible, but this is definitely a
step in the right direction, and it's more than enough to get x86_64 building
cleanly.

Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
2013-10-09 16:00:17 -07:00
Elliott Hughes
ac045c32d0 am f83148af: am 0c17099a: Merge "Fix __errno for LP64 and clean up __get_tls."
* commit 'f83148af74704c574ad1bf60082f2f56bcb29706':
  Fix __errno for LP64 and clean up __get_tls.
2013-10-09 13:52:56 -07:00
Elliott Hughes
f83148af74 am 0c17099a: Merge "Fix __errno for LP64 and clean up __get_tls."
* commit '0c17099a71cb5d1b36b7aab66fd7341b3fc9106d':
  Fix __errno for LP64 and clean up __get_tls.
2013-10-09 13:51:14 -07:00
Elliott Hughes
0c17099a71 Merge "Fix __errno for LP64 and clean up __get_tls." 2013-10-09 20:49:10 +00:00
Nick Kralevich
65c99de2cb FORTIFY_SOURCE: fortify read()
Change-Id: I3d7b4ec86d04efb865117ce7629a2e26917f3331
2013-10-09 13:44:38 -07:00
Elliott Hughes
2a0b873065 Fix __errno for LP64 and clean up __get_tls.
If __get_tls has the right type, a lot of confusing casting can disappear.

It was probably a mistake that __get_tls was exposed as a function for mips
and x86 (but not arm), so let's (a) ensure that the __get_tls function
always matches the macro, (b) that we have the function for arm too, and
(c) that we don't have the function for any 64-bit architecture.

Change-Id: Ie9cb989b66e2006524ad7733eb6e1a65055463be
2013-10-09 13:39:13 -07:00
Elliott Hughes
7c98d1304d am 898fd6a1: am 777a4ee6: Merge "Fix 32-bit build."
* commit '898fd6a1f0d8a540a3b8950f18e0858042279001':
  Fix 32-bit build.
2013-10-08 18:46:10 -07:00
Elliott Hughes
898fd6a1f0 am 777a4ee6: Merge "Fix 32-bit build."
* commit '777a4ee6771e6fe3362ef4f24244a44fcd0aabe4':
  Fix 32-bit build.
2013-10-08 18:43:56 -07:00
Elliott Hughes
777a4ee677 Merge "Fix 32-bit build." 2013-10-09 01:41:46 +00:00
Elliott Hughes
51aeff7021 Fix 32-bit build.
libc/tzcode/localtime.c: In function 'differ_by_repeat':
  libc/tzcode/localtime.c:338:2: error: comparison is always false due to limited range of data type [-Werror=type-limits]

Change-Id: Ic84be6391a66e9d50ed98f41d865387c77a60ffa
2013-10-08 18:30:44 -07:00
Elliott Hughes
e17457fbf5 am 3c13dade: am 14b66bff: Merge "Fix malloc debugging for LP64."
* commit '3c13daded375cad5fc77613872a85639cd09f54f':
  Fix malloc debugging for LP64.
2013-10-08 17:28:25 -07:00
Elliott Hughes
5ca2f97fb6 am 5596240c: am 65e1c48d: Merge "Don\'t allow int<->pointer conversions."
* commit '5596240cc86920115cffbfe7aac66116d5136a0b':
  Don't allow int<->pointer conversions.
2013-10-08 17:28:25 -07:00
Elliott Hughes
8cc98f0b1e am 54c7ef7f: am 7027841d: Merge "Fix bionic\'s built-in stack trace dumping for LP64."
* commit '54c7ef7fbd1f79ae490eb737f558fccf3c1dbd55':
  Fix bionic's built-in stack trace dumping for LP64.
2013-10-08 17:28:24 -07:00
Elliott Hughes
3c13daded3 am 14b66bff: Merge "Fix malloc debugging for LP64."
* commit '14b66bffb08d23ad16d69b62d1fbfda769db1c12':
  Fix malloc debugging for LP64.
2013-10-08 17:22:52 -07:00
Elliott Hughes
5596240cc8 am 65e1c48d: Merge "Don\'t allow int<->pointer conversions."
* commit '65e1c48df095b2af53340ab55f687d5b1c638d66':
  Don't allow int<->pointer conversions.
2013-10-08 17:22:51 -07:00
Elliott Hughes
54c7ef7fbd am 7027841d: Merge "Fix bionic\'s built-in stack trace dumping for LP64."
* commit '7027841d8fe27f0cd42ca16db156ebea721f68a8':
  Fix bionic's built-in stack trace dumping for LP64.
2013-10-08 17:22:51 -07:00
Elliott Hughes
14b66bffb0 Merge "Fix malloc debugging for LP64." 2013-10-09 00:20:08 +00:00
Elliott Hughes
65e1c48df0 Merge "Don't allow int<->pointer conversions." 2013-10-09 00:18:50 +00:00
Elliott Hughes
7027841d8f Merge "Fix bionic's built-in stack trace dumping for LP64." 2013-10-09 00:18:44 +00:00
Elliott Hughes
2ec400bfc7 Don't allow int<->pointer conversions.
Normally we don't have -Werror for upstream code, but for those warnings
that probably point to 32-bit assumptions about pointers, we want those
warnings to always be errors.

Change-Id: Ibece9caf09b2f7989ca600ef448d07868669a8fb
2013-10-08 17:04:33 -07:00
Elliott Hughes
c7c5f85ead Fix bionic's built-in stack trace dumping for LP64.
Change-Id: I967c5789d7bb2d3d248d94d81a40d5ec4e1bf26d
2013-10-08 17:02:26 -07:00
Elliott Hughes
ef0696d46a Fix malloc debugging for LP64.
Change-Id: Idd0b239f5c66d45de315d556271a5d13b8eb907c
2013-10-08 16:18:55 -07:00
Elliott Hughes
e769368d76 am c8bd2c2e: am 458076c3: Merge "Fix the ALIGN and ALIGNBYTES macros for LP64."
* commit 'c8bd2c2e45c93b999a40449e4c6f44470f010367':
  Fix the ALIGN and ALIGNBYTES macros for LP64.
2013-10-08 16:15:33 -07:00
Elliott Hughes
c8bd2c2e45 am 458076c3: Merge "Fix the ALIGN and ALIGNBYTES macros for LP64."
* commit '458076c3c7f41c72e0d1ae8da23907f75427ca3a':
  Fix the ALIGN and ALIGNBYTES macros for LP64.
2013-10-08 16:13:17 -07:00
Elliott Hughes
458076c3c7 Merge "Fix the ALIGN and ALIGNBYTES macros for LP64." 2013-10-08 23:09:54 +00:00
Ed Heyl
53f30951d3 am f87684ee: merge in KQS81M
* commit 'f87684eea10d951b056ce664bc890d7607a3c1cf':
  Use kernel default for initial thread size
2013-10-08 15:45:46 -07:00
Ed Heyl
f87684eea1 merge in KQS81M 2013-10-08 15:35:17 -07:00
Elliott Hughes
78df45e1d1 Fix the ALIGN and ALIGNBYTES macros for LP64.
Change-Id: I3a361255afce375ab1cefa449721f0aea4d47919
2013-10-08 15:31:44 -07:00
Elliott Hughes
42b618cffe am 58b8f225: am 5cf1f229: Merge "pthread_exit should call __NR_exit with status 0."
* commit '58b8f2256637c5b1e24b568b699fb3aa6cf0ca96':
  pthread_exit should call __NR_exit with status 0.
2013-10-08 15:06:49 -07:00
Elliott Hughes
58b8f22566 am 5cf1f229: Merge "pthread_exit should call __NR_exit with status 0."
* commit '5cf1f229620d02c0ca266c9e03418fdeefd85191':
  pthread_exit should call __NR_exit with status 0.
2013-10-08 15:04:45 -07:00
Elliott Hughes
5cf1f22962 Merge "pthread_exit should call __NR_exit with status 0." 2013-10-08 22:02:20 +00:00
Elliott Hughes
caa0deeefb am 97368e82: am 242b2e0b: Merge "Use /system/lib64 and /vendor/lib64 for 64-bit libraries."
* commit '97368e823250fcc0b48f6f392df77c275bf3c5e1':
  Use /system/lib64 and /vendor/lib64 for 64-bit libraries.
2013-10-08 14:54:01 -07:00
Elliott Hughes
97368e8232 am 242b2e0b: Merge "Use /system/lib64 and /vendor/lib64 for 64-bit libraries."
* commit '242b2e0b928f83083f60bbb856309122981299af':
  Use /system/lib64 and /vendor/lib64 for 64-bit libraries.
2013-10-08 14:52:04 -07:00
Elliott Hughes
242b2e0b92 Merge "Use /system/lib64 and /vendor/lib64 for 64-bit libraries." 2013-10-08 21:50:34 +00:00
Elliott Hughes
c4c6e192ac pthread_exit should call __NR_exit with status 0.
We shouldn't have been passing the bottom 32 bits of the address used
for pthread_join to the kernel.

Change-Id: I487e5002d60c27adba51173719213abbee0f183f
2013-10-08 14:48:05 -07:00
Elliott Hughes
011bc0ba45 Use /system/lib64 and /vendor/lib64 for 64-bit libraries.
Change-Id: I4886aeb3070bf97b4cfe8053388ecb1bda288017
2013-10-08 14:27:10 -07:00
Elliott Hughes
6260fa5025 am ee9da565: am 58522099: Merge "Make logging fall back to /dev/stderr if we\'re on the host."
* commit 'ee9da5653361f0171e417a4bcb1958a2b91f886d':
  Make logging fall back to /dev/stderr if we're on the host.
2013-10-08 13:47:48 -07:00
Elliott Hughes
ee9da56533 am 58522099: Merge "Make logging fall back to /dev/stderr if we\'re on the host."
* commit '58522099e52be3b5eba702ee6e82c03050e0dcca':
  Make logging fall back to /dev/stderr if we're on the host.
2013-10-08 13:45:05 -07:00
Elliott Hughes
58522099e5 Merge "Make logging fall back to /dev/stderr if we're on the host." 2013-10-08 20:42:36 +00:00
Elliott Hughes
0f395b7ba0 Make logging fall back to /dev/stderr if we're on the host.
Otherwise you get no logging, which sucks.

Change-Id: Iea1e8f996461afbb217a55711b7967005c39cfcb
2013-10-08 13:19:00 -07:00
Elliott Hughes
2f2e8b9778 am 4a5c4711: am 9c710927: Merge "Use linker64 for the 64-bit linker."
* commit '4a5c471162b79a12402ab41a68037a2453b83eaa':
  Use linker64 for the 64-bit linker.
2013-10-08 11:41:21 -07:00
Elliott Hughes
4a5c471162 am 9c710927: Merge "Use linker64 for the 64-bit linker."
* commit '9c710927ab33a663a5ba34b15902e7062523f8e3':
  Use linker64 for the 64-bit linker.
2013-10-08 11:39:45 -07:00
Elliott Hughes
9c710927ab Merge "Use linker64 for the 64-bit linker." 2013-10-08 18:37:22 +00:00
Elliott Hughes
2ad80c46ba am 24f4da96: am 3df50f57: Merge "Use C99 structure initializer designator style."
* commit '24f4da964263b04d3a89575d42272bf897cddec3':
  Use C99 structure initializer designator style.
2013-10-08 10:08:08 -07:00
Elliott Hughes
24f4da9642 am 3df50f57: Merge "Use C99 structure initializer designator style."
* commit '3df50f57e5c106dd70483d4a0a295aa031a5906b':
  Use C99 structure initializer designator style.
2013-10-08 10:05:20 -07:00
Elliott Hughes
d7398f146d Use linker64 for the 64-bit linker.
Change-Id: I13fc7f93274f99e4cf99b077afdf5293e7233f39
2013-10-08 10:05:05 -07:00
Elliott Hughes
5d389a0acf am b1f4f9aa: am 26933f40: Merge "x86_64 linker."
* commit 'b1f4f9aabd4e9f4019e2f1637ec38e6bfdfa3c6b':
  x86_64 linker.
2013-10-08 10:04:31 -07:00
Elliott Hughes
b1f4f9aabd am 26933f40: Merge "x86_64 linker."
* commit '26933f4046d7362bfd276fc208e959a733a121c2':
  x86_64 linker.
2013-10-08 10:01:46 -07:00
Elliott Hughes
3df50f57e5 Merge "Use C99 structure initializer designator style." 2013-10-08 17:01:42 +00:00