[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / startstop-shared.s
blob02b4d0625be203c38452e2a592b3a23d52340a91
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 // RUN: ld.lld %t.o -o %t.so -shared
4 // RUN: llvm-readobj -r --symbols %t.so | FileCheck %s
6 .data
7 .quad __start_foo
8 .section foo,"aw"
10 .hidden __start_bar
11 .quad __start_bar
12 .section bar,"a"
14 // CHECK: Relocations [
15 // CHECK-NEXT: Section {{.*}} .rela.dyn {
16 // CHECK-NEXT: R_X86_64_RELATIVE
17 // CHECK-NEXT: R_X86_64_RELATIVE
18 // CHECK-NEXT: }
19 // CHECK-NEXT: ]
21 // Test that we are able to hide the symbol.
22 // By default the symbol is protected.
24 // CHECK: Name: __start_bar
25 // CHECK-NEXT: Value:
26 // CHECK-NEXT: Size:
27 // CHECK-NEXT: Binding: Local
28 // CHECK-NEXT: Type: None
29 // CHECK-NEXT: Other [
30 // CHECK-NEXT: STV_HIDDEN
31 // CHECK-NEXT: ]
33 // CHECK: Name: __start_foo
34 // CHECK-NEXT: Value:
35 // CHECK-NEXT: Size:
36 // CHECK-NEXT: Binding: Global
37 // CHECK-NEXT: Type: None
38 // CHECK-NEXT: Other [
39 // CHECK-NEXT: STV_PROTECTED
40 // CHECK-NEXT: ]