• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: x86
2; RUN: llvm-as %s -o %t.o
3; RUN: echo ".global __progname; .data; .dc.a __progname" > %t2.s
4; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t2.s -o %t2.o
5; RUN: ld.lld -shared %t2.o -o %t2.so
6; RUN: ld.lld -o %t %t.o %t2.so
7; RUN: llvm-readobj --dyn-syms %t | FileCheck %s
8
9; CHECK:      Name:     __progname
10; CHECK-NEXT: Value:
11; CHECK-NEXT: Size:     1
12; CHECK-NEXT: Binding:  Global (0x1)
13; CHECK-NEXT: Type:     Function
14; CHECK-NEXT: Other:    0
15; CHECK-NEXT: Section:  .text
16; CHECK-NEXT: }
17
18target triple = "x86_64-unknown-linux-gnu"
19target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
20
21define void @_start() {
22  ret void
23}
24
25define void @__progname() {
26  ret void
27}
28