mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
8769bc4bab
This CL implemented the following relocs for AArch64 target. - R_AARCH64_MOVW_UABS_G* - R_AARCH64_MOVW_SABS_G* relocations gold/ChangeLog 2016-07-26 Igor Kudrin <ikudrin@accesssoftek.com> * aarch64-reloc-property.cc (Rvalue_bit_select_impl): New class. (rvalue_bit_select): Use Rvalue_bit_select_impl. * aarch64-reloc.def (MOVW_UABS_G0, MOVW_UABS_G0_NC, MOVW_UABS_G1, MOVW_UABS_G1_NC, MOVW_UABS_G2, MOVW_UABS_G2_NC, MOVW_UABS_G3, MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2): New relocations. * aarch64.cc (Target_aarch64::Scan::local): Add cases for new MOVW_UABS_* and MOVW_SABS_* relocations. (Target_aarch64::Scan::global): Likewise. (Target_aarch64::Relocate::relocate): Add cases and handlings for new MOVW_UABS_* and MOVW_SABS_* relocations. * testsuite/Makefile.am (aarch64_relocs): New test. * testsuite/Makefile.in: Regenerate. * testsuite/aarch64_globals.s: New test source file. * testsuite/aarch64_relocs.s: Likewise. * testsuite/aarch64_relocs.sh: New test script.
46 lines
1.3 KiB
ArmAsm
46 lines
1.3 KiB
ArmAsm
.text
|
|
|
|
test_R_AARCH64_MOVW_UABS_G0:
|
|
movz x4, :abs_g0:abs_0x1234
|
|
movz x4, :abs_g0:abs_0x1234 + 4
|
|
|
|
test_R_AARCH64_MOVW_UABS_G0_NC:
|
|
movz x4, :abs_g0_nc:abs_0x1234
|
|
movz x4, :abs_g0_nc:abs_0x1234 + 0x45000
|
|
|
|
test_R_AARCH64_MOVW_UABS_G1:
|
|
movz x4, :abs_g1:abs_0x1234 - 4
|
|
movz x4, :abs_g1:abs_0x11000
|
|
movz x4, :abs_g1:abs_0x45000 + 0x20010
|
|
|
|
test_R_AARCH64_MOVW_UABS_G1_NC:
|
|
movz x4, :abs_g1_nc:abs_0x1234 - 4
|
|
movz x4, :abs_g1_nc:abs_0x11000
|
|
movz x4, :abs_g1_nc:abs_0x45000 + 0x100020010
|
|
|
|
test_R_AARCH64_MOVW_UABS_G2:
|
|
movz x4, :abs_g2:abs_0x45000 + 0x20010
|
|
movz x4, :abs_g2:abs_0x3600010000 + 0x100020010
|
|
|
|
test_R_AARCH64_MOVW_UABS_G2_NC:
|
|
movz x4, :abs_g2_nc:abs_0x45000 + 0x20010
|
|
movz x4, :abs_g2_nc:abs_0x3600010000 + 0x3000100020010
|
|
|
|
test_R_AARCH64_MOVW_UABS_G3:
|
|
movz x4, :abs_g3:abs_0x3600010000 + 0x100020010
|
|
movz x4, :abs_g3:abs_0x3600010000 + 0x3000100020010
|
|
|
|
test_R_AARCH64_MOVW_SABS_G0:
|
|
movz x4, :abs_g0_s:abs_0x1234 + 4
|
|
movz x4, :abs_g0_s:abs_0x1234 - 0x2345
|
|
|
|
test_R_AARCH64_MOVW_SABS_G1:
|
|
movz x4, :abs_g1_s:abs_0x1234 - 0x2345
|
|
movz x4, :abs_g1_s:abs_0x45000 + 0x20010
|
|
movz x4, :abs_g1_s:abs_0x45000 - 0x56000
|
|
|
|
test_R_AARCH64_MOVW_SABS_G2:
|
|
movz x4, :abs_g2_s:abs_0x45000 + 0x20010
|
|
movz x4, :abs_g2_s:abs_0x3600010000 + 0x100020010
|
|
movz x4, :abs_g2_s:abs_0x3600010000 - 0x4400010000
|