diff options
author | Renlin Li <renlin.li@arm.com> | 2015-10-02 16:59:46 +0100 |
---|---|---|
committer | Renlin Li <renlin.li@arm.com> | 2015-10-02 17:56:08 +0100 |
commit | 3b957e5b074407e18782a9592754c732671df8ed (patch) | |
tree | 4b5eea00b0e67b41989d29f6f1f41545b171a272 /ld/testsuite | |
parent | 7ba7cfe43195305f5efa887ebbffb53a724aaac6 (diff) | |
download | gdb-3b957e5b074407e18782a9592754c732671df8ed.zip gdb-3b957e5b074407e18782a9592754c732671df8ed.tar.gz gdb-3b957e5b074407e18782a9592754c732671df8ed.tar.bz2 |
[Binutils][AARCH64]Add TLS IE large memory support.
bfd/
2015-10-02 Renlin Li <renlin.li@arm.com>
* reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
* libbfd.h: Regenerate.
* bfd-in2.h: Likewise.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
TLSIE_MOVW_GOTTPREL_G1 check overflow.
(aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
and TLSIE_MOVW_GOTTPREL_G0_NC.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.
gas/
2015-10-02 Renlin Li <renlin.li@arm.com>
* config/tc-aarch64.c (reloc_table): Add two entries for
gottprel_g0_nc and gottprel_g1.
(process_movw_reloc_info): Add support.
(md_apply_fix): Likewise.
(aarch64_force_relocation): Likewise.
gas/testsuite/
2015-10-02 Renlin Li <renlin.li@arm.com>
* gas/aarch64/reloc-gottprel_g0_nc.d: New.
* gas/aarch64/reloc-gottprel_g0_nc.s: New.
* gas/aarch64/reloc-gottprel_g1.d: New.
* gas/aarch64/reloc-gottprel_g1.s: New.
ld/testsuite/
2015-10-02 Renlin Li <renlin.li@arm.com>
* ld-aarch64/tls-large-ie.d: New.
* ld-aarch64/tls-large-ie.s: New.
* ld-aarch64/aarch64-elf.exp: Run new test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/aarch64-elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/tls-large-ie.d | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/tls-large-ie.s | 15 |
4 files changed, 41 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index e755b8a..e486bba 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2015-10-02 Renlin Li <renlin.li@arm.com> + * ld-aarch64/tls-large-ie.d: New. + * ld-aarch64/tls-large-ie.s: New. + * ld-aarch64/aarch64-elf.exp: Run new test. + +2015-10-02 Renlin Li <renlin.li@arm.com> + * ld-aarch64/emit-relocs-516.d: New. * ld-aarch64/emit-relocs-516.s: New. * ld-aarch64/aarch64-elf.exp: Run new test. diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp index 3cafff3..d0da92f 100644 --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp @@ -197,6 +197,7 @@ run_dump_test "tls-tiny-desc" run_dump_test "tls-tiny-desc-ie" run_dump_test "tls-tiny-desc-le" run_dump_test "tls-tiny-ie" +run_dump_test "tls-large-ie" run_dump_test "tls-tiny-ld" run_dump_test "tls-small-ld" run_dump_test "tlsle" diff --git a/ld/testsuite/ld-aarch64/tls-large-ie.d b/ld/testsuite/ld-aarch64/tls-large-ie.d new file mode 100644 index 0000000..dd0a14d --- /dev/null +++ b/ld/testsuite/ld-aarch64/tls-large-ie.d @@ -0,0 +1,19 @@ +#source: tls-large-ie.s +#ld: -shared -T relocs.ld -e0 +#objdump: -dr +#... + +Disassembly of section .text: + +0000000000010000 \<test\>: + 10000: 58000121 ldr x1, 10024 \<test\+0x24\> + 10004: 10000102 adr x2, 10024 \<test\+0x24\> + 10008: 8b020021 add x1, x1, x2 + 1000c: d53bd042 mrs x2, tpidr_el0 + 10010: d2a00000 movz x0, #0x0, lsl #16 + 10014: f2800100 movk x0, #0x8 + 10018: f8606820 ldr x0, \[x1,x0\] + 1001c: 8b020000 add x0, x0, x2 + 10020: d503201f nop + 10024: 0000ffdc .word 0x0000ffdc + 10028: 00000000 .word 0x00000000 diff --git a/ld/testsuite/ld-aarch64/tls-large-ie.s b/ld/testsuite/ld-aarch64/tls-large-ie.s new file mode 100644 index 0000000..89a2e6b --- /dev/null +++ b/ld/testsuite/ld-aarch64/tls-large-ie.s @@ -0,0 +1,15 @@ + .global var + .text +test: + ldr x1, .Lgot + adr x2, .Lgot + add x1, x1, x2 + + mrs x2, tpidr_el0 + movz x0, #:gottprel_g1:var + movk x0, #:gottprel_g0_nc:var + ldr x0, [x1, x0] + add x0, x0, x2 + nop + +.Lgot: .xword _GLOBAL_OFFSET_TABLE_ - . |