OLD | NEW |
1 ; Tests that we generate an ELF container with fields that make sense, | 1 ; Tests that we generate an ELF container with fields that make sense, |
2 ; cross-validating against llvm-mc. | 2 ; cross-validating against llvm-mc. |
3 | 3 |
4 ; For the integrated ELF writer, we can't pipe the output because we need | 4 ; For the integrated ELF writer, we can't pipe the output because we need |
5 ; to seek backward and patch up the file headers. So, use a temporary file. | 5 ; to seek backward and patch up the file headers. So, use a temporary file. |
6 ; RUN: %p2i -i %s --filetype=obj --args -O2 --verbose none -o %t \ | 6 ; RUN: %p2i -i %s --filetype=obj --args -O2 --verbose none -o %t \ |
| 7 ; RUN: -allow-externally-defined-symbols \ |
7 ; RUN: && llvm-readobj -file-headers -sections -section-data \ | 8 ; RUN: && llvm-readobj -file-headers -sections -section-data \ |
8 ; RUN: -relocations -symbols %t | FileCheck %s | 9 ; RUN: -relocations -symbols %t | FileCheck %s |
9 | 10 |
10 ; RUN: %if --need=allow_dump --command %p2i -i %s --args -O2 --verbose none \ | 11 ; RUN: %if --need=allow_dump --command %p2i -i %s --args -O2 --verbose none \ |
| 12 ; RUN: -allow-externally-defined-symbols \ |
11 ; RUN: | %if --need=allow_dump --command llvm-mc -triple=i686-nacl \ | 13 ; RUN: | %if --need=allow_dump --command llvm-mc -triple=i686-nacl \ |
12 ; RUN: -filetype=obj -o - \ | 14 ; RUN: -filetype=obj -o - \ |
13 ; RUN: | %if --need=allow_dump --command llvm-readobj -file-headers \ | 15 ; RUN: | %if --need=allow_dump --command llvm-readobj -file-headers \ |
14 ; RUN: -sections -section-data -relocations -symbols - \ | 16 ; RUN: -sections -section-data -relocations -symbols - \ |
15 ; RUN: | %if --need=allow_dump --command FileCheck %s | 17 ; RUN: | %if --need=allow_dump --command FileCheck %s |
16 | 18 |
17 ; Add a run that shows relocations in code inline. | 19 ; Add a run that shows relocations in code inline. |
18 ; RUN: %p2i -i %s --filetype=obj --args -O2 --verbose none -o %t \ | 20 ; RUN: %p2i -i %s --filetype=obj --args -O2 --verbose none -o %t \ |
| 21 ; RUN: -allow-externally-defined-symbols \ |
19 ; RUN: && le32-nacl-objdump -w -d -r -Mintel %t \ | 22 ; RUN: && le32-nacl-objdump -w -d -r -Mintel %t \ |
20 ; RUN: | FileCheck --check-prefix=TEXT-RELOCS %s | 23 ; RUN: | FileCheck --check-prefix=TEXT-RELOCS %s |
21 | 24 |
22 ; Use intrinsics to test external calls. | 25 ; Use intrinsics to test external calls. |
23 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) | 26 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) |
24 declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i32, i1) | 27 declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i32, i1) |
25 | 28 |
26 ; Try other external functions (for cross tests). | 29 ; Try other external functions (for cross tests). |
27 ; Not testing external global variables since the NaCl bitcode writer | 30 ; Not testing external global variables since the NaCl bitcode writer |
28 ; refuses to freeze such IR. | 31 ; refuses to freeze such IR. |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 ; CHECK: Symbol { | 641 ; CHECK: Symbol { |
639 ; CHECK: Name: memset | 642 ; CHECK: Name: memset |
640 ; CHECK-NEXT: Value: 0x0 | 643 ; CHECK-NEXT: Value: 0x0 |
641 ; CHECK-NEXT: Size: 0 | 644 ; CHECK-NEXT: Size: 0 |
642 ; CHECK-NEXT: Binding: Global | 645 ; CHECK-NEXT: Binding: Global |
643 ; CHECK-NEXT: Type: None | 646 ; CHECK-NEXT: Type: None |
644 ; CHECK-NEXT: Other: 0 | 647 ; CHECK-NEXT: Other: 0 |
645 ; CHECK-NEXT: Section: Undefined | 648 ; CHECK-NEXT: Section: Undefined |
646 ; CHECK-NEXT: } | 649 ; CHECK-NEXT: } |
647 ; CHECK: ] | 650 ; CHECK: ] |
OLD | NEW |