1 // RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
3 // Test case for rdar://9356266
5 // This tests that this expression does not cause a crash and produces these
6 // four relocation entries:
7 // Relocation information (__DATA,__data) 4 entries
8 // address pcrel length extern type scattered symbolnum/value
9 // 00000004 False long False SUB False 2 (__DATA,__data)
10 // 00000004 False long False UNSIGND False 2 (__DATA,__data)
11 // 00000000 False long False SUB False 2 (__DATA,__data)
12 // 00000000 False long False UNSIGND False 2 (__DATA,__data)
17 // This was working fine
22 // But this was causing a crash
25 // CHECK: ('_relocations', [
26 // CHECK: # Relocation 0
27 // CHECK: (('word-0', 0x4),
28 // CHECK: ('word-1', 0x54000002)),
29 // CHECK: # Relocation 1
30 // CHECK: (('word-0', 0x4),
31 // CHECK: ('word-1', 0x4000002)),
32 // CHECK: # Relocation 2
33 // CHECK: (('word-0', 0x0),
34 // CHECK: ('word-1', 0x54000002)),
35 // CHECK: # Relocation 3
36 // CHECK: (('word-0', 0x0),
37 // CHECK: ('word-1', 0x4000002)),