brintos

brintos / llvm-project-archived public Read only

0
0
Text · 910 B · a77cc82 Raw
37 lines · plain
1# REQUIRES: hexagon2# RUN: rm -rf %t && split-file %s %t && cd %t3# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf a.s -o a.o4# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf b.s -o b.o5# RUN: ld.lld -shared a.o b.o -o out.so6# RUN: llvm-readobj -r out.so | FileCheck --check-prefix=RELOC %s7 8#--- a.s9.globl _start10.type _start, @function11 12_start:13  r2 = add(pc,##_GLOBAL_OFFSET_TABLE_@PCREL)14  r0 = add(r2,##tls_var@GDGOT)15  call tls_var@GDPLT16  jumpr r3117 18.section .tdata,"awT",@progbits19.globl tls_var20.type tls_var, @object21tls_var:22  .word 0x123423 24#--- b.s25.globl other_func26.type other_func, @function27 28other_func:29  ## Direct call to __tls_get_addr - this creates another path that may30  ## try to allocate auxiliary data for the same symbol31  call __tls_get_addr32  jumpr r3133 34# RELOC:      Section ({{.*}}) .rela.plt {35# RELOC:        R_HEX_JMP_SLOT __tls_get_addr 0x036# RELOC:      }37