OSDN Git Service

hardening: eliminate all text relocations from lidbvm
authorArd Biesheuvel <ard.biesheuvel@gmail.com>
Sat, 11 Aug 2012 10:45:01 +0000 (12:45 +0200)
committerArd Biesheuvel <ard.biesheuvel@gmail.com>
Sat, 11 Aug 2012 21:18:05 +0000 (23:18 +0200)
commit5dfcc78af479937ba8dafceefd9b1931a88dfaaf
tree70e558abf7ee2944c21202cafa365a6f40a180b1
parent21212cbd65aa7ec7d69f0c6f5b98794045f750a5
hardening: eliminate all text relocations from lidbvm

This patch consists of:
- changes to mterp/ that turn all literals from absolute
  to PC relative, so the relocations can be resolved at
  (build) link time
- changes to compiler/template/ that result in the
  compiler templates to live in the non-executable
  .data.rel.ro section (this code is never executed
  directly, only from the jit heap, so there is no
  reason to put it in the .text section)

Change-Id: I2dc97bd4720b393a74b7277a188f0c7b681fc932
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
20 files changed:
vm/compiler/template/armv5te/footer.S
vm/compiler/template/gen-template.py
vm/compiler/template/ia32/footer.S
vm/compiler/template/mips/footer.S
vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
vm/compiler/template/out/CompilerTemplateAsm-armv5te.S
vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S
vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
vm/compiler/template/out/CompilerTemplateAsm-ia32.S
vm/compiler/template/out/CompilerTemplateAsm-mips.S
vm/mterp/armv5te/OP_EXECUTE_INLINE.S
vm/mterp/armv5te/OP_EXECUTE_INLINE_RANGE.S
vm/mterp/armv5te/OP_FILLED_NEW_ARRAY.S
vm/mterp/armv5te/entry.S
vm/mterp/armv5te/footer.S
vm/mterp/common/asm-constants.h
vm/mterp/out/InterpAsm-armv5te-vfp.S
vm/mterp/out/InterpAsm-armv5te.S
vm/mterp/out/InterpAsm-armv7-a-neon.S
vm/mterp/out/InterpAsm-armv7-a.S