OSDN Git Service

Runtime can now be set to require relocation
authorAlex Light <allight@google.com>
Wed, 2 Jul 2014 23:28:08 +0000 (16:28 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 22 Jul 2014 15:24:14 +0000 (08:24 -0700)
commita59dd80f9f48cb750d329d4d4af2d99d72b484d1
tree36958b15842205addaf6d2a13e40823eab47c8bc
parent84568fdf08f8f476292996ad653b4453d2894d23
Runtime can now be set to require relocation

Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force
the runtime to require that all files that are run are relocated, to
prevent attacks based on the known art base address.

Add support for running patchoat on oat files compiled without an image.

Change run-test to have new --prebuild and --relocate flags.

Bug: 15358152

Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
46 files changed:
Android.mk
build/Android.common_build.mk
build/Android.common_test.mk
compiler/Android.mk
compiler/dex/quick_compiler_callbacks.h
compiler/driver/compiler_driver.cc
compiler/elf_patcher.cc [new file with mode: 0644]
compiler/elf_patcher.h [new file with mode: 0644]
compiler/image_test.cc
compiler/image_writer.cc
compiler/image_writer.h
compiler/oat_test.cc
compiler/oat_writer.cc
compiler/oat_writer.h
dex2oat/dex2oat.cc
oatdump/oatdump.cc
patchoat/patchoat.cc
patchoat/patchoat.h
runtime/base/scoped_flock.cc
runtime/base/scoped_flock.h
runtime/class_linker.cc
runtime/class_linker.h
runtime/common_runtime_test.cc
runtime/common_runtime_test.h
runtime/compiler_callbacks.h
runtime/gc/space/image_space.cc
runtime/gc/space/image_space.h
runtime/indirect_reference_table.cc
runtime/noop_compiler_callbacks.h
runtime/oat.cc
runtime/oat.h
runtime/oat_file.cc
runtime/oat_file.h
runtime/parsed_options.cc
runtime/parsed_options.h
runtime/runtime.cc
runtime/runtime.h
runtime/utils.cc
runtime/utils.h
test/Android.oat.mk
test/Android.run-test.mk
test/etc/host-run-test-jar
test/etc/push-and-run-prebuilt-test-jar [new file with mode: 0755]
test/etc/push-and-run-test-jar
test/run-all-tests
test/run-test