43 lines · plain
1## Unsupported on windows as marking files "unreadable" is non-trivial on windows.2# UNSUPPORTED: system-windows3# REQUIRES: non-root-user4 5# RUN: rm -rf %t && split-file %s %t && cd %t6# RUN: yaml2obj 1.yaml -o 1.o7# RUN: llvm-ar rcS a.a 1.o8# RUN: cp a.a b.a && cp a.a c.a && cp a.a d.a9# RUN: chmod 100 c.a10# RUN: not llvm-ranlib a.a b.a c.a d.a 2>&1 | FileCheck %s --check-prefix=NO-PERMISSION -DMSG=%errc_EACCES11 12# NO-PERMISSION: error: unable to open 'c.a': [[MSG]]13# NO-PERMISSION-NOT: {{.}}14 15## The archives before c.a (a.a and b.a) have been processed.16# RUN: llvm-nm --print-armap a.a | FileCheck %s17# RUN: cmp a.a b.a18## The others (c.a and d.a) do not have a symbol table.19# RUN: chmod 700 c.a20# RUN: llvm-nm --print-armap c.a | FileCheck %s --check-prefix=NOMAP21# RUN: cmp c.a d.a22 23# CHECK: Archive map24# CHECK-NEXT: foo in 1.o25# CHECK-EMPTY:26 27# NOMAP-NOT: Archive map28 29#--- 1.yaml30--- !ELF31FileHeader:32 Class: ELFCLASS6433 Data: ELFDATA2LSB34 Type: ET_REL35 Machine: EM_X86_6436Sections:37 - Name: .text38 Type: SHT_PROGBITS39Symbols:40 - Name: foo41 Binding: STB_GLOBAL42 Section: .text43