AArch64: implement relocations for global access
authorTim Northover <Tim.Northover@arm.com>
Sat, 4 May 2013 20:14:04 +0000 (20:14 +0000)
committerTim Northover <Tim.Northover@arm.com>
Sat, 4 May 2013 20:14:04 +0000 (20:14 +0000)
commit654c2d6b7a9274fc281c30c0e91419aadb6dc78a
tree01128f4473ca575a41e1eb3ff38f3a0cee0c4f59
parent85829bb98a998cff8f364c12d172da948ca225f4
AArch64: implement relocations for global access

The large memory model (default and main viable for JIT) emits
addresses in need of relocation as
    movz x0, #:abs_g3:somewhere
    movk x0, #:abs_g2_nc:somewhere
    movk x0, #:abs_g1_nc:somewhere
    movk x0, #:abs_g0_nc:somewhere

To support this we must implement those four relocations in the
dynamic loader.

This allows (for example) the test-global.ll MCJIT test to pass on
AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181132 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp