1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t 3# RUN: echo "bar" > %t_retain.txt 4# RUN: echo "foo" >> %t_retain.txt 5# RUN: ld.lld --hash-style=sysv -shared --retain-symbols-file=%t_retain.txt %t -o %t2 6# RUN: llvm-readobj --dyn-symbols %t2 | FileCheck %s 7 8## Check separate form. 9# RUN: ld.lld --hash-style=sysv -shared --retain-symbols-file %t_retain.txt %t -o %t2 10# RUN: llvm-readobj --dyn-symbols %t2 | FileCheck %s 11 12# CHECK: DynamicSymbols [ 13# CHECK-NEXT: Symbol { 14# CHECK-NEXT: Name: 15# CHECK-NEXT: Value: 16# CHECK-NEXT: Size: 17# CHECK-NEXT: Binding: 18# CHECK-NEXT: Type: 19# CHECK-NEXT: Other: 20# CHECK-NEXT: Section: 21# CHECK-NEXT: } 22# CHECK-NEXT: Symbol { 23# CHECK-NEXT: Name: bar 24# CHECK-NEXT: Value: 25# CHECK-NEXT: Size: 26# CHECK-NEXT: Binding: Global 27# CHECK-NEXT: Type: 28# CHECK-NEXT: Other: 29# CHECK-NEXT: Section: .text 30# CHECK-NEXT: } 31# CHECK-NEXT: Symbol { 32# CHECK-NEXT: Name: foo 33# CHECK-NEXT: Value: 34# CHECK-NEXT: Size: 35# CHECK-NEXT: Binding: Global 36# CHECK-NEXT: Type: 37# CHECK-NEXT: Other: 38# CHECK-NEXT: Section: .text 39# CHECK-NEXT: } 40# CHECK-NEXT: Symbol { 41# CHECK-NEXT: Name: und 42# CHECK-NEXT: Value: 43# CHECK-NEXT: Size: 44# CHECK-NEXT: Binding: Global 45# CHECK-NEXT: Type: 46# CHECK-NEXT: Other: 47# CHECK-NEXT: Section: Undefined 48# CHECK-NEXT: } 49# CHECK-NEXT: ] 50 51.text 52.globl _start 53_start: 54call zed@PLT 55call und@PLT 56 57.globl foo 58.type foo,@function 59foo: 60retq 61 62.globl bar 63.type bar,@function 64bar: 65retq 66 67.globl zed 68.type zed,@function 69zed: 70retq 71 72.type loc,@function 73loc: 74retq 75