2016-08-12 02:08:59 +08:00
|
|
|
# RUN: lld -flavor darwin -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
|
|
|
|
# RUN: lld -flavor darwin -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
|
|
|
|
# RUN: lld -flavor darwin -arch x86_64 -dead_strip %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t2.dylib -print_atoms | FileCheck -check-prefix=CHECK2 %s
|
2016-01-23 05:13:24 +08:00
|
|
|
|
2016-08-12 05:27:18 +08:00
|
|
|
# RUN: lld -flavor darwin -arch x86_64 -r %s -dylib %p/Inputs/x86_64/libSystem.yaml -o %t3.o
|
|
|
|
# RUN: llvm-nm -m %t3.o | FileCheck -check-prefix=RELOCATABLE_SYMBOLS %s
|
|
|
|
|
2016-01-23 05:13:24 +08:00
|
|
|
#
|
|
|
|
# Test that -export_dynamic -dead-strip from removing globals.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
defined-atoms:
|
|
|
|
- name: def
|
|
|
|
scope: global
|
|
|
|
dead-strip: never
|
|
|
|
- name: dead
|
|
|
|
scope: global
|
|
|
|
shared-library-atoms:
|
|
|
|
- name: dyld_stub_binder
|
|
|
|
load-name: /usr/lib/libSystem.B.dylib
|
|
|
|
type: unknown
|
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK1: name: def
|
|
|
|
# CHECK1: name: dead
|
|
|
|
|
|
|
|
# CHECK2: name: def
|
|
|
|
# CHECK2-NOT: name: dead
|
|
|
|
|
2016-08-12 05:27:18 +08:00
|
|
|
# RELOCATABLE_SYMBOLS: external def
|