[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / archive-fetch.s
blobcefbc0561a9ad96b1eba875779b16ce184dafca8
1 # REQUIRES: x86
3 # We have a code in LLD that prevents fetching the same object from archive file twice.
4 # This test triggers that code, without it we would fail to link output.
6 # RUN: echo '.globl foo, bar; foo:' | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %tfoo.o
7 # RUN: echo '.globl foo, bar; bar:' | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %tbar.o
8 # RUN: rm -f %t.a
9 # RUN: llvm-ar rcs %t.a %tfoo.o %tbar.o
11 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
12 # RUN: ld.lld %t.a %t.o -o %t
13 # RUN: llvm-nm %t | FileCheck %s
15 # RUN: ld.lld -shared %t.o -o %t.so
16 # RUN: ld.lld %t.a %t.so -o %t
17 # RUN: llvm-nm %t | FileCheck %s
19 # CHECK: T foo
21 _start:
22 callq foo