diff options
Diffstat (limited to 'llvm/test/Object/archive-format.test')
-rw-r--r-- | llvm/test/Object/archive-format.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Object/archive-format.test b/llvm/test/Object/archive-format.test index f895a36bce3..219fc7f894a 100644 --- a/llvm/test/Object/archive-format.test +++ b/llvm/test/Object/archive-format.test @@ -78,3 +78,15 @@ THIN-PATH-NEXT: /65 0 0 0 644 4 ` RUN: not llvm-ar --format=bsd rcT bad.a 0123456789abcde 0123456789abcdef 2>&1 | FileCheck --check-prefix=BSD-THIN %s BSD-THIN: Only the gnu format has a thin mode. + +If an archive has an object with no symbols, the linker and some other +tools on some versions of Solaris will abort operations if there is no +symbol table. Create such an object, put it into an archive, and check to +see that there is an empty symbol table. +RUN: mkdir -p %t +RUN: yaml2obj %S/Inputs/solaris-nosymbols.yaml > %t/foo.o +RUN: llvm-ar rs %t/foo.a %t/foo.o +RUN: cat -v %t/foo.a | FileCheck -strict-whitespace --check-prefix=SOLARIS %s +SOLARIS: !<arch> +SOLARIS-NEXT: / 0 0 0 0 8 ` +SOLARIS-NEXT: ^@^@^@^@^@^@^@^@foo.o/ |