Browse Source
Add support for TLS LE symbol with addend, such as: lu12i.w $t0, %le_hi20(a + 0x8) ori $t0, $t0, %le_lo12(a + 0x8)users/ARM/gcs-binutils-gdb-master
committed by
liuzhensong
4 changed files with 35 additions and 3 deletions
@ -0,0 +1,14 @@ |
|||
#ld: --no-relax |
|||
#objdump: -d |
|||
|
|||
.*:[ ]+file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
[ ]*00000001200000e8 <_start>: |
|||
[ ]+1200000e8:[ ]+14000004[ ]+lu12i.w[ ]+\$a0, 0 |
|||
[ ]+1200000ec:[ ]+03802085[ ]+ori[ ]+\$a1, \$a0, 0x8 |
|||
[ ]+1200000f0:[ ]+14000004[ ]+lu12i.w[ ]+\$a0, 0 |
|||
[ ]+1200000f4:[ ]+02c02085[ ]+addi.d[ ]+\$a1, \$a0, 8 |
|||
[ ]+1200000f8:[ ]+4c000020[ ]+ret |
|||
@ -0,0 +1,18 @@ |
|||
# Support for TLS LE symbols with addend |
|||
.text |
|||
.globl a |
|||
.section .tdata,"awT",@progbits |
|||
.align 2 |
|||
.type a, @object |
|||
.size a, 4 |
|||
a: |
|||
.word 123 |
|||
|
|||
.text |
|||
.global _start |
|||
_start: |
|||
lu12i.w $r4,%le_hi20(a + 0x8) |
|||
ori $r5,$r4,%le_lo12(a + 0x8) |
|||
lu12i.w $r4,%le_hi20_r(a + 0x8) |
|||
addi.d $r5,$r4,%le_lo12_r(a + 0x8) |
|||
jr $ra |
|||
Loading…
Reference in new issue