brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 20e58b9 Raw
68 lines · plain
1## Test the deletion of members and that symbols are removed from the symbol table.2 3# RUN: yaml2obj %s -o %t-delete.o --docnum=14# RUN: yaml2obj %s -o %t-keep.o --docnum=25# RUN: touch %t1.txt6# RUN: touch %t2.txt7 8## Add file:9# RUN: rm -f %t.a10# RUN: llvm-ar rc %t.a %t1.txt %t-delete.o %t-keep.o %t2.txt11# RUN: llvm-nm --print-armap %t.a \12# RUN:   | FileCheck %s --check-prefix=SYMBOL-ADDED13# RUN: llvm-ar t %t.a | FileCheck %s --check-prefix=FILE-ADDED14 15# SYMBOL-ADDED:      symbol116# SYMBOL-ADDED-NEXT: symbol217 18# FILE-ADDED:      1.txt19# FILE-ADDED-NEXT: delete.o20# FILE-ADDED-NEXT: keep.o21# FILE-ADDED-NEXT: 2.txt22 23## Delete file that is not a member:24# RUN: cp %t.a %t-archive-copy.a25# RUN: llvm-ar d %t.a t/missing.o26# RUN: cmp %t.a %t-archive-copy.a27 28## Delete file:29# RUN: llvm-ar d %t.a %t-delete.o30# RUN: llvm-nm --print-armap %t.a \31# RUN:   | FileCheck %s --check-prefix=SYMBOL-DELETED --implicit-check-not symbol132# RUN: llvm-ar t %t.a \33# RUN:   | FileCheck %s --check-prefix=FILE-DELETED --implicit-check-not delete.o34 35# SYMBOL-DELETED: symbol236 37# FILE-DELETED:      1.txt38# FILE-DELETED-NEXT: keep.o39# FILE-DELETED-NEXT: 2.txt40 41--- !ELF42FileHeader:43  Class:   ELFCLASS6444  Data:    ELFDATA2LSB45  Type:    ET_REL46  Machine: EM_X86_6447Sections:48  - Name: .text49    Type: SHT_PROGBITS50Symbols:51  - Name:    symbol152    Binding: STB_GLOBAL53    Section: .text54 55--- !ELF56FileHeader:57  Class:   ELFCLASS6458  Data:    ELFDATA2LSB59  Type:    ET_REL60  Machine: EM_X86_6461Sections:62  - Name: .text63    Type: SHT_PROGBITS64Symbols:65  - Name:    symbol266    Binding: STB_GLOBAL67    Section: .text68