Protect JIT Code cache modifications with version check

Required since the JIT CC is asyncronously reset from threads running GC.

Change-Id: Ibc26d33c00c3beab13043838ffe28474d0458bd3
Dalvik: Better compatibility with different compilers

This fixes building with clang 3.4, and possibly future versions of gcc:
- Don't error out on unused functions generated by gen-mterp.py even
  when we're using -Werror
- Eliminate some dead code (Word/kWordSize definition) clang warns about

In order to avoid the need for -Wno-error=unused-function, gen-mterp.py
would have to be a lot smarter than it currently is.

Currently, it copies all code from header.cpp and then adds CPU specific
routines.

The code in header.cpp defines all sorts of functions that may or may
not be used by the CPU specific routines, depending on whether or not
the CPU specific bits have a better implementation available.

To fix this without -Wno-error=unused-functions, gen-mterp.py would have
to actually read the CPU specific bits and based on that throw out parts
of header.cpp that aren't needed.

This seems to be too much effort to just avoid having a couple of unused
functions in the code that can be thrown out at compile time anyway,
especially since this is in dalvik which will likely not see another
major revision.

Change-Id: I2874c6f05186721636518e422b0f39a3d8e731cd
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Fix libutils dependencies for dexdump & dexlist.

We should always use a libutils SHARED_LIBRARY on the target &
a STATIC_LIBRARY on the host.

(cherry picked from commit 2ac78805e1b4d80308c5c4a48a997abc3a2ac37b)

Change-Id: I06c9b8f0cf663e00da0eeba54c893d8eec1d8a9f
Use libziparchive for dalvik zip processing.

The API was similar enough that we could just delegate
to existing zip functions. The existing ZipArchiveHandle /
ZipEntry types have been reused instead of defining new
types.

The old ZipArchive type has been removed because it serves
no useful purpose, and no code was using it anyway.

Change-Id: I47f12344d1e6efc234fed50b1613f9f179a9b03f
Fix a few bugs introduced by the move to zip_archive.

- mmap failures because the output file was opened with
  O_WRONLY instead of O_RDWR

- In two instances, we were passing the wrong handle
  to CloseArchive(ZipArchiveHandle). The issue is code
  like this:

  ZipArchiveHandle h;
  OpenArchive(&h);
  CloseArchive(&h);

  This compiles, but isn't correct. ZipArchiveHandle is
  a typedef for (void *) and the compiler won't complain
  because void** is also void*. Some of this code was written
  before the API was changed from CloseArchive(ZipArchiveHandle&)
  to CloseArchie(ZipArchiveHandle) but continued to compile
  even after the API change. I'll change the API in the follow up
  to catch errors like this at compile time.

bug: 12173498
bug: 12176258
bug: 12178641

Change-Id: I71ac36654311f582b5ab633e1ed0d13e00053c84
Fix libutils dependencies for dexdump & dexlist (again).

We managed to get into a bad state because the change that
fixed dependencies on dalvik-dev was cherry-picked on to
master-aosp and then the change that needed this was
reverted.

Git got confused as a result.

Change-Id: Idef607a676cff85d00e95a94a9be09d791b2fa96
Revert "Use libziparchive for dalvik zip processing."

Bug: 12173498

This reverts commit ac4202a846965a6b5a88001a8ad3d5321edeb81c.

Change-Id: Ie48d873bded13e0f73cb1e926dbcd30a66933176
Revert "Revert "Use libziparchive for dalvik zip processing.""

This reverts commit 52dacd58ac8735ffdcd6bbe952586a38ad70e6a5.
Remove the sole reference to __ARM_HAVE_BLX.

Every ARM processor we run on has blx.

Change-Id: I633984d208d8a1995b9595521352e0b16413837c
Remove some ARMv5 cruft.

Change-Id: I95dcfd9dff8db25b9419b8ef862e3b9b70927a0c
Use RETURN_PTR(NULL) instead of RETURN_VOID in newNonMovableArray.

RETURN_VOID doesn't set the return value. This means that we are
returning random garbage when the allocation doesn't succeed.

Bug: 11971220
Change-Id: I570562c7bb9dc573161294916f582709774b35fd
Add interface for updating process state.

Used only in ART. Stub function added to Dalvik.

Bug: 8981901
Change-Id: Icc4d3c73c7959bae97d43752f3b4c5e146b7cb1f
Fix "dalvikvm -help".

Showing the help because we were asked to isn't an error.
Showing the help because the command line made no sense is.

Bug: https://code.google.com/p/android/issues/detail?id=60009
Change-Id: I2d5097e7bcf47db833ea2e0e0f3b8164f6309272
Move dalvik's MIPS code off old kernel headers.

I suspect this was actually my fault; I think MIPS originally
explicitly defined all these constants themselves.

Bug: 11559337
Change-Id: Ide8b256c9e8a419515d7424e7a7700b8967ceb26