Home | History | Annotate | Download | only in DebugInfo
      1 # Check that relocations get applied
      2 RUN: llvm-dwarfdump %p/Inputs/test-simple-macho.o | FileCheck %s
      3 RUN: llvm-dwarfdump %p/Inputs/test-multiple-macho.o | FileCheck %s
      4 RUN: llvm-rtdyld -printline %p/Inputs/test-multiple-macho.o | FileCheck %s
      5 RUN: llvm-rtdyld -printobjline %p/Inputs/test-multiple-macho.o | FileCheck %s
      6 
      7 CHECK-NOT: error: failed to compute relocation: X86_64_RELOC_UNSIGNED
      8 
      9 # Check that relocations get applied correctly
     10 RUN: llvm-rtdyld -printobjline %p/Inputs/test-simple-macho.o \
     11 RUN:   | FileCheck %s -check-prefix TEST_SIMPLE
     12 RUN: llvm-rtdyld -printline %p/Inputs/test-simple-macho.o \
     13 RUN:   | FileCheck %s -check-prefix TEST_SIMPLE
     14 RUN: llvm-rtdyld -printobjline %p/Inputs/test-multiple-macho.o \
     15 RUN:   | FileCheck %s -check-prefix TEST_MULTIPLE
     16 RUN: llvm-rtdyld -printline %p/Inputs/test-multiple-macho.o \
     17 RUN:   | FileCheck %s -check-prefix TEST_MULTIPLE
     18 
     19 TEST_SIMPLE:      Function: _foo, Size = 11
     20 TEST_SIMPLE-NEXT:  Line info @ 0: simple.c, line:1
     21 TEST_SIMPLE-NEXT:  Line info @ 7: simple.c, line:2
     22 TEST_SIMPLE-NOT:   Line info @ 11: simple.c, line:2
     23 
     24 TEST_MULTIPLE:      Function: _bar, Size = 48
     25 TEST_MULTIPLE-NEXT:   Line info @ 0: multiple.c, line:5
     26 TEST_MULTIPLE-NEXT:   Line info @ 7: multiple.c, line:6
     27 TEST_MULTIPLE-NEXT:   Line info @ 16: multiple.c, line:9
     28 TEST_MULTIPLE-NEXT:   Line info @ 21: multiple.c, line:9
     29 TEST_MULTIPLE-NEXT:   Line info @ 26: multiple.c, line:7
     30 TEST_MULTIPLE-NEXT:   Line info @ 33: multiple.c, line:10
     31 TEST_MULTIPLE-NOT:    Line info @ 48: multiple.c, line:12
     32 TEST_MULTIPLE-NEXT: Function: _foo, Size = 16
     33 TEST_MULTIPLE-NEXT:   Line info @ 0: multiple.c, line:1
     34 TEST_MULTIPLE-NEXT:   Line info @ 7: multiple.c, line:2
     35 TEST_MULTIPLE-NOT:    Line info @ 16: multiple.c, line:5
     36 TEST_MULTIPLE-NEXT: Function: _fubar, Size = 46
     37 TEST_MULTIPLE-NEXT:   Line info @ 0: multiple.c, line:12
     38 TEST_MULTIPLE-NEXT:   Line info @ 7: multiple.c, line:13
     39 TEST_MULTIPLE-NEXT:   Line info @ 12: multiple.c, line:17
     40 TEST_MULTIPLE-NEXT:   Line info @ 25: multiple.c, line:15
     41 TEST_MULTIPLE-NEXT:   Line info @ 34: multiple.c, line:19
     42 TEST_MULTIPLE-NEXT:   Line info @ 41: multiple.c, line:21
     43 TEST_MULTIPLE-NOT:    Line info @ 46: multiple.c, line:21
     44