mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
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.
26 lines
391 B
ArmAsm
26 lines
391 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
|
|
.globl foo
|
|
.section .tdata,"awT",@progbits
|
|
.align 4
|
|
.type foo, @object
|
|
.size foo, 4
|
|
foo:
|
|
.long 100
|