53 lines · plain
1# REQUIRES: x862 3## This test verifies that the paths in -filelist get processed in command-line4## order.5 6# RUN: rm -rf %t; split-file %s %t && cd %t7# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/first.s -o %t/first.o8# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/second.s -o %t/second.o9# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o10 11# FIRST: __TEXT,first _foo12# SECOND: __TEXT,second _foo13 14# RUN: echo "%t/first.o" > filelist15# RUN: echo "%t/second.o" >> filelist16# RUN: %lld -filelist filelist %t/test.o -o %t/test17# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST18 19# RUN: echo "%t/second.o" > filelist20# RUN: echo "%t/first.o" >> filelist21# RUN: %lld -filelist filelist %t/test.o -o %t/test22# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND23 24# RUN: echo "%t/first.o" > filelist25# RUN: %lld -filelist filelist %t/second.o %t/test.o -o %t/test26# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST27# RUN: %lld %t/second.o -filelist filelist %t/test.o -o %t/test28# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND29 30# RUN: echo "%t/first.o" > filelist-131# RUN: echo "%t/second.o" > filelist-232# RUN: %lld -filelist filelist-1 -filelist filelist-2 %t/test.o -o %t/test33# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST34# RUN: %lld -filelist filelist-2 -filelist filelist-1 %t/test.o -o %t/test35# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND36 37#--- first.s38.globl _foo39.weak_definition _foo40.section __TEXT,first41_foo:42 43#--- second.s44.globl _foo45.weak_definition _foo46.section __TEXT,second47_foo:48 49#--- test.s50.globl _main51_main:52 ret53