• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3## This test verifies that the paths in -filelist get processed in command-line
4## order.
5
6# RUN: mkdir -p %t
7# RUN: echo ".globl _foo; .weak_definition _foo; .section __TEXT,first; _foo:" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/first.o
8# RUN: echo ".globl _foo; .weak_definition _foo; .section __TEXT,second; _foo:" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/second.o
9# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o
10
11# FIRST: __TEXT,first _foo
12# SECOND: __TEXT,second _foo
13
14# RUN: echo "%t/first.o" > filelist
15# RUN: echo "%t/second.o" >> filelist
16# RUN: %lld -filelist filelist %t/test.o -o %t/test
17# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
18
19# RUN: echo "%t/second.o" > filelist
20# RUN: echo "%t/first.o" >> filelist
21# RUN: %lld -filelist filelist %t/test.o -o %t/test
22# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
23
24# RUN: echo "%t/first.o" > filelist
25# RUN: %lld -filelist filelist %t/second.o %t/test.o -o %t/test
26# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
27# RUN: %lld %t/second.o -filelist filelist %t/test.o -o %t/test
28# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
29
30# RUN: echo "%t/first.o" > filelist-1
31# RUN: echo "%t/second.o" > filelist-2
32# RUN: %lld -filelist filelist-1 -filelist filelist-2 %t/test.o -o %t/test
33# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=FIRST
34# RUN: %lld -filelist filelist-2 -filelist filelist-1 %t/test.o -o %t/test
35# RUN: llvm-objdump --syms %t/test | FileCheck %s --check-prefix=SECOND
36
37.globl _main
38
39_main:
40  ret
41