aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/progname.s
blob: 10cbf177c69b102067ca5131460c11f0eab97986 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
// RUN: echo .global __progname > %t2.s
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %t2.s -o %t2.o
// RUN: ld.lld -shared %t2.o -o %t2.so
// RUN: ld.lld -o %t %t.o %t2.so
// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s


// Inputs/progname-ver.so consists of the assembly file
//
// .global bar
// bar:
// .quad __progname
//
// linked into a library  with the version script
//
// VER_1 {
//  global:
//  bar;
// };
//
// We should create it with lld itself once we it supports that.

// RUN: ld.lld -o %t %t.o %p/Inputs/progname-ver.so
// RUN: llvm-readobj -dyn-symbols %t | FileCheck %s

// CHECK:      Name:     __progname@
// CHECK-NEXT: Value:    0x11000
// CHECK-NEXT: Size:     0
// CHECK-NEXT: Binding:  Global (0x1)
// CHECK-NEXT: Type:     None (0x0)
// CHECK-NEXT: Other:    0
// CHECK-NEXT: Section:  .text
// CHECK-NEXT: }

.global _start, __progname
_start:
__progname:
  nop