You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
806 B
29 lines
806 B
# REQUIRES: x86
|
|
# RUN: rm -rf %t
|
|
# RUN: split-file %s %t
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o
|
|
# RUN: llvm-ar crs %t/foo.a %t/foo.o
|
|
# RUN: not %lld -o /dev/null %t/main.o 2>&1 | \
|
|
# RUN: FileCheck %s -DSYM=_foo -DFILENAME=%t/main.o
|
|
# RUN: not %lld -o /dev/null %t/main.o %t/foo.a 2>&1 | \
|
|
# RUN: FileCheck %s -DSYM=_bar -DFILENAME='foo.a(foo.o)'
|
|
# RUN: not %lld -o /dev/null %t/main.o -force_load %t/foo.a 2>&1 | \
|
|
# RUN: FileCheck %s -DSYM=_bar -DFILENAME='foo.a(foo.o)'
|
|
# CHECK: error: undefined symbol [[SYM]], referenced from [[FILENAME]]
|
|
|
|
#--- foo.s
|
|
.globl _foo
|
|
.text
|
|
_foo:
|
|
callq _bar
|
|
retq
|
|
|
|
#--- main.s
|
|
.globl _main
|
|
.text
|
|
_main:
|
|
callq _foo
|
|
movq $0, %rax
|
|
retq
|