diff options
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rw-r--r-- | llvm/test/tools/llvm-objdump/Inputs/libbogus4.a | 11 | ||||
-rw-r--r-- | llvm/test/tools/llvm-objdump/Inputs/libbogus5.a | 10 | ||||
-rw-r--r-- | llvm/test/tools/llvm-objdump/malformed-archives.test | 18 |
3 files changed, 36 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-objdump/Inputs/libbogus4.a b/llvm/test/tools/llvm-objdump/Inputs/libbogus4.a new file mode 100644 index 00000000000..44f01e323c6 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/Inputs/libbogus4.a @@ -0,0 +1,11 @@ +!<arch> +hello.c 1444941273 124 0 100644 102 ` +#include <stdio.h> +#include <stdlib.h> +int +main() +{ + printf("Hello World\n"); + return EXIT_SUCCESS; +} +foo.c 1444941645 124 0 100644 diff --git a/llvm/test/tools/llvm-objdump/Inputs/libbogus5.a b/llvm/test/tools/llvm-objdump/Inputs/libbogus5.a new file mode 100644 index 00000000000..d832991f73f --- /dev/null +++ b/llvm/test/tools/llvm-objdump/Inputs/libbogus5.a @@ -0,0 +1,10 @@ +!<arch> +hello.c 1444941273 124 0 100644 102 @ +#include <stdio.h> +#include <stdlib.h> +int +main() +{ + printf("Hello World\n"); + return EXIT_SUCCESS; +} diff --git a/llvm/test/tools/llvm-objdump/malformed-archives.test b/llvm/test/tools/llvm-objdump/malformed-archives.test index b44b1609d60..c52bc8003f8 100644 --- a/llvm/test/tools/llvm-objdump/malformed-archives.test +++ b/llvm/test/tools/llvm-objdump/malformed-archives.test @@ -5,16 +5,28 @@ # RUN: %p/Inputs/libbogus1.a \ # RUN: 2>&1 | FileCheck -check-prefix=bogus1 %s -# bogus1: libbogus1.a': truncated or malformed archive (characters in size field in archive header are not all decimal numbers: '10%') +# bogus1: libbogus1.a': truncated or malformed archive (characters in size field in archive header are not all decimal numbers: '10%' for archive member header at offset 8) # RUN: not llvm-objdump -macho -archive-headers \ # RUN: %p/Inputs/libbogus2.a \ # RUN: 2>&1 | FileCheck -check-prefix=bogus2 %s -# bogus2: libbogus2.a': truncated or malformed archive (characters in size field in archive header are not all decimal numbers: '1%') +# bogus2: libbogus2.a': truncated or malformed archive (characters in size field in archive header are not all decimal numbers: '1%' for archive member header at offset 170) # RUN: not llvm-objdump -macho -archive-headers \ # RUN: %p/Inputs/libbogus3.a \ # RUN: 2>&1 | FileCheck -check-prefix=bogus3 %s -# bogus3: libbogus3.a': truncated or malformed archive (offset to next archive member past the end of the archive) +# bogus3: libbogus3.a': truncated or malformed archive (offset to next archive member past the end of the archive after member foo.c) + +# RUN: not llvm-objdump -macho -archive-headers \ +# RUN: %p/Inputs/libbogus4.a \ +# RUN: 2>&1 | FileCheck -check-prefix=bogus4 %s + +# bogus4: libbogus4.a': truncated or malformed archive (remaining size of archive too small for next archive member header at offset 170) + +# RUN: not llvm-objdump -macho -archive-headers \ +# RUN: %p/Inputs/libbogus5.a \ +# RUN: 2>&1 | FileCheck -check-prefix=bogus5 %s + +# bogus5: libbogus5.a': truncated or malformed archive (terminator characters in archive member "@\n" not the correct "`\n" values for the archive member header at offset 8) |