[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / lld / test / ELF / dynamic.s
blob9ef8ffae75ff455e947b73d873455cd3d7422445
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4 ## Check that _DYNAMIC symbol is created when creating dynamic output,
5 ## and has hidden visibility and address equal to .dynamic section.
6 # RUN: ld.lld -shared %t.o -o %t.so
7 # RUN: llvm-readobj --sections --symbols %t.so | FileCheck %s
8 # RUN: ld.lld -pie %t.o -o %t
9 # RUN: llvm-readobj --sections --symbols %t | FileCheck %s
11 # CHECK: Section {
12 # CHECK: Index: 5
13 # CHECK: Name: .dynamic
14 # CHECK-NEXT: Type: SHT_DYNAMIC
15 # CHECK-NEXT: Flags [
16 # CHECK-NEXT: SHF_ALLOC
17 # CHECK-NEXT: SHF_WRITE
18 # CHECK-NEXT: ]
19 # CHECK-NEXT: Address: 0x[[ADDR:.*]]
20 # CHECK: Symbols [
21 # CHECK: Symbol {
22 # CHECK: Name: _DYNAMIC
23 # CHECK-NEXT: Value: 0x[[ADDR]]
24 # CHECK-NEXT: Size: 0
25 # CHECK-NEXT: Binding: Local
26 # CHECK-NEXT: Type: None
27 # CHECK-NEXT: Other [ (0x2)
28 # CHECK-NEXT: STV_HIDDEN
29 # CHECK-NEXT: ]
30 # CHECK-NEXT: Section: .dynamic
31 # CHECK-NEXT: }
33 # RUN: ld.lld %t.o -o %t2
34 # RUN: llvm-readobj --sections --symbols %t2 | FileCheck /dev/null --implicit-check-not=_DYNAMIC
36 .globl _start
37 _start: