1# RUN: ld64.lld -arch armv7 %s -r -print_atoms -o %t | FileCheck %s 2# 3# Test that assembly written without .subsections_via_symbols is parsed so 4# that atoms are non-dead-strip and there is a layout-after references 5# chaining atoms together. 6# 7 8--- !mach-o 9arch: armv7 10file-type: MH_OBJECT 11flags: [ ] 12has-UUID: false 13OS: unknown 14sections: 15 - segment: __TEXT 16 section: __text 17 type: S_REGULAR 18 attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ] 19 alignment: 2 20 address: 0x0000000000000000 21 content: [ 0x04, 0x10, 0x9F, 0xE5, 0x04, 0x20, 0x9F, 0xE5, 22 0x1E, 0xFF, 0x2F, 0xE1, 0x78, 0x56, 0x34, 0x12, 23 0x21, 0x43, 0x65, 0x87 ] 24local-symbols: 25 - name: constants1 26 type: N_SECT 27 sect: 1 28 value: 0x000000000000000C 29 - name: constants2 30 type: N_SECT 31 sect: 1 32 value: 0x0000000000000010 33global-symbols: 34 - name: _foo 35 type: N_SECT 36 scope: [ N_EXT ] 37 sect: 1 38 value: 0x0000000000000000 39... 40 41 42# CHECK:defined-atoms: 43# CHECK: - name: _foo 44# CHECK: scope: global 45# CHECK: content: [ 04, 10, 9F, E5, 04, 20, 9F, E5, 1E, FF, 2F, E1 ] 46# CHECK: dead-strip: never 47# CHECK: references: 48# CHECK: - kind: layout-after 49# CHECK: offset: 0 50# CHECK: target: constants1 51# CHECK: - name: constants1 52# CHECK: content: [ 78, 56, 34, 12 ] 53# CHECK: dead-strip: never 54# CHECK: references: 55# CHECK: - kind: layout-after 56# CHECK: offset: 0 57# CHECK: target: constants2 58# CHECK: - name: constants2 59# CHECK: content: [ 21, 43, 65, 87 ] 60# CHECK: dead-strip: never 61