Home | History | Annotate | Download | only in PowerPC
      1 ;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj %s -o - | \
      2 ;; RUN: elf-dump --dump-section-data | FileCheck %s
      3 
      4 ;; FIXME: this file should be in .s form, change when asm parser is available.
      5 
      6 @t = thread_local global i32 0, align 4
      7 
      8 define i32* @f() nounwind {
      9 entry:
     10   ret i32* @t
     11 }
     12 
     13 ;; Check for a pair of R_PPC64_TPREL16_HA / R_PPC64_TPREL16_LO relocs
     14 ;; against the thread-local symbol 't'.
     15 ;; CHECK:       '.rela.text'
     16 ;; CHECK:       Relocation 0
     17 ;; CHECK-NEXT:  'r_offset',
     18 ;; CHECK-NEXT:  'r_sym', 0x00000008
     19 ;; CHECK-NEXT:  'r_type', 0x00000048
     20 ;; CHECK:       Relocation 1
     21 ;; CHECK-NEXT:  'r_offset',
     22 ;; CHECK-NEXT:  'r_sym', 0x00000008
     23 ;; CHECK-NEXT:  'r_type', 0x00000046
     24 
     25 ;; Check that we got the correct symbol.
     26 ;; CHECK:       Symbol 8
     27 ;; CHECK-NEXT:  't'
     28 
     29