diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-06 01:41:24 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-06 01:41:24 +0000 |
| commit | 7f59bb41cfa21da84de0e951d5f3370529b751a1 (patch) | |
| tree | 9e84cd90949de92314a76053beb0da3d1e0cda57 | |
| parent | fb42a5a29202b8f71795385bec9965b06836d148 (diff) | |
| download | bcm5719-llvm-7f59bb41cfa21da84de0e951d5f3370529b751a1.tar.gz bcm5719-llvm-7f59bb41cfa21da84de0e951d5f3370529b751a1.zip | |
Add a testcase that would have found the problem in r225048.
llvm-svn: 225235
| -rw-r--r-- | llvm/test/MC/MachO/AArch64/reloc-crash.s | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/MC/MachO/AArch64/reloc-crash.s b/llvm/test/MC/MachO/AArch64/reloc-crash.s new file mode 100644 index 00000000000..4984947f65b --- /dev/null +++ b/llvm/test/MC/MachO/AArch64/reloc-crash.s @@ -0,0 +1,27 @@ +; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +; Test tha we produce an external relocation. There is no apparent need for it, but +; ld64 (241.9) crashes if we don't. + +; CHECK: Relocations [ +; CHECK-NEXT: Section __bar { +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x0 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: Lbar +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: } +; CHECK-NEXT: ] + + .section __TEXT,__cstring +Lfoo: + .asciz "Hello World!" +Lbar: + .asciz "cString" + + .section __foo,__bar,literal_pointers + .quad Lbar |

