Home | History | Annotate | Download | only in ARM
      1 ; Test the sh_link in Elf32_Shdr.
      2 
      3 ; The .ARM.exidx section should be linked with corresponding text section.
      4 ; The sh_link in Elf32_Shdr should be filled with the section index of
      5 ; the text section.
      6 
      7 ; RUN: llc -mtriple arm-unknown-linux-gnueabi \
      8 ; RUN:     -arm-enable-ehabi -arm-enable-ehabi-descriptors \
      9 ; RUN:     -filetype=obj -o - %s \
     10 ; RUN:   | elf-dump --dump-section-data \
     11 ; RUN:   | FileCheck %s
     12 
     13 define void @test1() nounwind {
     14 entry:
     15   ret void
     16 }
     17 
     18 define void @test2() nounwind section ".test_section" {
     19 entry:
     20   ret void
     21 }
     22 
     23 ; CHECK: # Section 1
     24 ; CHECK-NEXT: (('sh_name', 0x00000010) # '.text'
     25 
     26 ; CHECK:      (('sh_name', 0x00000005) # '.ARM.exidx'
     27 ; CHECK-NEXT:  ('sh_type', 0x70000001)
     28 ; CHECK-NEXT:  ('sh_flags', 0x00000082)
     29 ; CHECK-NEXT:  ('sh_addr', 0x00000000)
     30 ; CHECK-NEXT:  ('sh_offset', 0x0000005c)
     31 ; CHECK-NEXT:  ('sh_size', 0x00000008)
     32 ; CHECK-NEXT:  ('sh_link',  0x00000001)
     33 ; CHECK-NEXT:  ('sh_info',  0x00000000)
     34 ; CHECK-NEXT:  ('sh_addralign',  0x00000004)
     35 
     36 ; CHECK: # Section 7
     37 ; CHECK-NEXT: (('sh_name', 0x00000039) # '.test_section'
     38 
     39 ; CHECK:      (('sh_name', 0x0000002f) # '.ARM.exidx.test_section'
     40 ; CHECK-NEXT:  ('sh_type', 0x70000001)
     41 ; CHECK-NEXT:  ('sh_flags', 0x00000082)
     42 ; CHECK-NEXT:  ('sh_addr', 0x00000000)
     43 ; CHECK-NEXT:  ('sh_offset', 0x00000068)
     44 ; CHECK-NEXT:  ('sh_size', 0x00000008)
     45 ; CHECK-NEXT:  ('sh_link',  0x00000007)
     46 ; CHECK-NEXT:  ('sh_info',  0x00000000)
     47 ; CHECK-NEXT:  ('sh_addralign',  0x00000004)
     48