1# RUN: yaml2obj %s > %t 2# RUN: llvm-objcopy --weaken-symbol Global -W Local -W Weak %t %t2 3# RUN: llvm-readobj -symbols %t2 | FileCheck %s 4 5!ELF 6FileHeader: 7 Class: ELFCLASS64 8 Data: ELFDATA2LSB 9 Type: ET_REL 10 Machine: EM_X86_64 11Sections: 12 - Name: .text 13 Type: SHT_PROGBITS 14 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 15 Address: 0x1000 16 AddressAlign: 0x0000000000000010 17 Size: 64 18Symbols: 19 Local: 20 - Name: Local 21 Type: STT_FUNC 22 Section: .text 23 Value: 0x1000 24 Size: 8 25 Weak: 26 - Name: Weak 27 Type: STT_FUNC 28 Size: 8 29 Section: .text 30 Value: 0x1008 31 Global: 32 - Name: Global 33 Type: STT_FUNC 34 Size: 8 35 Section: .text 36 Value: 0x1010 37 38#CHECK: Symbols [ 39#CHECK-NEXT: Symbol { 40#CHECK-NEXT: Name: 41#CHECK-NEXT: Value: 0x0 42#CHECK-NEXT: Size: 0 43#CHECK-NEXT: Binding: Local 44#CHECK-NEXT: Type: None 45#CHECK-NEXT: Other: 0 46#CHECK-NEXT: Section: Undefined 47#CHECK-NEXT: } 48#CHECK-NEXT: Symbol { 49#CHECK-NEXT: Name: Local 50#CHECK-NEXT: Value: 0x1000 51#CHECK-NEXT: Size: 8 52#CHECK-NEXT: Binding: Local 53#CHECK-NEXT: Type: Function 54#CHECK-NEXT: Other: 0 55#CHECK-NEXT: Section: .text 56#CHECK-NEXT: } 57#CHECK-NEXT: Symbol { 58#CHECK-NEXT: Name: Global 59#CHECK-NEXT: Value: 0x1010 60#CHECK-NEXT: Size: 8 61#CHECK-NEXT: Binding: Weak 62#CHECK-NEXT: Type: Function 63#CHECK-NEXT: Other: 0 64#CHECK-NEXT: Section: .text 65#CHECK-NEXT: } 66#CHECK-NEXT: Symbol { 67#CHECK-NEXT: Name: Weak 68#CHECK-NEXT: Value: 0x1008 69#CHECK-NEXT: Size: 8 70#CHECK-NEXT: Binding: Weak 71#CHECK-NEXT: Type: Function 72#CHECK-NEXT: Other: 0 73#CHECK-NEXT: Section: .text 74#CHECK-NEXT: } 75#CHECK-NEXT:] 76