2 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/test.s -o %t/test.o
6 ## Check that we correctly dedup sections that reference dynamic-lookup symbols.
7 # RUN: %lld -lSystem -dylib --icf=all -undefined dynamic_lookup -o %t/test %t/test.o
8 # RUN: llvm-objdump --macho --syms %t/test | FileCheck %s
10 ## Check that we still raise an error when using regular undefined symbol
12 # RUN: not %lld -lSystem -dylib --icf=all -o /dev/null %t/test.o 2>&1 | \
13 # RUN: FileCheck %s --check-prefix=ERR
15 # CHECK: [[#%x,ADDR:]] l F __TEXT,__text _foo
16 # CHECK: [[#ADDR]] l F __TEXT,__text _bar
18 # ERR: error: undefined symbol: _undef
22 .subsections_via_symbols