brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 824e6f1 Raw
67 lines · plain
1## Test the ADDMOD MRI command.2 3# RUN: rm -rf %t && split-file %s %t4# RUN: cd %t5# RUN: yaml2obj %s -o f.o6 7# RUN: llvm-ar -M < add-mod.mri8# RUN: llvm-nm --print-armap add-mod.a | FileCheck --check-prefix=SYMS %s9# RUN: llvm-ar t add-mod.a | FileCheck --check-prefix=FILES %s10 11# SYMS: f in {{.*}}12# FILES: f.o13 14## No create command.15# RUN: not llvm-ar -M < no-create.mri 2>&1 | FileCheck --check-prefix=NOCREATE %s16 17# NOCREATE: error: script line 1: no output archive has been opened18 19## ADDMOD with missing file.20# RUN: not llvm-ar -M < missing.mri 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=MISSING21# RUN: not ls missing.a22 23# MISSING: error: script line 2: missing.o: [[MSG]]24 25## ADD same file twice.26# RUN: llvm-ar -M < duplicate.mri27# RUN: llvm-nm --print-armap duplicate.a | FileCheck --check-prefix=SYMS2 %s28# RUN: llvm-ar t duplicate.a | FileCheck --check-prefix=FILES2 %s29 30# SYMS2-COUNT-2: f in {{.*}}31# FILES2-COUNT-2: f.o32 33#--- f.yaml34--- !ELF35FileHeader:36  Class:   ELFCLASS6437  Data:    ELFDATA2LSB38  Type:    ET_REL39  Machine: EM_X86_6440Sections:41  - Name: .text42    Type: SHT_PROGBITS43Symbols:44    - Name:    f45      Binding: STB_GLOBAL46      Section: .text47...48#--- add-mod.mri49CREATE add-mod.a50ADDMOD f.o51SAVE52 53#--- no-create.mri54ADDMOD f.o55SAVE56 57#--- missing.mri58CREATE missing.a59ADDMOD missing.o60SAVE61 62#--- duplicate.mri63CREATE duplicate.a64ADDMOD f.o65ADDMOD f.o66SAVE67