1# RUN: yaml2obj %s -o %t 2# RUN: cp %t %t1 3# RUN: llvm-objcopy --discard-all %t %t2 4# Verify that llvm-objcopy has not modified the input. 5# RUN: cmp %t %t1 6# RUN: llvm-readobj --symbols %t2 | FileCheck %s 7 8# RUN: llvm-objcopy -x %t %t3 9# Verify that llvm-objcopy has not modified the input. 10# RUN: cmp %t %t1 11# RUN: cmp %t2 %t3 12 13# Verify that llvm-strip modifies the symbol table the same way. 14 15# RUN: cp %t %t4 16# RUN: llvm-strip --discard-all %t4 17# RUN: cmp %t2 %t4 18 19# RUN: llvm-strip -x %t 20# RUN: cmp %t2 %t 21 22!ELF 23FileHeader: 24 Class: ELFCLASS64 25 Data: ELFDATA2LSB 26 Type: ET_REL 27 Machine: EM_X86_64 28Sections: 29 - Name: .text 30 Type: SHT_PROGBITS 31 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 32 Address: 0x1000 33 AddressAlign: 0x0000000000000010 34 Size: 64 35Symbols: 36 - Name: Local 37 Type: STT_FUNC 38 Section: .text 39 Value: 0x1000 40 Size: 8 41 - Name: LocalSection 42 Type: STT_SECTION 43 Section: .text 44 - Name: LocalFile 45 Type: STT_FILE 46 - Name: Global 47 Type: STT_FUNC 48 Size: 8 49 Section: .text 50 Value: 0x1010 51 Binding: STB_GLOBAL 52 - Name: Weak 53 Type: STT_FUNC 54 Size: 8 55 Section: .text 56 Value: 0x1008 57 Binding: STB_WEAK 58 59#CHECK: Symbols [ 60#CHECK-NEXT: Symbol { 61#CHECK-NEXT: Name: 62#CHECK-NEXT: Value: 0x0 63#CHECK-NEXT: Size: 0 64#CHECK-NEXT: Binding: Local 65#CHECK-NEXT: Type: None 66#CHECK-NEXT: Other: 0 67#CHECK-NEXT: Section: Undefined 68#CHECK-NEXT: } 69#CHECK-NEXT: Symbol { 70#CHECK-NEXT: Name: LocalSection 71#CHECK-NEXT: Value: 0x0 72#CHECK-NEXT: Size: 0 73#CHECK-NEXT: Binding: Local 74#CHECK-NEXT: Type: Section 75#CHECK-NEXT: Other: 0 76#CHECK-NEXT: Section: .text 77#CHECK-NEXT: } 78#CHECK-NEXT: Symbol { 79#CHECK-NEXT: Name: LocalFile 80#CHECK-NEXT: Value: 0x0 81#CHECK-NEXT: Size: 0 82#CHECK-NEXT: Binding: Local 83#CHECK-NEXT: Type: File 84#CHECK-NEXT: Other: 0 85#CHECK-NEXT: Section: Undefined 86#CHECK-NEXT: } 87#CHECK-NEXT: Symbol { 88#CHECK-NEXT: Name: Global 89#CHECK-NEXT: Value: 0x1010 90#CHECK-NEXT: Size: 8 91#CHECK-NEXT: Binding: Global 92#CHECK-NEXT: Type: Function 93#CHECK-NEXT: Other: 0 94#CHECK-NEXT: Section: .text 95#CHECK-NEXT: } 96#CHECK-NEXT: Symbol { 97#CHECK-NEXT: Name: Weak 98#CHECK-NEXT: Value: 0x1008 99#CHECK-NEXT: Size: 8 100#CHECK-NEXT: Binding: Weak 101#CHECK-NEXT: Type: Function 102#CHECK-NEXT: Other: 0 103#CHECK-NEXT: Section: .text 104#CHECK-NEXT: } 105#CHECK-NEXT:] 106