Home | History | Annotate | Download | only in ELF
      1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
      2 
      3 // Test that we don't regress on the size of the line info section. We used
      4 // to handle negative line diffs incorrectly which manifested as very
      5 // large integers being passed to DW_LNS_advance_line.
      6 
      7 // FIXME: This size is the same as gnu as, but we can probably do a bit better.
      8 // FIXME2: We need a debug_line dumper so that we can test the actual contents.
      9 
     10 // CHECK:        Section {
     11 // CHECK:          Index: 4
     12 // CHECK-NEXT:     Name: .debug_line
     13 // CHECK-NEXT:     Type: SHT_PROGBITS
     14 // CHECK-NEXT:     Flags [
     15 // CHECK-NEXT:     ]
     16 // CHECK-NEXT:     Address: 0x0
     17 // CHECK-NEXT:     Offset: 0x44
     18 // CHECK-NEXT:     Size: 61
     19 // CHECK-NEXT:     Link: 0
     20 // CHECK-NEXT:     Info: 0
     21 // CHECK-NEXT:     AddressAlignment: 1
     22 // CHECK-NEXT:     EntrySize: 0
     23 // CHECK-NEXT:   }
     24 
     25 	.section	.debug_line,"",@progbits
     26 	.text
     27 foo:
     28 	.file 1 "Driver.ii"
     29 	.loc 1 2 0
     30         nop
     31 	.loc 1 4 0
     32         nop
     33 	.loc 1 3 0
     34         nop
     35