1// RUN: llvm-mc -triple x86_64-apple-darwin -filetype=obj %s -o - | llvm-readobj -t | FileCheck %s 2 3// CHECK: Symbol { 4// CHECK: Name: _foo 5// CHECK: Flags [ (0x0) 6// CHECK: Value: 0x0 7 8// CHECK: Symbol { 9// CHECK: Name: _bar 10// CHECK: Flags [ (0x0) 11// CHECK: Value: 0x0 12 13// CHECK: Symbol { 14// CHECK: Name: _baz 15// CHECK: Flags [ (0x200) 16// CHECK: Value: 0x1 17 18// CHECK: Symbol { 19// CHECK: Name: _offsetsym0 20// CHECK: Flags [ (0x0) 21// CHECK: Value: 0x8 22 23// CHECK: Symbol { 24// CHECK: Name: _offsetsym1 25// CHECK: Flags [ (0x200) 26// CHECK: Value: 0xC 27 28// CHECK: Symbol { 29// CHECK: Name: _offsetsym2 30// CHECK: Flags [ (0x200) 31// CHECK: Value: 0x10 32 33// CHECK: Symbol { 34// CHECK: Name: _offsetsym3 35// CHECK: Flags [ (0x200) 36// CHECK: Value: 0x20 37 38// CHECK: Symbol { 39// CHECK: Symbol { 40// CHECK: Symbol { 41 42 .section __TEXT,__text,regular,pure_instructions 43 44_foo: 45_bar = _foo 46 nop 47_baz = . 48 49 .comm _g0,4,2 50 51 .section __DATA,__data 52 .globl _s0 53 .align 3 54_s0: 55 .long 31 56 .long 32 57 .quad _g0 58 59 .globl _s1 60 .align 3 61_s1: 62 .long 33 63 .long 34 64 .quad _g0 65 66 .globl _offsetsym0 67 _offsetsym0 = _s0 68 .globl _offsetsym1 69 .alt_entry _offsetsym1 70 _offsetsym1 = _s0+4 71 .globl _offsetsym2 72 .alt_entry _offsetsym2 73 _offsetsym2 = _s0+8 74 .globl _offsetsym3 75 .alt_entry _offsetsym3 76 _offsetsym3 = _s1+8 77 .subsections_via_symbols 78