diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-08-29 10:25:27 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2013-08-29 10:25:27 +0000 |
commit | 5c98a14e1e4ffe0e8754ca07e50c564e1a22d6c1 (patch) | |
tree | 23692432f3e4612eff5ebb256233f3a179834e94 /ld/testsuite/ld-x86-64/tlsgd7.s | |
parent | 5b791bb530cc1023a5e05a5216836bf80d71a6cd (diff) | |
download | gdb-5c98a14e1e4ffe0e8754ca07e50c564e1a22d6c1.zip gdb-5c98a14e1e4ffe0e8754ca07e50c564e1a22d6c1.tar.gz gdb-5c98a14e1e4ffe0e8754ca07e50c564e1a22d6c1.tar.bz2 |
* elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
64-bit -mcmodel=large -fpic TLS GD and LD sequences.
(elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
ld/testsuite/
* ld-x86-64/x86-64.exp: Add tlsld3, tlsgd7 and tlsgd8 tests.
* ld-x86-64/tlspic1.s: Add -mcmodel=large -fpic TLS GD and LD
sequences.
* ld-x86-64/tlspic.dd: Adjusted.
* ld-x86-64/tlspic.rd: Adjusted.
* ld-x86-64/tlspic-nacl.rd: Adjusted.
* ld-x86-64/tlsld3.dd: New test.
* ld-x86-64/tlsld3.s: New file.
* ld-x86-64/tlsgd7.dd: New test.
* ld-x86-64/tlsgd7.s: New file.
* ld-x86-64/tlsgd8.dd: New test.
* ld-x86-64/tlsgd8.s: New file.
Diffstat (limited to 'ld/testsuite/ld-x86-64/tlsgd7.s')
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsgd7.s | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/tlsgd7.s b/ld/testsuite/ld-x86-64/tlsgd7.s new file mode 100644 index 0000000..cf48930 --- /dev/null +++ b/ld/testsuite/ld-x86-64/tlsgd7.s @@ -0,0 +1,25 @@ + .text + .globl _start +_start: +1: movabsq $_GLOBAL_OFFSET_TABLE_-1b, %r11 + pushq %rbx + pushq %rbx + leaq 1b(%rip), %rbx + addq %r11, %rbx + + /* GD, -mcmodel=large */ + leaq foo@tlsgd(%rip), %rdi + movabsq $__tls_get_addr@pltoff, %rax + addq %rbx, %rax + call *%rax + + popq %rbx + popq %rbx + ret + .globl foo + .section .tdata,"awT",@progbits + .align 4 + .type foo, @object + .size foo, 4 +foo: + .long 100 |