b474a2022d
bfd/ * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error for TLS_TPREL_HI16(/LO16) relocations in shared library. ld/ * testsuite/ld-mips-elf/pic-reloc-5.s: Add tests for %tprel_hi and %tprel_lo relocations. * testsuite/ld-mips-elf/pic-reloc-6.s: Likewise. * testsuite/ld-mips-elf/pic-reloc-5.d: Update accordingly. * testsuite/ld-mips-elf/pic-reloc-6.d: Likewise. * testsuite/ld-mips-elf/pic-reloc-tls.ld: New test linker script file.
23 lines
392 B
ArmAsm
23 lines
392 B
ArmAsm
.text
|
|
.globl foo
|
|
.globl global_tls
|
|
.ent foo
|
|
foo:
|
|
$LCL:
|
|
li $2, %hi($LCL)
|
|
addiu $2, %lo($LCL)
|
|
li $2, %hi(bar)
|
|
addiu $2, %lo(bar)
|
|
li $a0,%tprel_hi(local_tls)
|
|
lw $a1,%tprel_lo(local_tls)($a0)
|
|
li $a0,%tprel_hi(global_tls)
|
|
lw $a1,%tprel_lo(global_tls)($a0)
|
|
.end foo
|
|
.type local_tls,%object
|
|
.type global_tls,%object
|
|
.section .tbss,"awT",@nobits
|
|
local_tls:
|
|
.word
|
|
global_tls:
|
|
.word
|