brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 9ef8ffa Raw
38 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3 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.so7# RUN: llvm-readobj --sections --symbols %t.so | FileCheck %s8# RUN: ld.lld -pie %t.o -o %t9# RUN: llvm-readobj --sections --symbols %t | FileCheck %s10 11# CHECK:      Section {12# CHECK:        Index: 513# CHECK:        Name: .dynamic14# CHECK-NEXT:   Type: SHT_DYNAMIC15# CHECK-NEXT:   Flags [16# CHECK-NEXT:     SHF_ALLOC17# CHECK-NEXT:     SHF_WRITE18# CHECK-NEXT:   ]19# CHECK-NEXT:   Address: 0x[[ADDR:.*]]20# CHECK:      Symbols [21# CHECK:        Symbol {22# CHECK:          Name: _DYNAMIC23# CHECK-NEXT:     Value: 0x[[ADDR]]24# CHECK-NEXT:     Size: 025# CHECK-NEXT:     Binding: Local26# CHECK-NEXT:     Type: None27# CHECK-NEXT:     Other [ (0x2)28# CHECK-NEXT:       STV_HIDDEN29# CHECK-NEXT:     ]30# CHECK-NEXT:     Section: .dynamic31# CHECK-NEXT:   }32 33# RUN: ld.lld %t.o -o %t234# RUN: llvm-readobj --sections --symbols %t2 | FileCheck /dev/null --implicit-check-not=_DYNAMIC35 36.globl _start37_start:38