Commit graph

5099 commits

Author SHA1 Message Date
Elliott Hughes
232163cf70 Clean up the cpuacct cruft.
Change-Id: I6ed63af8dfc2368e211420389fa8af4d5dc0908f
2013-10-09 17:35:36 -07:00
Elliott Hughes
92f3cc50c8 Merge "x86_64: Rename 64-bit linker to linker64" 2013-10-09 23:51:29 +00:00
Pavel Chupin
1a57f9f75c x86_64: Rename 64-bit linker to linker64
That's for having both on the same system.

Change-Id: Ic2bc2c015e6486e8b6a7576f7b28d2d027534368
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-09 16:50:30 -07:00
Nick Kralevich
848efa9dae Merge "Revert "FORTIFY_SOURCE: fortify read()"" 2013-10-09 23:47:58 +00:00
Nick Kralevich
8d25327639 Revert "FORTIFY_SOURCE: fortify read()"
This change reverts
* fb3f956d07.
* 65c99de2cb

Change-Id: Id5774eeede41130579115cf67a72ee914f2b47d5
2013-10-09 16:46:25 -07:00
Elliott Hughes
777ebe8667 Merge "Fix MIPS build." 2013-10-09 23:43:24 +00:00
Elliott Hughes
14b467e840 Fix MIPS build.
Warnings are errors for all home-grown bionic code, and the arch-specific
code now counts as home-grown bionic code (it was mistakenly counted as
"not ours" before).

Change-Id: I9c6a881b0dc596bae7dfe112c5c189e073800a3a
2013-10-09 16:40:33 -07:00
Elliott Hughes
37953ee3fe Merge "Fix build." 2013-10-09 23:30:39 +00:00
Elliott Hughes
fb3f956d07 Fix build.
'private' is no longer on the default include path inside bionic.

Change-Id: I9bfab213a496fac585787118603af3aa2a1f9951
2013-10-09 16:29:42 -07:00
Elliott Hughes
bc545e8a98 Merge "Fix x86_64 build, clean up intermediate libraries." 2013-10-09 23:29:00 +00:00
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
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
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
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
458076c3c7 Merge "Fix the ALIGN and ALIGNBYTES macros for LP64." 2013-10-08 23:09:54 +00: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
5cf1f22962 Merge "pthread_exit should call __NR_exit with status 0." 2013-10-08 22:02:20 +00: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
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
9c710927ab Merge "Use linker64 for the 64-bit linker." 2013-10-08 18:37:22 +00:00
Elliott Hughes
d7398f146d Use linker64 for the 64-bit linker.
Change-Id: I13fc7f93274f99e4cf99b077afdf5293e7233f39
2013-10-08 10:05:05 -07:00
Elliott Hughes
3df50f57e5 Merge "Use C99 structure initializer designator style." 2013-10-08 17:01:42 +00:00
Elliott Hughes
afac15d686 Use C99 structure initializer designator style.
clang warns about using the GCC style of designator.

Change-Id: I86ec79f06c8774618082859f48d7d1f576520e32
2013-10-08 10:01:09 -07:00
Elliott Hughes
26933f4046 Merge "x86_64 linker." 2013-10-08 16:59:17 +00:00
Elliott Hughes
c00f2cb587 x86_64 linker.
Based on I8dc3e2cb596f75dc58ae82e4dc58f8c177dd3323 by
Pavel Chupin <pavel.v.chupin@intel.com>.

Change-Id: Icd582d277cbe273477b450f2848343d72c86ec9f
2013-10-08 09:57:01 -07:00
Elliott Hughes
5d06718cd3 Merge "Refactor the syscall generation script." 2013-10-08 16:53:02 +00:00
Elliott Hughes
0c1379e42d Merge "Fix Clang warning since KernelArgumentBlock is actually a class." 2013-10-08 16:12:54 +00:00
Stephen Hines
99f0e1a329 Fix Clang warning since KernelArgumentBlock is actually a class.
Change-Id: Id72868d80feffbbc5f7d1e43beaed5d4e4d95f52
2013-10-08 00:08:13 -07:00
Elliott Hughes
0437f3ff29 Refactor the syscall generation script.
Primarily so that the new x86_64 alias functionality is now available for
all architectures.

Change-Id: I9fde59093a1d08de98923f121a6e3d05ec5801d2
2013-10-07 23:53:13 -07:00
Elliott Hughes
d2b6b5f2db Merge "Add an optional alias list to SYSCALLS.TXT" 2013-10-08 06:03:01 +00:00
Elliott Hughes
5d40527aba Merge "libc: fix __cxa_atexit implicit declaration" 2013-10-07 18:33:51 +00:00
synergydev
589eaa4c72 libc: fix __cxa_atexit implicit declaration
Change-Id: Iacad18b332a717e4485c83df4bd42a850ff7699f
2013-10-07 11:33:20 -07:00
Elliott Hughes
04cdfa67c7 Merge "Clean up the x86 and x86_64 _exit_with_stack_teardown implementations." 2013-10-07 17:49:19 +00:00
H.J. Lu
6fe4e87954 Add an optional alias list to SYSCALLS.TXT
This patch adds an optional alias list to SYSCALLS.TXT.  It is used to
create aliases for a syscall.  For x86-64, lseek64 is an alias for lseek.

Change-Id: Icb11fd2bb461ea4f5f0a26bfc585471d7d7cc468
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-07 21:37:12 +04:00
Elliott Hughes
d262e17ec1 Merge "Don't define the meaningless SOFTFLOAT for x86." 2013-10-07 17:27:18 +00:00
Elliott Hughes
a97cc5b458 Clean up the x86 and x86_64 _exit_with_stack_teardown implementations.
Change-Id: I4bcbbc53893612bd94643ef07722becb00f91792
2013-10-07 10:25:11 -07:00
Elliott Hughes
ee489f6ad2 Don't define the meaningless SOFTFLOAT for x86.
Change-Id: I9f932ad5d9f731a0de18efb881d02cedf9fcbede
2013-10-07 09:53:44 -07:00
Elliott Hughes
a6e9ae80e5 Merge "Fix MIPS build." 2013-10-07 05:32:56 +00:00