29 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin19.0.0 %t/test.s -o %t/test.o5 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.o8# RUN: llvm-objdump --macho --syms %t/test | FileCheck %s9 10## Check that we still raise an error when using regular undefined symbol11## treatment.12# RUN: not %lld -lSystem -dylib --icf=all -o /dev/null %t/test.o 2>&1 | \13# RUN: FileCheck %s --check-prefix=ERR14 15# CHECK: [[#%x,ADDR:]] l F __TEXT,__text _foo16# CHECK: [[#ADDR]] l F __TEXT,__text _bar17 18# ERR: error: undefined symbol: _undef19 20#--- test.s21 22.subsections_via_symbols23 24_foo:25 callq _undef + 126 27_bar:28 callq _undef + 129