brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 7f5683f Raw
66 lines · plain
1# RUN: yaml2obj %s -o %t2 3# No symbol matches, because pattern is implicitly enveloped in '^$'4# RUN: llvm-objcopy --discard-all --regex -K 'ba' %t %t25# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=REGEX16 7# Symbol 'bar' matches8# RUN: llvm-objcopy --discard-all --regex -K 'ba.*' %t %t39# RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=REGEX210 11# All symbols match12# RUN: llvm-objcopy --discard-all --regex -K '.*ba.*' %t %t413# RUN: llvm-readobj --symbols %t4 | FileCheck %s --check-prefix=REGEX314 15# All symbols match16# RUN: llvm-objcopy --discard-all --regex -K '^([a-z]+)*ba.*$' %t %t517# RUN: cmp %t4 %t518 19!ELF20FileHeader:21  Class:           ELFCLASS6422  Data:            ELFDATA2LSB23  Type:            ET_REL24  Machine:         EM_X86_6425Sections:26  - Name:            .text27    Type:            SHT_PROGBITS28    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]29    Address:         0x100030    AddressAlign:    0x000000000000001031    Size:            6432Symbols:33  - Name:     foobaz34    Type:     STT_FUNC35    Section:  .text36    Value:    0x100037    Size:     838  - Name:     bar39    Type:     STT_FUNC40    Section:  .text41    Value:    0x100842    Size:     843  - Name:     rebar44    Type:     STT_FUNC45    Section:  .text46    Value:    0x101047    Size:     848 49#REGEX1:     Symbols [50#REGEX1-NOT:   Name: foobaz51#REGEX1-NOT:   Name: bar52#REGEX1-NOT:   Name: rebar53#REGEX1:     ]54 55#REGEX2:     Symbols [56#REGEX2-NOT:   Name: foobaz57#REGEX2:       Name: bar58#REGEX2-NOT:   Name: rebar59#REGEX2:     ]60 61#REGEX3: Symbols [62#REGEX3:   Name: foobaz63#REGEX3:   Name: bar64#REGEX3:   Name: rebar65#REGEX3: ]66