diff options
author | Han Shen <shenhan@google.com> | 2016-07-26 08:49:12 -0700 |
---|---|---|
committer | Han Shen <shenhan@google.com> | 2016-07-26 08:55:14 -0700 |
commit | 8769bc4bab847cefc2bb5682a0a0dad579528ac8 (patch) | |
tree | b93a01a9472bc7677a46cfb2156cfcb0f7e3c84d /gold/testsuite/aarch64_relocs.s | |
parent | e0461dbb653dbb3c46ea7a15054fd2c98f879f31 (diff) | |
download | gdb-8769bc4bab847cefc2bb5682a0a0dad579528ac8.zip gdb-8769bc4bab847cefc2bb5682a0a0dad579528ac8.tar.gz gdb-8769bc4bab847cefc2bb5682a0a0dad579528ac8.tar.bz2 |
[Gold, aarch64] Implement some AArch64 relocs.
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.
Diffstat (limited to 'gold/testsuite/aarch64_relocs.s')
-rw-r--r-- | gold/testsuite/aarch64_relocs.s | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gold/testsuite/aarch64_relocs.s b/gold/testsuite/aarch64_relocs.s new file mode 100644 index 0000000..0aa3d68 --- /dev/null +++ b/gold/testsuite/aarch64_relocs.s @@ -0,0 +1,45 @@ +.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 |