1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=i686-unknown-cloudabi %s -o %t.o
3// RUN: ld.lld --export-dynamic %t.o -o %t
4// RUN: llvm-readobj --dyn-syms %t | FileCheck %s
5
6// Ensure that a dynamic symbol table is present when --export-dynamic
7// is passed in, even when creating statically linked executables.
8//
9// CHECK:      DynamicSymbols [
10// CHECK-NEXT:   Symbol {
11// CHECK-NEXT:     Name:
12// CHECK-NEXT:     Value: 0x0
13// CHECK-NEXT:     Size: 0
14// CHECK-NEXT:     Binding: Local
15// CHECK-NEXT:     Type: None
16// CHECK-NEXT:     Other: 0
17// CHECK-NEXT:     Section: Undefined
18// CHECK-NEXT:   }
19// CHECK-NEXT:   Symbol {
20// CHECK-NEXT:     Name: _start
21// CHECK-NEXT:     Value:
22// CHECK-NEXT:     Size: 0
23// CHECK-NEXT:     Binding: Global
24// CHECK-NEXT:     Type: None
25// CHECK-NEXT:     Other: 0
26// CHECK-NEXT:     Section: .text
27// CHECK-NEXT:   }
28// CHECK-NEXT: ]
29
30.global _start
31_start:
32  ret
33