1# RUN: ld64.lld -arch x86_64 -dead_strip -export_dynamic %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s 2# RUN: ld64.lld -arch x86_64 -export_dynamic -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t.dylib -print_atoms | FileCheck -check-prefix=CHECK1 %s 3# RUN: ld64.lld -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s 4 5# RUN: ld64.lld -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o 6# RUN: llvm-nm -m %t3.o | FileCheck -check-prefix=RELOCATABLE_SYMBOLS %s 7 8# 9# Test that -export_dynamic -dead-strip from removing globals. 10# 11 12--- 13defined-atoms: 14 - name: def 15 scope: global 16 dead-strip: never 17 - name: dead 18 scope: global 19shared-library-atoms: 20 - name: dyld_stub_binder 21 load-name: /usr/lib/libSystem.B.dylib 22 type: unknown 23... 24 25# CHECK1: name: def 26# CHECK1: name: dead 27 28# CHECK2: name: def 29# CHECK2-NOT: name: dead 30 31# RELOCATABLE_SYMBOLS: external def 32