5c98a14e1e
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.
19 lines
286 B
ArmAsm
19 lines
286 B
ArmAsm
.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
|